New answers tagged

0

You are really creating your own authentication methods. Plan A: Use the PAM stuff in newer versions of MySQL. Plan B: Write a database layer where the user, via some UI, asks for something. Then the layer checks your tables to see whether he is allowed to see/change/etc the thing in question. Then it either denies access, or proceeds to generate and ...


2

So the main thing is that you can set these up to be dynamic. You wouldn't have to log into each instance to find out the settings. It does make it easier to perform a health check and just keep track of the lot. I used it for Parsing Excel documents to SQL server. This turned out to be very simple instead of converting it to csv documents and importing from ...


2

O.K. lets create a nice example for you and show you how to script the index of your indexed view. first, lets create a temp table called T1 and add some meaningful data into it lets create a procedure that generates random strings first: USE TEMPDB GO CREATE PROCEDURE [dbo].[SpGenerateRandomString] @sLength tinyint = 10, @randomString varchar(50) OUTPUT ...


1

Something like that could be achieved through dynamic sql, or via using stored procedures instead of views (for selecting) or triggers (for controlling inserts/updates).alter But you can also create the memberview to return values according to the currently logged on user, which is probably more practical: create view memberview as select Dept, Name ...


5

A simple test method for SQL connectivity is to create an empty text file, with a file extension of "UDL". You can create it in Notepad. And it can have any name. I use "TestSQL.UDL" Save it on the desktop of a windows PC and double click it. A "Data Link Properties" dialog box will pop up where you can enter the IP address of the SQL server and also a ...


0

You can use the Script method of the Scripter object in SMO to achieve that. An example can be found here.


2

You may want to look at this SO question I'm looking for a reliable way to verify T-SQL stored procedures. Anybody got one? which is asking essentially the same thing, with several answers. To build upon the script Alaa Awad posted... this should show the schema and database of the referenced and referencing objects. If you're using many temp tables via ...


2

I have a couple of stored procedures that I wrote and use on a regular basis. sp_SrvPermissions sp_DBPermissions They each have three outputs. Principals : A list of the database/server principals and associated info including create/drop scripts. Role membership : A list of what roles each database/server principal belongs to along with add/drop ...


2

sp_help_revlogin See: How to transfer logins and passwords between instances of SQL Server on MSDN Worked reasonably well for me this past summer.



Top 50 recent answers are included