Solved

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

Posted on 2013-06-01
2
476 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 69

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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…
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

777 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