Problem with LDF files ( database log file )
-
Hi there . I have a problem with SqlServer 2005 Log file . I have an application and i want to attach my database to SqlServer , I did it by SqlConnection and ConnectionString ,in many times it gives me an error. I know that when we use AttachDbFilename property in Connection for attach DB we don't need database log file, But most of times it gives me this error:
"Unable to open physical file 'filpath_log.LDF'. Operation system error 5: "5(error not found)". Could not open new database 'DbName'. CREATE DATABASE is aborted. Cannot attach the file 'FilPath.mdf' as database 'DbName'. File activation failure. The physical file name 'filpath_log.LDF' may be incorrect. The log cannot be rebuilt when the primary file is read-only.'
I wonder to say sometimes attachment works but sometimes not. I already did this attachment process with SQLServer 2000 and it never gives me error .DMASTER