Drop/Delete databases older than 180 Days

We have  quite a few Dev servers where developers go on creating new databases for their developement work and testing. Whatever databases are needed are moved to QA servers after initial architecture is finalized. They wanted DBAs to delete databases which were created earlier than six months and drop them.  Now, to manually scan through
Read More »

KILL ALL INACTIVE SPIDS

Please use this only if you know what you are doing. I have intentionally commented the kill command. If some one knows how to uncomment it, only then, this script will work. —————————- —————————- First run this to find the offending database….. —————————- —————————- SELECT DB_NAME(dbid) as ‘Test’, COUNT(dbid) as ‘Total Connections’ FROM master.dbo.sysprocesses WITH
Read More »

Adding filters and sorts in SP_WHO2

Have you ever wished if you could have somehow filtered the results from our all time favorite command SP_WHO2 instead of going through hundreds of rows of data. If you copied the results to excel and used sorting and filtering in excel , you are not alone. For those who are not aware of  SP_WHO2
Read More »

Hello world!

Hi. My name is Niraj Kumar and I am from Bangalore, India. I have been working as SQL Server database administrator for last seven years in different organizations. I am going to share solutions to problems which I faced in my day to day work and it took me some effort to find solutions to
Read More »