Restore SQL Server DB without transaction log

后端 未结 5 1863
既然无缘
既然无缘 2021-02-06 20:30

Given a SQL Server 2008 .bak file, is there a way to restore the data file only from the .bak file, without t

5条回答
  •  一向
    一向 (楼主)
    2021-02-06 21:01

    This may not work since you have no control over the generation of the .bak file, but if you could convince your source to detach the database and then send you a copy of the .mdf file directly, you could then attach the .mdf and your server would automatically create a new empty transaction log file.

    See sp_detach_db and sp_attach_db (or CREATE DATABASE database_name FOR ATTACH depending on your sql server version).

提交回复
热议问题