Click here to Skip to main content
Click here to Skip to main content

Tagged as

Backup and Restore SQL Server database

, 22 Nov 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
How to backup and restore SQL Server database schema
Say, we have a database named "Employee" in SQL Server. Now we want to backup the database and then restore the backup database file.
 
Execute the following SQL to backup Employee to Disk:
Backup Database Employee to Disk='D\DatabaseBack\emp_backup.bak'
 
After successfully backup, if we want to restore the backup(.bak) file, we have to execute the following SQL:
 
Restore Database Employee From Disk='D\DatabaseBack\emp_backup.bak' 
 
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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Ahmed Naqibul Arefin
Software Developer
Bangladesh Bangladesh
No Biography provided

Comments and Discussions

 
GeneralReason for my vote of 5 Complete and fruitful info PinmemberFaisal 201129-Dec-11 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.141022.2 | Last Updated 22 Nov 2011
Article Copyright 2011 by Ahmed Naqibul Arefin
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid