Problem attaching mdf and log files

Aleks
Aleks used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Sreedhar VengalaSr. Consultant - Business Intelligence

Commented:
Add your user account to the System Administrator role. I suspect your account does not have the necessary permissions.

Author

Commented:
How do I do that  ?  

I have mixed mode and logging in with the admin user of windows
Sr. Consultant - Business Intelligence
Commented:
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.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Top Expert 2012

Commented:
Make sure the mdf and ldf are on the same server as SQL Server Express.

Author

Commented:
They are in the same computer. Ill try running SQL Management as admin ...

Author

Commented:
Running the SQL Management as admin worked .. go figure !

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial