Jr. Developer asked me other day how to escape single quote?
User can escape single quote using two single quotes (NOT double quote).
SQL SERVER – Index Reorganize or Index Rebuild
Recently, I have received one question quite often about when to Index Reorganize and when to Index Rebuild. I have already written about this topic earlier but it seems that many are unable to search it. SQL SERVER – Difference Between Index Rebuild and Index Reorganize Explained with T-SQL Script…
Read MoreSQL SERVER – Introduction to Performance Monitor – How to Use Perfmon
Yesterday I wrote about SQL SERVER – Introduction to Three Important Performance Counters. I received few questions about how to use Perfmon. Here is very brief introduction to Perfmon. There are three ways to launch Perfmon. 1) Type “start perfmon” at the command prompt. 2) Go to Start | Programs…
Read MoreSQL SERVER – Introduction to Three Important Performance Counters
Performance Counters are very important to evaluate. There are more than thousands of Performance Counters. Today I will cover three basic but very important Performance Counters. Processor:% Processor Time It reports the total processor time with respect to the available capacity of the server. If counter is between 50 to…
Read MoreSQL SERVER – Get Current Database Name
Yesterday while I was writing script for SQL SERVER – 2005 – Find Unused Indexes of Current Database . I realized that I needed SELECT statement where I get the name of the current Database. It was very simple script. SELECT DB_NAME() AS DataBaseName It will give you the name…
Read MoreSQL SERVER – 2005 – Find Unused Indexes of Current Database
Simple but accurate following script will give you list of all the indexes in the database which are unused. If indexes are not used they should be dropped as Indexes reduces the performance for INSERT/UPDATE statement. Indexes are only useful when used with SELECT statement. Script to find unused Indexes.…
Read More

