Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem attaching mdf and log files

Posted on 2014-03-04
6
Medium Priority
?
319 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
[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
  • 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 2000 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

618 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