question

PBAKER avatar image
PBAKER asked

Cannot attach a database mdf extension missing also no ldg file

Trying to attach a database that I had previously uploaded to AWS s3 bucket using the cli sync cmd and noticed that I had failed to upload the lgd and that the mdf extension is missing. I downloaded the database and tried to attach it and received this message "The file you have specified is not a valid SQL server database file. I tried adding the .mdf extension but the results are the same. The file looks to be the correct size as I have another copy about a week old and they are close to the same size I am rebuilding a crashed server and it would be nice to have the more recent file. The older copy was also on AWS s3 and it had the mdf extension and the ldg file and it attaches with no issues Any help with how to fix this will be greatly appreciated.
failedmdfattach
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

PBAKER avatar image
PBAKER answered
I was rebuilding a crashed server and I tried restoring the databases again and they indeed were backup files. I believe the first time I tried to restore I had not attached an older copy and the restore failed but after attaching the older databases the restore worked Don't send a boy to do a man's job! Thanks for helping!
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Wilfred van Dijk avatar image
Wilfred van Dijk answered
The file-extension is only for humans, not for MSSQL. You can create a datafile with every extension you want (but this is not advisable). To summarize your problem: you can attach the database within AWS, but not to a local MSSQL intance?
6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

PBAKER avatar image PBAKER commented ·
I have not tried to attach it in AWS - just using AWS for backup - don't think this was a backup file (.bak extension) just an upload of an off line database file - but could be wrong about that
0 Likes 0 ·
PBAKER avatar image PBAKER commented ·
Microsoft SQL 2000 is the SQL server
0 Likes 0 ·
JohnM avatar image JohnM PBAKER commented ·
You're attempting to attach a database coming from AWS onto a SQL 2000 server?
0 Likes 0 ·
PBAKER avatar image PBAKER PBAKER commented ·
No I use AWS for storage backup. All of the other versions are ok but on this one day I have 4 databases with the same issue. Of course this is the newest version
0 Likes 0 ·
PBAKER avatar image PBAKER commented ·
issue solved Thanks for everyones help!
0 Likes 0 ·
JohnM avatar image JohnM PBAKER commented ·
What was the solution?
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.