下面是编程之家 jb51.cc 通过网络收集整理的代码片段。
编程之家小编现在分享给大家,也给大家做个参考。
USE MASTER -- Add a new backup device -- Ensure that the sql Server can read from the physical location where the backup is placed -- TYPE NAME PHYSICAL LOCATION EXEC SP_ADDUMPDEVICE 'disk','networkdrive','\\VPCW2K8\Database Backup\Test.bak' -- Execute the Restore operation in VERIFY ONLY mode -- Provide the actual paths where you plan to restore the database. -- This is because VERIFYONLY also checks for available space RESTORE VERIFYONLY FROM networkdrive WITH MOVE N'TESTDB_DATA' TO N'E:\TestDB\TestDB_Data.mdf',MOVE N'TESTDB_INDEXES' TO N'E:\TestDB\TestDB_Idx.mdf',MOVE N'TESTDB_LOG' TO N'E:\TestDB\TestDB_LOG.ldf' -- DROP THE DEVICE -- Name,Physical File (OPTIONAL - if present,the file is deleted) EXEC SP_DROPDEVICE 'networkdrive'
以上是编程之家(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。
如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。