User Tools

Site Tools


computing:windows:mssql_backup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
computing:windows:mssql_backup [2022/02/10 07:11]
gcooper
computing:windows:mssql_backup [2022/02/10 07:42] (current)
gcooper
Line 1: Line 1:
 ====== Microsoft SQL Server Backup ====== ====== Microsoft SQL Server Backup ======
 +
 +**SQL Backup Background**: https://wiki.ahsay.com/doku.php?id=public:microsoft_sql_database
  
 **Download SQL Server Management Studio**: https://msdn.microsoft.com/library/mt238290.aspx **Download SQL Server Management Studio**: https://msdn.microsoft.com/library/mt238290.aspx
  
-<note tip>In general, it is simpler and easier to restore a complete backup (single file) than a differential (multiple file) backup.  If your backup window and storage permit, you might choose to implement full, complete, single file backups every night.</note>+<note tip>In general, it is **simpler and easier to restore a complete backup** (single file) than a differential or log backup (multiple file).  If your backup window and storage permit, you might choose to implement full, complete, single file backups every night.</note>
  
 ===== Database Restore ===== ===== Database Restore =====
  
-<note important>Many MSSQL backup systems (like Ahsay) will only restore the files required for you to perform the actual database recovery.</note>+**[[https://blog.sqlauthority.com/2010/03/21/sql-server-fix-error-3117-the-log-or-differential-backup-cannot-be-restored-because-no-files-are-ready-to-rollforward |Log vs. Differential Restores]]** 
 + 
 +<note important>Many MSSQL backup systems (like Ahsay) **will only restore the files required for you to perform the actual database recovery**.</note> 
 + 
 +<note tip>It is convenient to use the **Microsoft SQL Server Management Studio** to perform the actual database recovery.</note> 
 + 
 +<note important>When performing a recovery, it is important to **order the files properly** for a successful recovery.</note> 
 + 
 +==== MSSQL Management Studio ====
  
-<note tip>It is convenient to use the Microsoft SQL Server Management Studio to perform the actual database recovery.</note>+**Restore a Database Backup Using SSMS**: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/restore-a-database-backup-using-ssms?view=sql-server-ver15
  
-[[https://blog.sqlauthority.com/2010/03/21/sql-server-fix-error-3117-the-log-or-differential-backup-cannot-be-restored-because-no-files-are-ready-to-rollforward/Log vs. Differential Restores]]+==== Transact-SQL ====
  
-It is convenient to use the Microsoft SQL Server Management Studio to perform the actual database recovery.+|RESTORE DATABASE database_name FROM full_database_backup WITH NORECOVERY |complete database backup      | 
 +|RESTORE DATABASE database_name FROM differential_backup WITH NORECOVERY  |differential database backup 
 +|RESTORE DATABASE database_name FROM log_backup WITH NORECOVERY           |oldest log backup             | 
 +|RESTORE DATABASE database_name FROM log_backup WITH NORECOVERY           |next chronological log backup | 
 +|...                                                                      |in chronological order        | 
 +|RESTORE DATABASE database_name FROM log_backup WITH NORECOVERY           |last log backup               | 
 +|RESTORE DATABASE database_name WITH RECOVERY                             |recover the database          |
  
 ===== Database Recovery Models ===== ===== Database Recovery Models =====
computing/windows/mssql_backup.1644502316.txt.gz · Last modified: 2022/02/10 07:11 by gcooper