Thursday, January 26, 2012

How to install SQL Server Client Tools?

In order to install SQL Server Client Tools or SQL Server Client we need to follow below steps.

Start installation by clicking on ‘Setup.exe’ file as how we do for normal installation and it will open wizard which contains different options like Planning, Installation, Maintenance, Tools and so on.
In that select ‘Installation’ and here it will have several options like New Installation, New SQL Failover instance, Add Node and so on.. Here select ‘New installation or add features to existing installation’ option. Then proceed with clicking OK on ‘Setup Support Rules’ , then select ‘New Installation or add features’ option, then enter product key, then select ‘I accept terms and ….’ Option, ‘Next’ button will take you to feature selection page.

Here while installing only SQL Server Client Tools we need to select only below selected options. There is no need to select any other options.


The options we need to select while installing SQL Client tools are

·         Client Tools Connectivity
·         Client Tools Backwards Compatibility
·         Client Tools SDK
·         Management Tools – Basic
·         Management Tools – Complete
·         SQL Client Connectivity SDK

Then proceed clicking on Next by leaving all default options as it is. While selecting the ‘Service Accounts’ select the one as required or you can select  any one of the NT Authority\SYSTEM or NT Authority\Network Service and once installation is done you can change to whatever account needed. Select ‘Authentication Mode’ also as per your company policy. I prefer Windows Authentication and add any of the account that will have Admin rights by clicking on ‘Add’ button and proceed clicking next options leaving the default values and it will finish the installation.

In short in order to install SQL Client Tools we need to select only the below options:

·         Client Tools Connectivity
·         Client Tools Backwards Compatibility
·         Client Tools SDK
·         Management Tools – Basic
·         Management Tools – Complete
·         SQL Client Connectivity SDK

Thanks

Monday, January 9, 2012

Another version of Microsoft Visual Studio 2008 has been detected on this system that must be updated to SP1. Please update all Visual Studio 2008 installations to SP1 level, by visiting Microsoft Update.

SQL 2K8 R2 installation fails with Visual Studio error even I don’t have VS installed at all on my machine!!!

I have encountered an interesting and time consuming issue last week. I was trying to install SQL 2k8 R2 on one of my servers. Installation went fine upto some extent, it installed DB Engine and other stuff but while installing “SQL Server Client Tools” it failed throwing below error:

“Another version of Microsoft Visual Studio 2008 has been detected on this system that must be updated to SP1.  Please update all Visual Studio 2008 installations to SP1 level, by visiting Microsoft Update.”

I noticed “Visual Studio 2008 Shell Isolated Mode Redistributable” was installed on machine and noticed it was already updated to SP1. I re-installed this one also from this link. Now I tried installing SQL Server Client Tools again but I received the same above error.

Then I found solution in this MSDN post. We need to make some changes to registry in order to proceed with SQL installation as mentioned below.

If you have a 64-bits computer, you need to check the following registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\9.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VC\Servicing\9.0\RED\1033

and ensure that the SP and SPIndex values are 1 and that the SPName is SP1

also we need to make changes to following registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\VS\Servicing\9.0
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\VS\Servicing\9.0\VSR\1033

ensure that the SP and SPIndex values are 1 and SPName value is SP1. The SP and SPIndex values were 0 and the SPName was RTM on my machine. I changed them to 1 and SP1 respectively and then tried installing client tools and installation went successfully.

Thanks

Friday, January 6, 2012

How to verify backup status?

Sometimes if backup job fails with weird error or at time restore command throws out an alien error first thing to do is to verify weather there is valid backup or not. Mainly in situations like server crash or un-expected DB corruption we first should check weather we have a valid backup of database or not. We several options associated with RESTORE command to verify the backup status/validity.

Backup Verification Options:
----------------------------

RESTORE HEADERONLY     - gives you a list of all the backups in a file
RESTORE LABELONLY        - gives you the backup media information
RESTORE FILELISTONLY    - gives you a list of all of the files that were backed up for a give backup
RESTORE VERIFYONLY      - verifies that the backup is readable by the RESTORE process

Syntax:
---------

RESTORE HEADERONLY FROM
DISK = 'C:\SQL2K8\Backups\Test.bak'
Go
RESTORE FILELISTONLY FROM
DISK = 'C:\SQL2K8\Backups\Test.bak'
Go
RESTORE VERIFYONLY FROM
DISK = 'C:\SQL2K8\Backups\Test.bak'
Go
RESTORE LABELONLY FROM
DISK = 'C:\SQL2K8\Backups\Test.bak'

The above commands gives you detailed information of what files are backed up, when they are backed up, backup media details and the validity of backup file weather the backup file is useful for restore or not. These commands has can be used along with other options like “FILE = ‘value’” and other options which will give more information.

Thanks