The master database is the system database that keeps track of user accounts, remote user accounts, remote servers, environment variables, system error messages, system databases, database storage allocation, devices, and active locks.
The setup program can be used to rebuild the master database. This rewrites the master database and resets the configuration values on its existing device. This process can also be used to change the server's character set or sort order.
Caution Rebuild the master database only when it is absolutely essential. Rebuilding the master database completely rewrites the master database, destroys all information added since SQL Server was first installed, and renders all other databases unusable. If you rebuild the master database, you must recreate the user databases, reload each database from the most recent dump, and then reapply any changes not included in the dump.
When rebuilding the master database, you have the option of changing the character set or sort order. Because the sort order is used to construct all indexes, including system indexes, all databases must be rebuilt if you change the sort order. The setup program rebuilds the master database for you, but you must rebuild user databases yourself.
If you must rebuild the master database or change the character set or sort order, follow this procedure.
Include all database objects. Also copy out lists of users.
A confirmation dialog box appears.
The Rebuild Options dialog box appears.
For information about the character sets provided with SQL Server, see Microsoft SQL Server Setup.
Important The sort order is used to construct all indexes, including system indexes. If you change the sort order, all databases must be rebuilt. The setup program rebuilds the master database for you, but you must rebuild user databases yourself.
For information about the sort orders provided with SQL Server, see Microsoft SQL Server Setup.
The SQL Server Installation Path dialog box appears.
The Rebuild Master Device dialog box appears.
The setup program rebuilds the master database.
For information about bcp, see Chapter 11, Exporting and Importing Data.
The files MASTER.DA@ and MASTER.AL@ are stored in the \SQL60\INSTALL directory. When installing SQL Server or rebuilding the master database, one of these two files is used. When the default sort order and character set are selected during an installation or a master database rebuild, MASTER.DA@ is expanded and copied onto the server, replacing MASTER.DAT. When an alternate character set and/or sort order is selected, MASTER.AL@ is expanded and copied onto the server, and several SQL scripts are run. Because of this, selecting the default character set and sort order results in a rapid master database rebuild. Choosing an alternate character set or sort order can result in a somewhat longer rebuild time.
Because of the introduction of one-way encrypted passwords with SQL Server 6.0, changing the sort order has an impact on the use of passwords. For information, see Microsoft SQL Server Setup.