Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

acces denied resurect data base sql server (create from files on Hard DISK)

Posted on 2013-06-01
2
Medium Priority
?
483 Views
Last Modified: 2013-06-01
Hi,


I am now on MDX
I need a DB to reurrect oh sorry to create from this instruction




CREATE DATABASE AdventureWorksDW2012 ON
(FILENAME = 'C:\Users\David\Desktop\SQL-TO-MDX\2012\AdventureWorksDW2012_Data.mdf'),
(FILENAME = 'C:\Users\David\Desktop\SQL-TO-MDX\2012\AdventureWorksDW2012_Log.ldf') FOR ATTACH;


but I have this message acces denied


Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "C:\Users\David\Desktop\SQL-TO-MDX\2012\AdventureWorksDW2012_Data.mdf" failed with the operating system error 5(Accès refusé.).


Can sopme one tell me what I can do to allow the acces that is here denied.


Whatever instruction for authorization??? Please.





Best DIL
0
Comment
Question by:DavidInLove
[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
2 Comments
 
LVL 71

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 39212640
The Users subfolders are protected against access from other users than the owner. Your AdventureWorks DB is in your own Desktop folder, but the MSSQL service doesn't run with your account, so it has no access privilege. I recommend to move the files to a different, more public location. In particular having those files on the desktop is a bad idea.
Most folks tend to create root level folders for DBs, something like c:\MsSql\Data\, and store the DB files there.
0
 

Author Closing Comment

by:DavidInLove
ID: 39212800
Praised the LORD  Qlemo,

I can say that is true that Obsessed by programming languages ("I learned them all" -) ).

Now it is available Ihave put it on the USB KKKEEYYYYYYYY!!!!!!!!
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

719 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