Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • Last Modified:

Problem attaching mdf and log files

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
Aleks
Asked:
Aleks
  • 3
  • 2
1 Solution
 
Sreedhar VengalaSr. Consultant - Business IntelligenceCommented:
Add your user account to the System Administrator role. I suspect your account does not have the necessary permissions.
0
 
AleksAuthor Commented:
How do I do that  ?  

I have mixed mode and logging in with the admin user of windows
0
 
Sreedhar VengalaSr. Consultant - Business IntelligenceCommented:
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
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
Anthony PerkinsCommented:
Make sure the mdf and ldf are on the same server as SQL Server Express.
0
 
AleksAuthor Commented:
They are in the same computer. Ill try running SQL Management as admin ...
0
 
AleksAuthor Commented:
Running the SQL Management as admin worked .. go figure !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now