Certification Exam – Second Shot Free offer is back !

One of the popular offers I always liked while pursuing a Microsoft Certification is once again back. The second shot offer gives the candidate an opportunity to have a second shot of the same exam at no additional cost (if the candidate could not successfully pass in the first attempt).

I am planning to take the MCITP : Database Developer 2008 exam and hope to use this offer as it gives me a cushion (If I cannot successfully pass at the first instance).. So I am rushing for a coupon…, remember the coupons are available for a limited time only. The offer is valid up to June 30, 2010. for more information visit promteric web site Here or Microsoft website Here

— Bru Medishetty

Download SQL Server Sample Databases

When working with SQL Server most of the times the example queries that are provided in articles are based on the sample databases available in SQL Server 2005 / 2008.

If you have missed installing the Sample Databases when installing SQL Server, all you need to do is download the sample databases that are available at Microsoft Codeplex Website. There are databases available for SQL Server 2005 and SQL Server 2008.

Additionally you can look at the one of my articles to Install a sample Database in SQL Server 2005

— Bru Medishetty

Performing SSAS Database Backup

In this article you will learn the steps to backup a SQL Server Analysis Server Database.

After logging to the Analysis Services, in the object explorer, select the database that needs to be backed up. Right click the database and from the pop-up menu choose Backup.

Backup database dialog is displayed which is similar to many windows based dialog boxes. It displays the database that we are going to backup. In the text box against backup file, type in the filename that you intend to place the backup in. The backup file extension for an SSAS database is by default “.abf” (which in my opinion stands for Analysis Services Backup file (or format). There are some options to choose from if required. Options such as Allow file overwrite will overwrite the existing file (if there exists a file with the same name at the same location).  You can additionally compress the backup file while reduces the backup file size and protect the backup file by providing a password. That password needs to be given while restoring a database from the same backup file.

Click OK to continue to backup the database.

The backup is performed and the screen similar to the one shown below is displayed as long as the database backup is being performed. The Progress section of the dialog (left bottom of the dialog box) displays Executing.

Note that after the backup is done successfully, it does not display a message box about the successful completion of the backup. You need to check for the existence of the backup file at the destination location.

— Bru Medishetty

Concatenating Strings to NULL values

We recently ran into this situation of reports containing nothing but blank spaces. When investigated the reason was that the String concatenation statement was written as a general statement. There is nothing wrong in the statement, it works fine when the variables have a value but does not work when one of the variables is NULL.

The “SELECT @FinalString” statement returns NULL since the variable @String1 is NULL. When such a variable is concatenated with other set of variables or string values it would all result in NULL and the string message(s) that is to be used will not return the desired output (resulting in blank spaces in reports in one of our case).

In order to overcome such issues, the ISNULL function can be used which checks the value and replaces with the value to be replaced if NULL is found. The same statement is rewritten and ISNULL is implemented to check for NULL values in @String1 variable, if @String1 is NULL, then ‘EMPTY STRING1’ is included in the final string and results in a meaningful string value instead of NULL.

Note that the appropriate statement would also include ISNULL(@String2,’EMPTY STRING2′), it has been avoided in the example to emphasize its importance at the @String1..

For more information on ISNULL look at Books Online link here

— Bru Medishetty

Performance Tuning in SQL Server

One of the frequently asked questions in forums, interviews and during general discussions, is performance tuning. In fact, a friend of mine, (who knows a little bit of SQL Server) when speaking about my blogs, asked me why I had not written any blog on performance tuning. I gave a pause and said, do you know that heavy usage of cursors result in poor performance, Database partitioning results in slightly better performance and Database Snapshots cause a performance overhead? Then I continued, though you see I had a blog on those topics,  it is not noticed that they are related to performance of the SQL Server.

The point is, there are many actions or the usage of certain features which directly or indirectly affect the performance of a SQL Server. I would like to post blogs on performance tuning SQL Server, it may be Query Tuning such as rewriting the query to perform better or looking at Indexes and ensure that there are proper Indexes that help the query. It can be related to locking / blocking happening on the database or improper settings of the database options.

There are certain other things to look at when looking to tune a SQL Server apart from those mentioned above. An improper placement of the database files can lead a performance degradation or excessive usage of cursors. There can be system bottlenecks such as Memory, Processor, Disk or Network that is the prime cause for a system slowness. 

Many of these shall be addressed individually in the forth-coming blogs.

— Bru Medishetty