SQL Server itself has data import operations. However, if you want to import data from a backup file, you need to perform other operations. The following is an example.
There is already a DOE database on the SQL Server and there is a large amount of data in it. Now we are going to prepare another backup file A1.BAK (not the backup file of the DOE database) import other data (that is, add some data tables to the DOE after the import, the table has already recorded data), and keep the data of the original DOE unchanged.
1. First, create a temporary database A1.
2. Right-click Database A1 and choose all tasks> Restore database.
3. In the "Restore database" window, select "Slave Device ".
4. Click "select device ".
5. Click "add ".
6. Select the database file to be restored from the file name, such as A1.BAK.
7. Click "OK" and return to the "Restore database" window.
8. Click the "options" tab to go to option settings.
9. Select "Force restore on existing database ".
10. Change "move to physical file name" to "c: \ a1.ldf" and "c: \ a1.mdf ".
11. Click OK to import the data in the backup file to the temporary database A1.
12. Now, you can import data from A1. (The following data import and export operations are the general data import and export operations of SQL2000 Enterprise Manager .)
13. Select the "DOE" database in "SQL Enterprise Manager.
14. Right-click the DOE database and choose all tasks> import data.
15. In the "DTS import/export wizard" window, "Select data source", select the temporary database A1. Click Next.
16. In "select target", the system is already a DOE database by default.
17. Click "Next" until it is complete.
After the above operations, you have successfully imported the data in the backup file A1.BAK into the DOE database, and the original data of the DOE database remains unchanged. In this case, you can delete the temporary database A1.