误操作引起的恢复方法:

1,备份事务日志

backup log dbName to disk='fileName'
2,恢复以前的全库备份
restore database dbName from disk='fileName' with norecovery
3,恢复最后一个日志备份到指定时间点
restore log dbName from disk='fileName'
with stopat='date_time'

4.恢复数据库状态

RESTORE DATABASE dbName WITH RECOVERY

 

 

灾难恢复方法:

1.备份当前日志尾部

BACKUP LOG dbName TO DISK='fileName' WITH INIT,NO_TRUNCATE

2.恢复以前的全库备份

restore database dbName from disk='fileName' with norecovery

3.恢复事务日志

restore log dbName from disk='fileName' with norecovery

4.恢复数据库状态

RESTORE DATABASE dbName WITH RECOVERY

 

相关文章:

  • 2022-12-23
  • 2021-09-23
  • 2021-09-22
  • 2021-09-20
  • 2021-08-08
  • 2021-10-01
  • 2021-05-21
  • 2022-02-16
猜你喜欢
  • 2021-08-16
  • 2021-11-03
  • 2021-09-03
  • 2021-07-07
  • 2021-04-23
  • 2021-12-27
相关资源
相似解决方案