SQL Server General DBA
New Built-In TSQL Functions in SQL Server 2012
New Built-in Functions in SQL Server 2012 SQL Server 2012 (Code named SQL Server Denali) introduces 14 new built in functions in four different categories with one existing function (LOG) being modified to have an optional second base parameter: Category Function Name Conversion functions PARSE TRY_CONVERT TRY_PARSE Date and Time functions DATEFROMPARTS DATETIME2FROMPARTS DATETIMEFROMPARTS DATETIMEOFFSETFROMPARTS [...]
Controlling Growth of a msdb Database
I recently encountered a situation where the drive hosting Sharepoint Databases in a Staging environment ran out of space. I logged onto the server and found that the msdb database has itself occupied 38 GB of the total disk space. Msdb database generally contain maintenance information for the database such as backups, log shipping and [...]
Backing Up a SQL Server Database Directly Onto a Remote Server
Recently I encountered a situation where the backup drive was short of space on the production server. The policy on the production server was that as soon as soon as the Full Backup is complete, a copy of the production backup is transferred to the staging server using RoboCopy and then on the staging server [...]
Restoring a SQL Server Database – A Practical Example
Performing a Database Restore is a part of a DBA’s daily life. A DBA may need to perform a Restore due to various reasons such as recovery, refreshing a database for testing purpose etc. Many times it can be difficult to perform a Restore due to corrupted media, low disk space on the server and [...]
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 [...]
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 [...]
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 [...]
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 [...]


