Script to find number of rows in every table
This following script will give you rows count of all table in current databases. Declare c cursor for select '['+U.name+'.'+O.Name+']' from sysobjects O Inner join sys.schemas U on O.UID=u.Schema_ID...
View ArticleSQL Script to Compare SQL Server Settings
How to Compare SQL Server Settings ? This is pretty simple, we can run sp_configure on individual server and can do the comparison manually but what if we can have a script where we just need to supply...
View ArticleSQL Script to get Server Hardware information
At times, DBA need to know, How many physical CPU has been installed How many Logical CPU (Cores) are running What is physical memory installed on the system This information ideally should in...
View ArticleSQL Script to get Server CPU Information
At times, DBA need to know, How many physical CPU has been installed How many Logical CPU (Cores) are running Type of CPU Processor Model and processing power of CPU This information ideally should in...
View ArticleScript to Identify worst Performing Queries
Being a DBA, to optimize a performance, a DBA need to know What are most most frequently executed queries on your system. What are the Queries / Statements which which makes system real busy. What are...
View ArticleSQL Script to get Client Connection Details
Being a DBA, to optimize a performance, at times, you might want to know How many connections are currently established on SQL Server Instance? From where SQL Server connection are being made? What is...
View ArticleSQL Script to know Temporary Tables and Their Size
Check my previous Post "How to Optimize tempdb ? ", where I have already answered What is Stored in tempdb ? A more about tempdb Internals How to Monitor tempdb How to Optimize tempdb tempdb Space...
View ArticleSQL SCRIPT to identify Bottleneck / Diagnostic Information Queries
I was thinking for building a consolidated Script to to identify performance bottlenecks, where I wanted to looks at following information : SQL and OS Version information for current instance Hardware...
View ArticleSQL Script to find Current Running Jobs and elapsed time
I do get a call from developers to check weather a any job is running on the server or not ? Mostly on Sunday morning they want to check that all data import / exports jobs finishes on time. So they...
View ArticleExample of Deadlock | SQL Server Deadlock Script
IS there a way I can stimulate a deadlock in SQL Server, so that I can use that as an example of deadlock Let’s take an example, where we will result / cause a dead lock to SQL Serve? To stimulate the...
View Article
More Pages to Explore .....