Solved

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

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

759 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

17 Experts available now in Live!

Get 1:1 Help Now