-->
Showing posts from 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 TRANS…

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…

Recently executed SQL Statements

SELECT last_execution_time , [text] AS [Statement] FROM sys . dm_exec_query_stats CROSS APPLY sys . dm_exec_sql_text ( sql_handle ) ORDER BY last_execution_time …

Failover Clustering

Failover Clustering High availability option, standby instance on a different node In case of failover: active transactions are rolled back, connections retry, reconnect to other node Single copy of …

SQL Server 2008 Database Mirroring

Database Mirroring Software solution for high availability. Per database and not per server. Increase data protection, availability, upgrade availability. Careful – A lot of things live outside the d…
Subscribe Our Newsletter