Solved

Problem attaching mdf and log files

Posted on 2014-03-04
6
285 Views
Last Modified: 2014-03-04
I am trying to attach a database to my sql server. both the mdf and the ldf files.

I point to them and when I click OK I get an error that "Access is denied  Error: 5120)

What should I do ?  I tried copying to different folder, I tried importing into a different computer, no luck.

Using MS SQL 2009 R2 Express, they are all the same version.
0
Comment
Question by:amucinobluedot
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:Sreedhar Vengala
ID: 39905111
Add your user account to the System Administrator role. I suspect your account does not have the necessary permissions.
0
 

Author Comment

by:amucinobluedot
ID: 39905157
How do I do that  ?  

I have mixed mode and logging in with the admin user of windows
0
 
LVL 9

Accepted Solution

by:
Sreedhar Vengala earned 500 total points
ID: 39905166
If the user account already part of adminstrator role.  Try with below:

Perfom "run as administrator" for SQL Server Management Studio and try attaching the database.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39905214
Make sure the mdf and ldf are on the same server as SQL Server Express.
0
 

Author Comment

by:amucinobluedot
ID: 39905257
They are in the same computer. Ill try running SQL Management as admin ...
0
 

Author Comment

by:amucinobluedot
ID: 39905260
Running the SQL Management as admin worked .. go figure !
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now