Category Archives: Administration

— will list both Views and Stored procedures in a particular database SELECT OBJECT_NAME(object_id),OBJECT_DEFINITION(object_id) FROM sys.objects WHERE OBJECT_DEFINITION(object_id) LIKE ‘%*=%’ or OBJECT_DEFINITION(object_id) LIKE ‘%=*%’ Advertisements

The below script would provide the Actual DB file usage size rather than DB size (Used + Free) should work for SQL 2008 and upwards Borrowed the “dbo.sp_foreachdb” script from Aaron Bertrand (making-a-more-reliable-and-flexible-spmsforeachdb/) to list out all databases in a … Continue reading →

I get user requests all the time for access rights and i don’t have read access to AD to check groups to see if the user is already a member or not. We can run the below scripts from SQL server Management … Continue reading →