Showing posts with label Moving System DB’s in SQL Server. Show all posts
Showing posts with label Moving System DB’s in SQL Server. Show all posts

Thursday, January 27, 2011

Moving System DB’s in SQL Server


Moving System Dbs
------------------
 
* Moving system databases may be useful in the   following situations: 
 
1. Failure recovery
--------------------
For example, the database is in suspect mode or has shut down because of a hardware failure.
 
2. Planned relocation
---------------------
 
3. Relocation for scheduled disk maintenance
--------------------------------------------
 
Steps
--------
        * start server with /f /T3608
        * For msdb and model
               * Detach and move the files
               * Attach back
        * For master
               * Stop server
               * copy data and log files to new                location.
               * Go to startup parameters of SQL                     Server service in Configuration          Manager
               * Change the locations of data file and                 log file
               * Start SS
 
Note:
        To detach msdb the SQL Server Agent service           should not be in running.
 
 
Rebuilding System Dbs
---------------------
 
* System databases must be rebuilt to fix corruption     problems in the master, model, msdb,resource system   databases
* To modify the default server-level collation
 
For rebuilding system dbs
 
http://msdn.microsoft.com/en-us/library/dd207003.aspx