By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,636 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

Unable to attach DB (MSSQL 2005)

P: 384
I'm getting this error when i try to attach a DB:
TITLE: Microsoft SQL Server Management Studio

Attach database failed for Server 'RA-VECTEST'. (Microsoft.SqlServer.Smo)

For help, click: 3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo. ExceptionTemplates.FailedOperationExceptionText&Ev tID=Attach+database+Server&LinkId=20476


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup. (Microsoft SQL Server, Error: 5173)

For help, click: .1399&EvtSrc=MSSQLServer&EvtID=5173&LinkId=20476


Sep 29 '08 #1
Share this Question
Share on Google+
1 Reply

P: 384
Got it sorted, i removed the .LDF file and attached the .MDF file and let the DB create a new .LDF file.
Sep 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.