Backup recovery SQLServer database by programming

xiaoxiao2021-03-06  26

Backup statement: BACKUP DATABASE [__ DataBaseName__] TO DISK = N '// LocalCoputerNameOrIP / ShareDocument / FileName.bat' WITH INIT, NOUNLOAD, NOSKIP, STATS = 10, NOFORMAT recovery statement: Restore DataBase [__ DataBaseName__] from disk = '// LocalCoputerNameOrIP /Sharedocument/filename.bat 'Use these two sentences to back up the database to the local unit. However, there are two points of precautions: 1. The directory must be established before use 2. This directory must be a fully shared directory usage: Parameter description: __ DatabaseName__ Database Name LocalComputernameorip Native computer name or IP address (of course, If you want to back up to other computers, you can specify other computers) Sharedocument shared folders' name filename.bat last backup file name

转载请注明原文地址:https://www.9cbs.com/read-65181.html

New Post(0)