Solved

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

Posted on 2013-06-01
2
475 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
2 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 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

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

If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
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.

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now