The command to back up the database is:
Backup Database Test to disk = 'c: / test' with format, name = 'full backup of mynwind'
Explain as follows:
Backup Database Test - Test here is the database name to disk = 'c: / test' - The named database path with format, name = 'full backup of mynwind' - this is a note, it doesn't matter. . Just write.
The command to restore the database is:
Use masterstore database test_wt from disk = 'c: / test_wt'go explained:
Use master - Database GORESTORE DATABASE TEST_WT - Recovered Database Name from Disk = 'C: / Test_wt' - Local Hard Drive Path GO
Under C #, you only need to use the command command to recover the database. . Ha ha. . It has been studied for a long time today. I finally understand. It used the event viewer to intercept the SQL statement, always a little problem, not ideal. . Hey. . . Come on ~! ! !