Backup And Restore Database in SQL SERVER

Sriramnandha
Posted by Sriramnandha under Sql Server category on | Points: 40 | Views : 1994
Backup and Restore in SQL Server


Backup Database Employee to Disk='D\DatabaseBack\pubs.bak'

Restore Database Employee From Disk='D\DatabaseBack\pubs.bak'

Differential Backup:

Differential backups only backup the data pages that have changed since the last full backup.
Following is the SQL backup command to perform a differential backup:

BACKUP DATABASE Employee
TO DISK = 'C:\DatabaseBack\Employee .bak'
WITH DIFFERENTIAL


Full Backup:


Backup Database Employee to Disk='D\DatabaseBack\pubs.bak'

Init Backup:


BACKUP DATABASE Employee
TO DISK = 'C:\DatabaseBack\Employee .bak'
WITH INIT

Backup in Log:

Backup Log Employee
to Disk = 'C:\DatabaseBack\Employee_log .bak
'

Comments or Responses

Posted by: Samarmir on: 10/24/2011 Level:Starter | Status: [Member] | Points: 10
Hi
Thanks for the above tips.
How to you do a daily restore of a database.
For example if you have a database which you want to clear of all data (that is only inserted data like products names, prices etc., not table names or table relations etc.) and then restore with new fresh data from some kind of file, code etc. and you want to do it everyday at 01:00
How is this possible.


Login to post response