I. Cold Backup Recovery
1. net stop MSSQLSERVER # If the default DB instance that is installed shuts down SQL Server's database
2. Copy SQL Server data files are mainly MDF data files and the LDF disk files.
3. If the database takes a full log mode log file is more than the case, you can first process the log file.
1. Checkpoint
2. Task-Shrink-log file. Modify Size
3. Reports-Sort by disk size-Show all tables
4. Truncate the unwanted log tables and backup tables
5. Shrink MDF data file
4. Go to the database you want to restore to
SA Login Attach Database file
Note If you are prompted with a problem at this point, add the Everyone permission to the MDF and LDF files and change the read-only property
5. Global security access to the database The new user has the same name as the user before the backup was restored.
Open the SQL window for Query Analyzer
User Databaseschema Name
Execute sp_change_users_login ' update_one ', ' username ', ' username '
Associating a logged-in user with a database owner
Backup Recovery Complete
Two. Hot backup process.
Backing Up the database
Copy bak file
Recovering a Database
Adding SQL Server users
Execute SP Command
Complete.
SQL Server's simplest database recovery process with the same name.