When we attaching database to the server we may get below error -
Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'XXX-XX--XX'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2500.0+((KJ_PCU_Main).110617-0038+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Directory lookup for the file "G:\SQLLOG\NAV_D_CQPA_370B_Log.ldf" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft SQL Server, Error: 5133)
------------------------------
We can fix this error as below -
some time system will tale the Log file(.ldf) randomly which does not exist in the path. so
Check for the file path during attach. Delete the selected file then try to attach the database again.
some time system will tale the Log file(.ldf) randomly which does not exist in the path. so
Check for the file path during attach. Delete the selected file then try to attach the database again.
Now System creates the log files automatically.
No comments:
Post a Comment