
Reconstructing Changes That Are Made After the Backup Was Created
If a user database was created after the restored backup of master, that user database is inaccessible until one of the following occurs:
-
The database is attached. We recommend this method.
Attaching a database requires that all of the database files are available and usable. We recommend specifying the log files, and also the data files, instead of having the attach operation try to rebuild the log file or files.
For information about how to attach a database, see How to: Attach a Database (SQL Server Management Studio) or CREATE DATABASE (Transact-SQL).
-
The database is restored from one or more backups.
Restore the database only if its data files or transaction log files no longer exist or are unusable.
Attaching or restoring a database, re-creates the necessary system table entries, and the database becomes available in the same state as before the master database was restored.
If any objects, logins, or databases, have been deleted after master is backed up, you must delete those objects, logins, and databases from master.
Important: |
|---|
|
If any databases no longer exist but are referenced in a backup of master that is restored, SQL Server may report errors when it starts, because it can no longer find those databases. Those databases should be dropped after the backup is restored.
|
When master has been restored and any changes have been reapplied, back up master immediately.
To start an instance of SQL Server in single-user mode
How to: Start an Instance of SQL Server (sqlservr.exe).
To restore the master database
To attach a database