Tuesday, December 25, 2012

attaching DB without .ldf file ???

Looks like your Log file is not at the same location where your Data file is. By default it looks for log file location where your data file is, though you can change the path to locate for log file. Here is another way to rebuild the log file if you do not have one

CREATE DATABASE Sql_database2
ON 
(FILENAME = 'F:\MSSQL\\data\Sql_database2_data.mdf')

for ATTACH_REBUILD_LOG
GO

No comments:

Post a Comment