Technical Blog

Synonyms in SQL Server 2005 (benefits and limitations)

Scenario I faced a situation where archived tables were created in the production database and now there was a requirement to move them as the database was growing. These archival tables were being used by several jobs and also in the application code. Moving them was demanding and also a very complicated process. I wanted […]


Downgrading a SQL Server database to a lower version

Scenario proposal After recently upgrading a SQL Server instance to SQL Server 2012 a few days ago, you noticed that your application is not functioning properly. You decided to roll back the upgrade by downgrading the SQL Server database engine to SQL Server 2008 R2.  After the downgrade of the database engine, you are unable […]


Testing options in SQL Server 2005 and 2000

Scenario Testing database applications for many organizations is a challenging task that is difficult to setup, automate and validate.  Luckily, more time is getting allocated into development projects to conduct more rigorous testing.  In this tip we will outline some of the realities to perform SQL Server 2000 and 2005 testing and opportunities to streamline […]


How to disable indexes in SQL Server 2005 and 2008?

Scenario proposal While looking through the new features in SQL Server 2005 and SQL Server 2008 we found a potentially interesting one called Disabling Indexes, which can be used to disable indexes on a table or a view. Can you give us a detailed explanation of how we go about using this new feature along […]


Storing an IP address in a SQL Server database

Scenario proposal Often databases are used with web-based interfaces and recording the IP address of the end user can assist with debugging, marketing, bandwidth planning and collation selection to name a few. In a scenario where each page access is logged, is there an optimal way to store IP addresses? Solution This tutorial will work […]


SQL Server cursors: iterate through database

Scenario Proposal There are times when you need to loop through all the databases or database objects to perform some tasks. For example you want to run a DBCC command against all the databases or take backups of all the databases on the server or you want to rebuild all the indexes of all the […]


How to execute a TSQL batch several times using GO?

Scenario proposal Sometimes there is a need to execute the same command or set of commands over and over again. This may be to insert or update test data or it may be to put a load on your server for performance testing.  Whatever the need the easiest way to do this is to setup […]