sql - how can i attach an MDF file to a server with the same LDF name? -
i have .mdf backup of database. need information .mdf.
when try attach .mdf, requires log file shipped.
i don't need log file, insists on .ldf file.
i tried point same log file shipped, getting error:

(since in use current version of database.)
i unable attach different server because on sql server 2012, , sql server 2012 server.
how reattach .mdf without .ldf?
i adding text version in case else searching solution issue:
msg 5120, level 16, state 101, line 1
unable open physical file "d:\sql logs....custom_log.ldf". operating system error 32: "32(the process cannot access file because being used process.)".
file activation failure. physical file name "d:\sql logs....custom_log.ldf" may incorrect.
log cannot rebuilt because there open transactions/users when database shutdown, no checkpoint occurred database, or database read-only. error occur if transaction log file manually deleted or lost due hardware or environment failure.msg 1813, level 16, state 2, line 1
not open new database 'testdb'. create database aborted.
i don't know if relevant, not need attach .mdf file if don't have to. need read 1 table there.
if use 2012 use "for attach_force_rebuild_log"
create database [xxxdatabasname] on ( filename = n'databasexxxfilepath.mdf' ) attach_force_rebuild_log
Comments
Post a Comment