用tsql 还原数据库备份,覆盖原有数据库文件。
declare db as nvarchar 50; set db=“hn37” use master alter database hn37 set offline with rollback immediate; restore database hn37 from disk=e\mb.bak with replace alter database hn37 set online with rollback immediate;