Solved

SQL Express 2008 R2 cannot attach database

Posted on 2010-08-30
4
1,233 Views
Last Modified: 2012-05-10
Hello Experts,

I have a server that has SQL Server Express 2008 R2 installed. The location of the database is D:\Database. When I detach the database using Microsoft SQL Server management Studio, and try to reattach, I am unable to view the database in the "Locate Database Files" windows. I am able to see the D: drive and the databases folder but the application does not see the database and I receive an error even when I enter the database name.

It seems that I am only able to reattach a database that resides on the C: drive. Is there I can reattach my database located on the D: drive? The interesting thing is that I am able to expand the C: drive folders but not on the D: drive.
0
Comment
Question by:katredrum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Expert Comment

by:tvPrasad
ID: 33561620
It looks like an security issue.

You can try sql to attach your database to see detailed error

      CREATE DATABASE <database_name, sysname, your_database_name>
            ON PRIMARY (FILENAME = '<database_primary_file_path,,C:\Program files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Data\your_database_name.MDF>')
            FOR ATTACH
GO
0
 
LVL 9

Accepted Solution

by:
shalabhsharma earned 500 total points
ID: 33561624
run the mssqlserver services under local sytem and restart the service and check it again if the problem still persist foryou.

0
 
LVL 1

Author Comment

by:katredrum
ID: 33561676
tvprasad, where do I enter those commands you listed? I am a newbie with SQL.

shalabhsharma, I will change user to "local system" and let you know if it resolved the issue.
0
 
LVL 1

Author Closing Comment

by:katredrum
ID: 33562120
Perfect.
0

Featured Post

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

718 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