Monday, December 13, 2010

How to Rebuild Master DB and Change Collation Settings for Already Installed SQL Server 2008 Instance

I want to share some bit of important information about,

·         How to Rebuild SQL 2008 Master DB
·         How to change SQL Server Collation Setting for already installed SQL 2008 Instance

Please follow the below  steps to Rebuild master database or change collation settings

1.       Login into server with admin id
2.       Open the directory where setup.exe is available in the server, generally it will be in C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release

3.       Go to command prompt and enter into C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release this directory

4.       Paste the below script into command line as it is,

setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME= MSSQLSERVER /SQLSYSADMINACCOUNTS= NA\hjadi604
/SQLCOLLATION=SQL_Latin1_General_CP850_CI_AI

Note 1- Before running above script first make sql server authentication mode as windows authentication if you don’t know SA password

/INSTANCENAME= MSSQLSERVER – If the instance is default or you can mention instance name if it is named
/SQLSYSADMINACCOUNTS= NA\hjadi604 – Provide account name which is having sysadmin privileges on sql server
/SQLCOLLATION=SQL_Latin1_General_CP850_CI_AI – Provide the collation name which you want to change

Note 2 – If you want rebuild master db only without changing the collation settings then don’t provide collation parameter

5.       Press enter, now it will start to rebuild

Note3 – After pressing enter button it will not display GUI, it will do rebuild internally

6.       After completion of rebuilding master database, it will not display any information in command prompt.

7.       After completion of rebuild, command prompt will display the main directory i,e C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release

8.       Once it is done go to summary.txt, this fill will be in C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log, in this file final result should be passed.

9.       Check the collation setting is changed,

10.   Now reboot the server and check after reboot everything is working fine.

No comments:

Post a Comment