SQL 2008 R2 Express 如何用Delphi开发的程序恢复BAK备份 BAK 备份文件是SQL2000备份的,早先该BAK文件是通过以下语句恢复
use master
alter database DB set offline with rollback immediate
restore database DB from disk='D:\qqq.bak'
alter database DB set online with rollback immediate
use DB
------解决方案-------------------- ALTER DATABASE DB_1 SET SINGLE_USER WITH ROLLBACK IMMEDIATE
RESTORE DATABASE DB_1 FROM DISK = 'c:\2.bak'
WITH Replace, MOVE 'DB_Data' TO 'd:\Data\DB_1.mdf', MOVE 'DB_log' TO 'd:\Data\DB_log.mdf'
ALTER DATABASE DB_1 SET MULTI_USER
------解决方案--------------------
restore database DB from disk='D:\qqq.bak' with REPLACE