Recently, I often need to back up the official database data. I have been using EXCEL to back up data some time ago. It is too troublesome to see. Later I thought about how to back up the certificate library to the test environment, which can be used during testing. (Used when the database volume is small ....)
The process is simple:
1. Open the Import and Export Wizard of SQL Server.
2. Select the source database.
3. Select the target database
4. Select the table to be synchronized
5. Select the check box to clear the table before synchronization and enable ID column insertion.
6. Select save package
7. Specify the path
8. Complete
Note: To back up a table, you must first have the same data table and database.
Save it as cmd. Next time you can click batch processing to synchronize the database,
Set Path = c: \ Program Files \ Microsoft SQL Server \ 100 \ DTS \ binn
Set Path = c: \ Program Files (x86) \ Microsoft SQL Server \ 100 \ DTS \ binn
Set Path = c: \ Program Files \ Microsoft SQL Server \ 110 \ DTS \ binn
Set Path = c: \ Program Files (x86) \ Microsoft SQL Server \ 100 \ DTS \ binn
Dtexec/F exportdata. dtsx/Conn "sourceconnectionoledb"; "\" Server = 10. xxxx; database = sicidb; uid = xxx; Pwd = xxx \ ""/Conn "destinationconnectionoledb"; "\" Server = 10. xxxx; database = sicidb_back; uid = xxx; Pwd = XXXX \""
Pause