Link to home
Start Free TrialLog in
Avatar of Aleks
AleksFlag for United States of America

asked on

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.
Avatar of Sreedhar Vengala
Sreedhar Vengala
Flag of Australia image

Add your user account to the System Administrator role. I suspect your account does not have the necessary permissions.
Avatar of Aleks

ASKER

How do I do that  ?  

I have mixed mode and logging in with the admin user of windows
ASKER CERTIFIED SOLUTION
Avatar of Sreedhar Vengala
Sreedhar Vengala
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Anthony Perkins
Make sure the mdf and ldf are on the same server as SQL Server Express.
Avatar of Aleks

ASKER

They are in the same computer. Ill try running SQL Management as admin ...
Avatar of Aleks

ASKER

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