[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SQL 2008 detach then attach and db not found

Posted on 2011-04-20
5
Medium Priority
?
580 Views
Last Modified: 2012-05-11
I detached a db and then changed nothing and went to attach it back and it can't be found. The files now don't seem to have the correct file type associated with them. They were locked originally after detaching with the little lock button and by setting permissions to inherit from parent I was able to get that fixed but still they don't show up.
0
Comment
Question by:biotec
  • 3
  • 2
5 Comments
 
LVL 9

Expert Comment

by:sureshbabukrish
ID: 35434233
try to search dbname.mdf file with extension "mdf" in your system and once found, use it to re-attach
0
 

Author Comment

by:biotec
ID: 35434261
That's just it, I'm not sure it has the right .mdf extension. They don't seem to show up when searching for .mdf it's as if the system doesn't know what file type it is.
0
 
LVL 9

Accepted Solution

by:
sureshbabukrish earned 2000 total points
ID: 35434301
if you detach the db, your .mdf file should reside where it was earlier similar in this location
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

try here
0
 

Author Comment

by:biotec
ID: 35434311
I know where the file is. It is in the exact same location I originally installed it in. It's just not recognized.
0
 

Author Closing Comment

by:biotec
ID: 35434452
I had to add the file extension in by renaming the files. That is weird but it worked. Thanks
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question