Solved

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

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
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…

792 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