Click here to Skip to main content
13,554,429 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


6 bookmarked
Posted 22 Nov 2011
Licenced CPOL

Backup and Restore SQL Server database

, 22 Nov 2011
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:

TO DISK = ‘C:\DatabaseBack\Employee .bak’


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


About the Author

Ahmed Naqibul Arefin
Software Developer
Bangladesh Bangladesh
No Biography provided

You may also be interested in...


Comments and Discussions

Generalhi sir i follow your given methodology and goted same probl... Pin
Rakesh Meel17-Feb-12 23:34
memberRakesh Meel17-Feb-12 23:34 
GeneralReason for my vote of 5 Complete and fruitful info Pin
Faisal 201129-Dec-11 1:25
memberFaisal 201129-Dec-11 1:25 
GeneralThis is very common problem of operation system security iss... Pin
Ahmed Naqibul Arefin23-Nov-11 5:30
memberAhmed Naqibul Arefin23-Nov-11 5:30 
GeneralCannot open backup device 'C:\Program Files\Microsoft SQL Se... Pin
Sunil Mane 00722-Nov-11 22:40
memberSunil Mane 00722-Nov-11 22:40 
GeneralRe: hi Sunil, this is very common problem of operation system se... Pin
Ahmed Naqibul Arefin23-Nov-11 5:31
memberAhmed Naqibul Arefin23-Nov-11 5:31 
GeneralRe: Try d:\emp_backup.bak I'm guessing the ...\Backup\D folder d... Pin
Member 831111628-Nov-11 17:56
memberMember 831111628-Nov-11 17:56 

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

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

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03-2016 | 2.8.180515.1 | Last Updated 22 Nov 2011
Article Copyright 2011 by Ahmed Naqibul Arefin
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid