通过restore database时重命名数据库rename database

backup database testdb to disk='c:\testdb_ful.bak' with compression

backup log testdb to disk='c:\testdb_ful.trn' with compression

restore filelistonly from disk='c:\testdb_ful.bak'

restore database newtestdb from disk='c:\testdb_ful.bak'
with move 'testdb' to 'c:\newtestdb.mdf'
,move 'testdb_log' to 'c:\newtestdb_log.ldf'
,replace,norecovery

restore database newtestdb from disk='c:\testdb_ful.trn'
with replace,recovery

posted @ 2016-05-17 18:11  两年十一时  阅读(436)  评论(0编辑  收藏  举报