用T-SQL语句 实现一个数据库的完整复制:把DB数据库复制另一个 取名为DBTest

1、把DB数据库备份

backup database DB to disk='D:\DB.bak' with init    ----- 完全备份方式


2、然后恢复
restore database DBTest from disk='D:\DB.bak' 
with move 'DB' to 'e:\DB.mdf',
move 'DB_log' to 'e:\DB.ldf' ,
replace

这就完成了一个备份的方式

相关文章:

  • 2022-01-18
  • 2021-11-08
  • 2021-11-21
  • 2021-11-15
  • 2021-06-13
  • 2021-11-30
猜你喜欢
  • 2021-12-26
  • 2022-03-09
  • 2021-12-06
  • 2022-12-23
  • 2021-12-04
  • 2021-12-04
相关资源
相似解决方案