Tip: SQL Server Single user mode in Windows 2008 Cluster

At first I thought starting SQL Server in Single user mode is easy in Windows 2008 fail-over cluster. But I was wrong, If I just add ‘;-m’ in start-up parameter and starts it, the SQL server will start in single user mode via cluster. But we wont be able to log in. The cluster service logs in before us. And so we might see an error like below.

Login failed for user ‘Domain\user’. Reason: Server is in single user mode. Only one administrator can connect at this time. [CLIENT: xx.xx.xx.xx]

Now what do we do? Below is how I overcame this problem.


Continue reading…

Shortcut: Creating Install media for SQL Server 2008 (any edition) + Service pack – Slip Stream method

Why do we need this?

By default, you might be having the stock media package which will give you a SQL server without the latest service pack. You will have to install service pack separately after installing the instance (Double work and time consuming). So if you follow below method you can update your install media with the latest service pack so that you can directly install SQL server + latest service pack in one shot. This method is also called as slip stream.

Prerequisites

Here lets take the example of adding Service Pack 2 to a SQL Server 2008 Enterprise Edition x64 install media.

  1. SQL Server 2008 Install Media.
  2. x86,ia64 and x64 versions of Executable for latest Service pack. They can be downloaded at http://www.microsoft.com/download/en/details.aspx?id=12548. Download all three files listed below.
    • SQLServer2008SP2-KB2285068-IA64-ENU.exe
    • SQLServer2008SP2-KB2285068-x64-ENU.exe
    • SQLServer2008SP2-KB2285068-x86-ENU.exe

Procedure

  1. Create a new folder name D:\SQL2008EEPlusSP2 and extract/copy all the files of the install media to that folder. Now you will have below list of files and folders in that New Folder.
    • ia64 (Folder)
    • x64 (Folder)
    • x86 (Folder)
    • autorun.inf
    • MediaInfo.xml
    • Microsoft.VC80.CRT.manifest
    • msvcr80.dll
    • Readme.htm
    • setup.exe
    • setup.rll

Continue reading…

Changing SQL Server Collation on a SQL Server 2008 Failover Cluster

  1. Log-in to the active node.
  2. Trigger a full backup for all System and User Databases.
  3. Script out all log-ins.
  4. If there are any user databases, you will have to export the tables using BCP utility.
  5. Copy SQL Server 2008 install media folder to some local directory. For Eg: D:\SQL2008SP2
  6. Open command prompt and execute below command. Caution: This step will replace your current system databases with new ones with required collation. So please make sure you will be able to restore all logins and the user databases back after this activity.
    D:\SQL2008SP2\Setup.exe /QUIET /ACTION=REBUILDDATABASE
    /INSTANCENAME=MSSQLSERVER
    /SQLSYSADMINACCOUNTS=”DOMAIN\ntid” /SAPWD=strongpassword
    /SQLCOLLATION=New_Collation_Name

    Note: Please replace the values for /INSTANCENAME, /SQLSYSADMINACCOUNTS, /SAPWD and /SQLCOLLATION

    Here you go !. Your SQL server has got new collation settings now. Please let me know if incase you experienced any issues.

  7. Now restore all logins and userdatabases using the scripts generated in step 3 and the tables exported in Step 4.

Reference: http://msdn.microsoft.com/en-us/library/ms179254.aspx