Two scripts to search a string in stored procedure code, one for SQL Server 2000 using syscomments and one for SQL Server 2005, clearly labeled by version.
SQL SERVER – Get Permissions of My Username / Userlogin on Server / Database
Invited to review a big company’s schema, I wanted to know my own permissions without asking their DBA. fn_my_permissions shows them at server and database level.
SQL SERVER – Difference Between @@Version and xp_msver – Retrieve SQL Server Information
SELECT @@Version gives the SQL Server version, edition and service pack in one string. I compare @@Version and xp_msver, which returns more server details.
SQL SERVER – Executing Remote Stored Procedure – Calling Stored Procedure on Linked Server
Two ways to call a remote stored procedure on a linked server: a four part name with EXEC, or the OPENQUERY distributed query function.
SQL SERVER – Stored Procedure to Know Database Access Permission to Current User
Which databases can I use? Run EXEC sp_MShasdbaccess to see the database access permission of the current user. Our Jr. DBAs check it all the time.
SQL SERVER – Rename Database to New Name Using Stored Procedure by Changing to Single User Mode
How we rename database copies on our development server: set it to single user mode, run sp_renamedb, then set it back. The file names do not change.







