备份数据库,关于SQL server Management Studio备份,还原数据库很简单
backup database stu to disk='E:\hello.bak'
验证(返回由备份集内包含的数据库和日志文件列表组成的结果集。
restore filelistonly from disk='E:\hello.bak'
还原数据库
use master
restore database students from disk='E:\hello.bak' with
replace
restore database students from disk='E:\hello.bak' with
replace,
move 'sdfsdf' to 'E:\house0551\stu.mdf',//sdfsdf为逻辑文件名
move 'sdfdsfsdfdsf' to 'E:\house0551\stuu.ldf'
修改数据库逻辑文件名
alter database stu
modify file (name='book',newname='sdfsdf')
alter database stu
modify file(name='book_log',newname='sdfdsfsdfdsf')
3573

被折叠的 条评论
为什么被折叠?



