- Select the Master database.
USE Master
GO - Restore the latest full back up with REPLACE and RECOVERY option
RESTORE DATABASE RESTORE_COSTSHEET
FROM DISK = 'e:\backup_201007282300.bak'
WITH REPLACE,NORECOVERY; - Restore all deferential backups except last one
RESTORE DATABASE RESTORE_COSTSHEET
FROM DISK = 'e:\201006110800.incr'
WITH NORECOVERY; - Restoration of Last back up file should be like this.
RESTORE DATABASE RESTORE_COSTSHEET
FROM DISK = 'e:\201006111200.incr'
WITH RECOVERY;
Jul 29, 2010
Restoring Deferential backups in SQL Server (T-SQL)
In my previous post I demonstrated, how to restore deferential backups with SQL Management Studio. In this post, I'll show the same thing with T-SQL.
Jul 26, 2010
Restoring Deferential backups in SQL Server
Did you have ever restored a SQL data base? If you are a developer probably not. With this post I'm going to show how to restore deferential backups step by step.
- One important thing, to restore deferential backups, you need to have latest full backup and subsequent deferential backups.
Go to the SQL Server Management Studio, and select "Restore Database..." option by right clicking on Databases node in the Object Explorer. Follow the steps as shown in following screen shot. - Select "Options" from the left of the dialog and select the following option.
- Now, note your data base's status has been changed to "Restoring".
- Restore the number of subsequent deferential backups, except the last one, only with "RESTORE WITH NORECOVERY" option on.
- Restore last backup with default values of the option dialog box. That is with "RESTORE WITH RECOVERY" option. And also note the database status has changed back to normal.
Figure 1 |
Figure 2 |
Figure 3 |
Considerations:
- This demonstration was done with SQL Server 2005 with SP2
- Adhere necessary procedures with you company if you are going touch live data base.
Subscribe to:
Posts (Atom)
MEC: How to Set Message Counter for EDI Message
When you sending/creating EDI messages it is necessary to include unique message interchange number. This is to ensure each message that we ...
-
In this post, I'm going to explain the step-by-step approach to configuring the popular development tool Postman to test/execute Inf...
-
You will find many posts/videos about this topic, but I intend to guide you step-by-step with more information to comprehend and also re...
-
It is a very common scenario to integrate/trigger your workflow with an external application. With the help of ION APIs, we can do this. ...