USE Master
GO
ALTER DATABASE CQMineOA SET OFFLINE WITH ROLLBACK IMMEDIATE
GO
restore database CQMineOA from disk = 'e:\CQMineOA.bak'
WITH MOVE 'CQMineOA' TO 'E:\db\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\CQMineOA.mdf',
MOVE 'CQMineOA_log' TO 'E:\db\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\CQMineOA.ldf',
replace,NOUNLOAD,STATS=10
GO
alter database CQMineOA set online
GO
sql offline and online
最新推荐文章于 2023-03-22 10:17:19 发布