Would you love to get a weekly status report of all the databases hosted on your mission critical servers? ,Would you love to get a report which will help you…
Most of the time we need to capture the potential hardware capacity of the server which hosts SQL Server and below TSQL will help you to do this. This script…
One of my favorite DBCC Command is DBCC SQLPERF(logspace) This will give you log space usage overview quickly.
Today I wanted to pull this info to work on a replication strategy and the below code shows how to do that in a matter of seconds — Find all…
Today I came across an interesting question on how to rename a table in SQL Server.Thats a pretty easy one and we can use sp_rename to accomplish this. sp_rename ‘OLD_TABLE_NAME’ …
Most of the DBA’s might have came across a situation where they want to disable all SQL jobs for DR environments or test environments.Below script does this for you and is…
This is a handy script to pull info related to CPU and Memory. SELECT cpu_count AS [Logical CPUs] ,cpu_count / hyperthread_ratio AS [Physical CPUs] ,physical_memory_in_bytes / 1048576 AS ‘mem_MB’ ,virtual_memory_in_bytes…
Recently I came across a situation where in I had to scripyt out the permissions of all the stored procedures for a database.After lot of R&D came across a SP…