Solved

Problem attaching mdf and log files

Posted on 2014-03-04
6
295 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL: Get Holding Day Based On Transfer Date And Return Date 13 76
Database ERD 4 32
query optimization 6 15
SQL Recursion 6 22
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

820 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