SQL Server General DBA

Building Ranges using T-SQL

We often use excel for any running repetitive calculations since it is a very convenient user friendly interface which allows us to just enter a formula in a cell and  simply  drag and drop the  formulas to generate a complete output. For example, I had a Products listing, with ID and Quantity for each product. […]

Adding Custom Code to the Reporting Services 2008 R2

There are numerous circumstances when we wish to add a custom function to a SSRS report in order to cater for needs of the customer which exceeds the capability of the built-in functions in SSRS. In these scenarios we will have to write our own functions. In this article I will demonstrate how to add […]

New T-SQL Features in SQL Server 2012

SQL Server 2012 (or Denali) CTP is now available and can be downloaded at http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9&displaylang=en SQL Server 2012 has several major enhancements including a new look for SSMS. SSMS is now   similar to Visual Studio   with greatly improved Intellisense support. This article we will focus on the T-SQL Enhancements in SQL Server 2011. The main […]

SQL Server Log Shipping For Large Databases

Scenario:  A couple of days back I was setting up a DR plan for one of our most mission critical DB servers which was hosting around 10 databases having size of 10, 23, 5, 7.4, 1.8, 6.2, 7.9, 5.53, 8.7 and 125 GB respectively. I decided to implement Log Shipping as a part of the […]

Moving SQL Server System Databases

I was recently examining the configuration of one of our production database servers. This server was involved in Merge Replication. All the database files on this server were dumped on one small SAN drive. The replication cleanup job for some reason was unable to delete the historical records from the system tables present in the […]

Are You Using SSMS effectively ?

SQL Server Management Studio is an essential tool for DBAs and developers. But are you using it effectively?  In this article, I will try examine a few tips and techniques which could well boost your efficiency using SSMS. Object Filtering The below screen is probably familiar to most DBAs – it lists all tables under […]

Whether to use UNION or OR in SQL Server Queries

Recently I came across with an article on DB2 about using Union instead of OR. So I thought of carrying out a research on SQL Server on what scenarios UNION is optimal in and which scenarios OR would be best. I will analyze this with a few scenarios using samples taken  from the AdventureWorks database […]

Adding Column to a SQL Server Table

Adding a column to a table is  common task for  DBAs. You can add a column to a table which is a nullable column or which has default values. But are these two operations are similar internally and which method is optimal? Let us start this with an example. I created a database and a […]

ERROR_PROCEDURE does not return a schema name

A recent blog entry I read reminded me again that I wanted to rant about an issue in SQL Server for quite some time now… SQL Server 2005 introduced the separation between user and schema. Though schemata already existed  before SQL Server 2005, they really became usable with this version, imho. At the same time  […]

Identity Property Range Checking in SQL Server

The IDENTITY property for a column of a numerical data type is a frequently used method to achieve system-generated “uniqueness” for each row in a table. Such a column then in turn is a quite popular choice for the PRIMARY KEY constraint. Most of the times one would choose the data type int for the […]
Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |