sql - Attach database using old .MDF file but current .LDF file -


i backed database 2 days ago (but have .mdf file , not .ldf file).

i want create different database on same server, using .mdf file (so can compare data between , 2 days ago). possible without having .ldf file 2 days ago, having current .ldf file? if can use current .ldf file, should use copy of file referenced current database?

or should forget current .ldf file , try restore without it, per attaching mdf file without ldf file?

if backed database best bet restore .bak file. while possible restore .mdf without corresponding log in no way sure bet, depends on state of database. can try options in attaching mdf file without ldf file , if doesn't work may need use emergency command (keep in mind last resort):

use [master]  go  alter database [mydatabase] set emergency  go  alter database [mydatabase] set single_user  go  dbcc checkdb ([mydatabase], repair_allow_data_loss)  go  alter database [mydatabase] set multi_user  go  alter database [mydatabase] set online  go 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -