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)

100+
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: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00. 3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo. ExceptionTemplates.FailedOperationExceptionText&Ev tID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

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: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00 .1399&EvtSrc=MSSQLServer&EvtID=5173&LinkId=20476

------------------------------
BUTTONS:

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


100+
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.