| How to backup and restore database on Microsoft SQL Server 2005 |
Introduction
This post shows a step-by-step guide to backup and restore a database between two Microsoft SQL Server 2005 instances. By using backup, you can backup a database without interrupt any transactions on the database.
In the example below, I will backup a database from SQL Server 2005 and restore the database to another SQL Server 2005 Express Edition.
Step-by-step
Backup a database.
Now I will backup AdventureWorks database on BKKSQL2005 which runs Microsoft SQL Server 2005 to a file.
- Connect to source server. Open Microsoft SQL Server Management Studio and connect to BKKSQL2005.
- Right-click on the AdventureWorks database. Select Tasks -> Backup…

- On Back Up Database window, you can configure about backup information. If you’re not familiar these configurations, you can leave default values. Here are some short descriptions.
- Database - a database that you want to backup.
- Backup type - you can select 2 options: Full and Differential. If this is the first time you backup the database, you must select Full.
- Name - Name of this backup, you can name anything as you want.
- Destination - the file that will be backup to. You can leave as default. Default will backup to “C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup”.
- Click OK to proceed backup.
- Wait for a while and you’ll see a pop-up message when backup is finished.

- Browse to the destination, you’ll see a backup file (.bak format) which you can copy to other server for restore in the next step. Default backup directory is “C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup”.

Restore the database.
Next, I will restore the AdventureWorks database from a file that I’ve created above to BK01BIZ001 which runs Microsoft SQL Server Express Edition.
- Copy the backup file from source server to destination server. I’ve copied into the same directory as source server.

- Connect to destination server. Open Microsoft SQL Server Management Studio Express and connect to BK01BIZ001.
- Right-click on Databases. Select Restore Database…

- Restore Database window appears. On Source for restore, select From device and click [...] buttton to browse file.

- On Specify Backup, ensure that Backup media is “File” and click Add.

- On Locate Backup File, select the backup file. This is the backup file that was created in Backup a database section and was copied to this server. Click OK. OK.

- Back to Restore Database window.
- On Destination for restore, select “AdventureWorks”.
Note: If you haven’t added the backup file on Source before (step 4-6), you won’t see the database name on Destination. - On Source for restore, check the box in front of the backup name (in Restore column).
- Click OK.
- On Destination for restore, select “AdventureWorks”.
- Wait until restore finish and there’ll be a pop-up message notify.

- Now you’ll see the restored database on the destination SQL Server.

Related post
- Getting started with Microsoft Windows Server Update Services, Part VI: Disconnected network(2)
- How to backup and restore router configuration via TFTP
- Getting started with Microsoft Windows Server Update Services, Part VI: Disconnected network(1)
- Understanding Disk Fault Tolerance
- Accessing SQL Server on NetBeans using JDBC, Part I: Create a connection

























January 15th, 2008 at 5:07 am
Is it possible to restore to SQL Express from a SQL backup?
January 15th, 2008 at 9:04 am
Yes. The example above is restored to SQL Express Edition.
January 17th, 2008 at 7:38 pm
hi…… please send me inventory project
January 17th, 2008 at 11:15 pm
Hello, Priya
What do you mean “inventory project”? I don’t get it.
May 28th, 2008 at 10:50 pm
Thanks for the guide!
As an alternative and much more faster backup way I can suggest using LiteSpeed.
After implementing this solution we noted a decrease in server downtime while restoring databases more quickly. The space required for the backup archives were reduced as well because of using high levels of compression. For example, the backup size and the time needed for backup is about several times less than using native tools.
May 29th, 2008 at 3:53 am
You don’t happen to have a step-by-step for an incremental backup and restore by any chance?
Regards from Indianapolis, IN
May 30th, 2008 at 10:05 am
Sorry, I haven’t plan to write that. But for incremental backup, you can simply change backup type to ‘Differential’ on step 3.2 (Backup a database). When you restore, you’ll see the diffential backup set on step 7.2 (Restore the database).