The RML utilities allow you to process SQL Server trace files and view reports showing how SQL Server is performing. For example, you can quickly see:
Which application, database or login is using the most resources, and which queries are responsible for that
Whether there were any plan changes for a batch during the time when the [...]
Archive for the ‘Best Practices’ Category
SQLAuthority News - Download RML Utilities for SQL Server
Posted in Best Practices, Database, SQL, SQL Authority, SQL Documentation, SQL Download, SQL Performance, SQL Query, SQL Security, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology on November 12, 2008 | 1 Comment »
SQL SERVER - Delete Backup History - Cleanup Backup History
Posted in Author Pinal, Best Practices, Database, SQL, SQL Authority, SQL Backup and Restore, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, T SQL, Technology on November 11, 2008 | 3 Comments »
SQL Server stores history of all the taken backup forever. History of all the backup is stored in msdb database. Many times older history is no more required. Following Stored Procedure can be executed with parameter which takes days of history to keep. In following example 30 is passed to keep history of month.
USE msdb
GO
DECLARE [...]
SQL SERVER - Check Database Integrity for All Databases of Server
Posted in Author Pinal, Best Practices, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Server DBCC, SQL Tips and Tricks, T SQL, Technology on November 10, 2008 | No Comments »
Today we will see quick script which will check integrity of all the database of SQL Server.
EXEC sp_msforeachdb ‘DBCCÂ CHECKDB(”?”)’
Above script will return you lots of messages in resultset. If there are any errors in resultset they will be displayed in red text. If everything is black text there is no error. Typical output of [...]
SQLAuthority News - 5 Millions Visitors - 2 Anniversary - Authors Note on Economy Slow Down and Job Opportunity - SQL Server
Posted in About Me, Author Pinal, Best Practices, DBA, Database, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology on November 6, 2008 | 4 Comments »
I just received following screen shot from one of the regular reader of SQLAuthority.com blog. He pointed out important milestone for our blog. We have crossed 5 millions visitors. In less than 2 years SQLAuthority.com blog has been visited by 5 millions visitors. I even missed the anniversary our blog. On November 1st 2008 SQLAuthority.com [...]
SQL SERVER - Clear Drop Down List of Recent Connection From SQL Server Management Studio
Posted in Author Pinal, Best Practices, DBA, Database, SQL, SQL Add-On, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on November 5, 2008 | 1 Comment »
Quite often it happens that SQL Server Management Studio’s Dropdown box is cluttered with many different SQL Server’s name. Sometime it contains the name of the server which does not exist or developer does not have access to it. It is very easy to clean the list and start over.
Delete mru.dat file from following location.
For [...]
SQL SERVER - DECLARE Multiple Variables in One Statement
Posted in Author Pinal, Best Practices, SQL, SQL Authority, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on October 31, 2008 | 2 Comments »
Just a day ago, while I was enjoying mini vacation during festival of Diwali I met one of the .NET developer who is big fan of Oracle. While discussing he suggested that he wished SQL Server should have feature where multiple variable can be declared in one statement. I requested him to not judge wonderful [...]
SQLAuthority News - Happy Diwali to All of You
Posted in Best Practices, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology on October 28, 2008 | 4 Comments »
SQLAuthority Wishes Happy Diwali to All of You
SQLAuthority News - TOP Downloads - Bookmark
Posted in Best Practices, Database, Outsourcing Technology, SQL, SQL Authority, SQL Download, SQL Interview Questions and Answers, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, Software Development, T SQL, Technology on October 24, 2008 | 1 Comment »
Recently I have got many many request for SQL Server Interview Questions and Answers as well related articles. It seems many people are looking for Job or appearing for interview at this time of the year. I have included list of the my top downloads in side bar of the blog, still I receive many [...]
SQLAuthority News - Running SQL Server 2008 in a Hyper-V Environment Best Practices and Performance Considerations
Posted in Best Practices, Database, SQL, SQL Authority, SQL Documentation, SQL Download, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology on October 22, 2008 | 1 Comment »
Hyper-V in Windows Server 2008 is a powerful virtualization technology that can be used by corporate IT to consolidate under-utilized servers, lowering TCO and maintaining or improving Quality of Service. Through a series of test scenarios that are representative of SQL Server application fundamentals, this document provides best practice recommendations on running SQL Server in [...]
SQL SERVER - Retrieve - Select Only Date Part From DateTime - Best Practice - Part 2
Posted in Author Pinal, Best Practices, SQL, SQL Authority, SQL DateTime, SQL Function, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology on October 18, 2008 | 1 Comment »
A year ago I wrote post about SQL SERVER - Retrieve - Select Only Date Part From DateTime - Best Practice where I have discussed two different methods of getting datepart from datetime.
Method 1:
SELECT DATEADD(D, 0, DATEDIFF(D, 0, GETDATE()))
Method 2:
SELECT CONVERT(VARCHAR(10),GETDATE(),111)
I have summarized my post suggesting that either method works fine and I prefer to [...]
SQLAuthority News - SQL Injection - SQL Joke, SQL Humor, SQL Laugh
Posted in Best Practices, DBA, Database, SQL, SQL Authority, SQL Humor, SQL Query, SQL Security, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology on October 12, 2008 | 7 Comments »
It has been long time since I wrote about SQL Humor. Following is the cartoon sent to me by many (more than 10 times) so far by many users. I did not publish it till now as it has been quite popular and I believed many people has already seen it. However, recently by one [...]
SQL Server - 2008 - Cheat Sheet - One Page PDF Download
Posted in Author Pinal, Best Practices, DBA, Database, SQL, SQL Add-On, SQL Authority, SQL Coding Standards, SQL Documentation, SQL Download, SQL Interview Questions and Answers, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Utility, Software Development, T SQL, Technology on October 2, 2008 | 8 Comments »
Very frequently I have been asked to create a page, post or article where in one page all the important concepts of SQL Server are covered. SQL Server 2008 is very large subject and can not be even covered 1000 of pages. In daily life of DBA there are few commands very frequently used and [...]
SQL SERVER - Guidelines and Coding Standards Complete List Download
Posted in Author Pinal, Best Practices, DBA, Data Warehousing, Database, SQL, SQL Authority, SQL Coding Standards, SQL Constraint and Keys, SQL Cursor, SQL Data Storage, SQL Documentation, SQL Download, SQL Function, SQL Index, SQL Joins, SQL Performance, SQL Query, SQL Scripts, SQL Security, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, SQL Trigger, SQL Utility, SQLAuthority, T SQL, Technology on September 25, 2008 | 3 Comments »
SQL SERVER - Guidelines and Coding Standards complete List Download
Coding standards and guidelines are very important for any developer on the path of successful career. A coding standard is a set of guidelines, rules and regulations on how to write code. Coding standards should be flexible enough or should take care of the situation where [...]
SQL SERVER - Guidelines and Coding Standards Part - 2
Posted in Author Pinal, Best Practices, Database, SQL, SQL Authority, SQL Coding Standards, SQL Documentation, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, Software Development, T SQL, Technology on September 24, 2008 | 7 Comments »
To express apostrophe within a string, nest single quotes (two single quotes).
Example:
SET @sExample = ‘SQL’’s Authority’
When working with branch conditions or complicated expressions, use parenthesis to increase readability.
IF ((SELECT 1
FROM TableName
WHERE 1=2) ISNULL)
To mark single line as comment use (–) before statement. To mark section of code as comment use (/*…*/).
Avoid the [...]
SQL SERVER - Guidelines and Coding Standards Part - 1
Posted in Author Pinal, Best Practices, Database, SQL, SQL Authority, SQL Coding Standards, SQL Constraint and Keys, SQL Documentation, SQL Index, SQL Joins, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, Software Development, T SQL, Technology on September 23, 2008 | 13 Comments »
Use “Pascal” notation for SQL server Objects Like Tables, Views, Stored Procedures. Also tables and views should have ending “s”.
Example:
UserDetails
Emails
If you have big subset of table group than it makes sense to give prefix for this table group. Prefix should be separated by _.
Example:
Page_ UserDetails
Page_ Emails
Use following naming convention for Stored [...]
SQLAuthority News - 700 Articles and Author Updates
Posted in About Me, Best Practices, DBA, Database, SQL, SQL Authority, SQL Interview Questions and Answers, SQL MVP, SQL Query, SQL Server, SQL Tips and Tricks, SQL User Group, SQLAuthority News, T SQL, Technology on September 11, 2008 | 1 Comment »
It is always interested to write article when reached at milestone. I start to receive many emails and suggestions just about when this blog is reaching any milestone.
One question keep on coming to me is why do I write or what is in it for me?
Satisfaction! I enjoy writing and helping community and by writing [...]
SQL SERVER - XML - Split a Delimited String - Generate a Delimited String
Posted in Author Pinal, Best Practices, SQL, SQL Authority, SQL MVP, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Stored Procedure, SQL Tips and Tricks, SQL XML, SQLAuthority Website Review, T SQL, Technology on August 17, 2008 | No Comments »
SQL Server MVP and my very good friend Jacob Sebastian has written two wonderful articles about SQL Server and XML. I encourage to read this two articles to anybody who are interested in learning SQL and XML.
How to generate a Delimited String using FOR XML PATH
XQuery Lab 19 - How to parse a delimited string?
I [...]
SQLAuthority News - Tip of the Minute
Posted in Author Pinal, Best Practices, DBA, Database, SQL, SQL Authority, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology on August 16, 2008 | 2 Comments »
Since my new personal website is launched I have received many comments and emails regarding new section of Tip of the Minute. Right navigation bar of the my personal website http://www.pinaldave.com contains section of the Tip of the Minute. Every time when page is refreshed it displays one new tip related to SQL Server.
Few of [...]
SQLAuthority Author Visit - Ahmedabad SQL Server User Group Meeting - July 19 2008
Posted in Best Practices, SQL, SQL Authority, SQL Download, SQL Query, SQL Server, SQL Tips and Tricks, SQL User Group, SQLAuthority Author Visit, T SQL, Technology on July 21, 2008 | 5 Comments »
Ahmedabad SQL Server User Group is just 2 months old chapter but it is getting extremely popular among enthusiastic IT professionals. I have joined this group and suggest all the developers of Ahmedabad and surrounding areas to join this group. It does not matter which application you are using but SQL Server is same everywhere.
Ahmedabad [...]
SQLAuthority Download - SQL Server Cheatsheet
Posted in Author Pinal, Best Practices, DBA, Database, SQL, SQL Authority, SQL Documentation, SQL Download, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, Software Development, T SQL, Technology on June 25, 2008 | 1 Comment »
I think this is most popular question I receive in email, if I have SQL Server cheatsheet. Well, SQL Server is very wide subject and covering all the main topics of SQL Server will take 100 pages book as cheatsheet. I have tried to create one page cheatsheet which I use for my daily use. [...]
-
About Pinal Dave
Pinalkumar Dave is Microsoft SQL Server MVP and author of over 700 SQL Server articles. He has five years experience as Principal Database Administrator in MS SQL Server 2008/2005, .NET (C#) and ColdFusion MX. He has a Masters of Science degree in Computer Networks, along with MCDBA, MCAD(.NET) and ColdFusion Advanced MX Certifications.
MVP Profile

-
Blog Stats
- 5,224,388 Readers
-
SQLAuthority Links

My Homepage
My Resume
My Other Blog
SQL Server Mag Articles
--------------------
SQLAuthority
Best Articles
Favorite Articles
SQL Script Bank
Top Downloads
--------------------
SQL Interview Q & A
SQL Coding Standards
SQL FAQ Download
--------------------
SQL Random Article
Search SQLAuthority
Subscribe Email Update
SQLAuthority Feed
Translate SQLAuthority
--------------------
Jobs @ SQLAuthority
Find Your IP
Categories
- About Me (35)
- Author Pinal (509)
- Best Practices (39)
- Data Warehousing (25)
- Database (226)
- DBA (198)
- Main (67)
- Outsourcing Technology (4)
- Software Development (73)
- SQL (777)
- SQL Add-On (65)
- SQL Authority (777)
- SQL Backup and Restore (48)
- SQL Coding Standards (84)
- SQL Constraint and Keys (45)
- SQL Cursor (63)
- SQL Data Storage (19)
- SQL DateTime (33)
- SQL DMV (1)
- SQL Documentation (280)
- SQL Download (419)
- SQL Error Messages (360)
- SQL Function (96)
- SQL Humor (21)
- SQL Index (67)
- SQL Interview Questions and Answers (57)
- SQL Joins (357)
- SQL MVP (20)
- SQL Performance (406)
- SQL Puzzle (7)
- SQL Query (777)
- SQL Scripts (512)
- SQL Security (365)
- SQL Server (777)
- SQL Server DBCC (253)
- SQL Stored Procedure (131)
- SQL Tips and Tricks (777)
- SQL Trigger (40)
- SQL User Group (11)
- SQL Utility (55)
- SQL XML (2)
- SQLAuthority (17)
- SQLAuthority Author Visit (32)
- SQLAuthority Book Review (29)
- SQLAuthority News (149)
- SQLAuthority Website Review (18)
- T SQL (777)
- Technology (777)
-
Top Posts
- SQL SERVER - Insert Data From One Table to Another Table - INSERT INTO SELECT - SELECT INTO TABLE
- SQL SERVER - Insert Multiple Records Using One Insert Statement - Use of UNION ALL
- SQL SERVER - 2005 - Create Script to Copy Database Schema and All The Objects - Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects
- SQL SERVER - Import CSV File Into SQL Server Using Bulk Insert - Load Comma Delimited File Into SQL Server
- SQL SERVER - Retrieve Current Date Time in SQL Server CURRENT_TIMESTAMP, GETDATE(), {fn NOW()}
- SQL SERVER - Restore Database Backup using SQL Script (T-SQL)
- SQL Server Interview Questions and Answers Complete List Download
- SQL SERVER - Convert Text to Numbers (Integer) - CAST and CONVERT
- SQL SERVER - 2005 List All Tables of Database
- SQL SERVER - TRIM() Function - UDF TRIM()
- SQL SERVER - Fix : Error: 18452 Login failed for user '(null)'. The user is not associated with a trusted SQL Server connection.
- SQL SERVER - Shrinking Truncate Log File - Log Full
-
Recent Posts
- SQL SERVER - Simple Use of Cursor to Print All Stored Procedures of Database Including Schema
- SQLAuthority News - SQL Server White Paper: SQL Server 2008 Compliance Guide
- SQL SERVER - Simple Use of Cursor to Print All Stored Procedures of Database
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Group Photo
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Day 3
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Day 2
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Day 1
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Link List
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa
- SQLAuthority News - RML Utilities - Usage and Additional Help
- SQLAuthority News - Download RML Utilities for SQL Server
- SQL SERVER - Delete Backup History - Cleanup Backup History
- SQL SERVER - Check Database Integrity for All Databases of Server
- SQLAuthority News - SQL Server 2008 Book Online Updated in October 2008
- SQL SERVER 2008 - Connect Visual Studio 2005 Patch Download
-
Recent Comments
- Bob Zagars on SQL SERVER - Better Performance - LEFT JOIN or NOT IN?
- COBRASoft on SQL SERVER - 2005 - Database Table Partitioning Tutorial - How to Horizontal Partition Database Table
- SQL SERVER - Simple Use of Cursor to Print All Stored Procedures of Database Including Schema Journey to SQL Authority with Pinal Dave on SQL SERVER - Simple Use of Cursor to Print All Stored Procedures of Database
- Steve Hatchard on SQL SERVER - Difference between DISTINCT and GROUP BY - Distinct vs Group By
- Igor on SQL SERVER - FIX : Error 945 Database cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server error log for details
- Rosales on SQL SERVER - Retrieve Current Date Time in SQL Server CURRENT_TIMESTAMP, GETDATE(), {fn NOW()}
- Kunal Kumar on Contact Me
- Lutz Mueller on SQL SERVER - SELECT 1 vs SELECT * - An Interesting Observation
- Steve Walker on SQL SERVER - 2005 - Create Script to Copy Database Schema and All The Objects - Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects
- Rahul on SQL SERVER - 2005 - Display Fragmentation Information of Data and Indexes of Database Table
- Rahul on SQL SERVER - 2005 - Display Fragmentation Information of Data and Indexes of Database Table
- Makarov on Contact Me
- babu on SQL SERVER - Do Not Store Images in Database - Store Location of Images (URL)
- paresh13 on SQL SERVER - 2005 List All Tables of Database
- Manish on SQL SERVER - 2005 - Create Script to Copy Database Schema and All The Objects - Stored Procedure, Functions, Triggers, Tables, Views, Constraints and All Other Database Objects
Archives
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
-
Pages
-
Latest Articles
-
pinaldave
- SQL SERVER - Simple Use of Cursor to Print All Stored Procedures of Database Including Schema
- SQLAuthority News - SQL Server White Paper: SQL Server 2008 Compliance Guide
- SQL SERVER - Simple Use of Cursor to Print All Stored Procedures of Database
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Group Photo
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Day 3
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Day 2
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Day 1
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa - Link List
- SQLAuthority News - Author Visit - South Asia MVP Open Day 2008 - Goa
- SQLAuthority News - RML Utilities - Usage and Additional Help
-
-
Click Cloud
About Me Author Pinal Best Practices Database Data Warehousing DBA Main Outsourcing Technology Software Development SQL SQL Add-On SQLAuthority SQL Authority SQLAuthority Author Visit SQLAuthority Book Review SQLAuthority News SQLAuthority Website Review SQL Backup and Restore SQL Coding Standards SQL Constraint and Keys SQL Cursor SQL Data Storage SQL DateTime SQL DMV SQL Documentation SQL Download SQL Error Messages SQL Function SQL Humor SQL Index SQL Interview Questions and Answers SQL Joins SQL MVP SQL Performance SQL Puzzle SQL Query SQL Scripts SQL Security SQL Server SQL Server DBCC SQL Stored Procedure SQL Tips and Tricks SQL Trigger SQL User Group SQL Utility SQL XML Technology T SQL


