Showing posts from July, 2009

List User permissions

Another common question I found in several user forums WITH cte AS ( SELECT USER_NAME ( p.grantee_principal_id ) AS principal_name , dp.principal_id , d…

Step By Step Guide to Database Mirroring

Principal Server: SQL8 Mirrored Server: SQL 4 Pre-Requisites - Ensure that SQL Service /SQL Agent Services on all the machines start with the same domain account, otherwise mirroring wont work. Step…

How to kill a profiler trace

Let's say the DBA ran a trace on a server and left for a long lunch, and the client server where the profiler is running is suffering badly with poor performance on the applications running on it…

Forgot/Lost ‘sa’ password

You may have faced the issue of losing the SQL Server SA password. Perhaps you followed the security best-practice of removing the  builtin\Administrators from the sysadmin server role,  and no one  …

Rename Schema / Transfer schema

1: CREATE SCHEMA new_schema 2: GO 3: -- Now run these queries one by one, copy and paste the result of this in a new window and run it 4: SELECT 'ALTER SCHEMA new_schema TRAN…

Maintenance Plans in SQL 2005 Express

I found lot of questions on the missing in ability of SQL Server Express to automatically perform database backups/integrity checks/reindexing regularly with a Maintenance Plan. Since SQL Express doe…
Subscribe Our Newsletter