467,915 Members | 1,356 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Unable to attach DB (MSSQL 2005)

256MB
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
  • viewed: 5370
Share:
1 Reply
256MB
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.

Similar topics

1 post views Thread by Boro | last post: by
3 posts views Thread by 1388-2/HB | last post: by
1 post views Thread by grzegorz.gazda | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.