Restore a database that does not exist in SQL Server 2000

Source: Internet
Author: User
Recently, in vs2005 Professional Tutorial network, some people often ask how to restore a database that has not yet been established through backup files. Therefore, I wrote this tutorial in particular. The following is the original article:
Sometimes, after we download some source code, the database that comes with the source code is provided in the form of backup files. At this time, we need to restore the database on the local database server. The specific steps are as follows: for example, the name of the database file to be restored is vs2005sample. DB, which is stored in the Enterprise Manager in F:
1. Create a database named "vs2005sample"

2. Right-click the database and restore the database for all tasks.

3. Select "Slave Device" in the "General" tab"
4. Select "select device"

5. In the pop-up dialog box, select "add ..."

6. Fill in the path of the backup file (including the file name) in the "file name" input box)

7. Click "OK" and "OK"
8. Select "Force restore on existing database" in the "options" tab"
9. In the following file list, change the path from "move to physical file name" to the database file path of vs2005sample.

10. Click "OK" to restore

Note:

When restoring a database, you must ensure that the database is not currently in use. You can clear the database connection before the backup. The specific method is as follows:
1. Right-click vs2005sample, all tasks, and detach the database.

2. Click "clear ".

3. In the pop-up prompt box, "This will end all active transactions in the database so that the database can be separated. Continue ?" Click "OK"

4. In the "Notify user..." dialog box, click "no"

5. Click "cancel. (Note: You must click Cancel, otherwise it will be truly separated !!!)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.