• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 65
  • Last Modified:

Restore issue

SQL 2012 , I think I have an express install (doesn't say in @@version) and i'm trying to restore a db from a full version, I don't know if that's germane to the issue....but when I run :
USE [master]
RESTORE DATABASE [WebCMMS_DEV_EDFWB] 
From Disk=N'C:\DownloadedToKeep\EncaData\WebCMMS_DEV_EDFWB.bak'
WITH  FILE = 1,  
MOVE N'EDF_WBTQ4_7_9_8' TO N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WebCMMS_DEV_EDFWB.mdf',  
MOVE N'EDF_WBTQ4_7_9_8_log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WebCMMS_DEV_EDFWB_log.ldf',  
NOUNLOAD,  REPLACE,  STATS = 1
GO

Open in new window

I've got the list of files from running "restore filelistonly " , but the error i'm getting is :
The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WebCMMS_DEV_EDFWB.mdf'.
(The db doesn't exist on the target server....should it?)
0
Silas2
Asked:
Silas2
1 Solution
 
Scott PletcherSenior DBACommented:
That's usually a permissions error.  The account running SQL Server doesn't have permission to write to that directory.
0
 
Silas2Author Commented:
Thanks, that does seem to be running now.
I'm restoring to a non-program files folder, does SQL server mind that?
0
 
Brian CroweDatabase AdministratorCommented:
You just need to give the user that your SQL Server service is running under access to whatever folder you want to use.
0
 
Anthony PerkinsCommented:
SQL 2012 , I think I have an express install (doesn't say in @@version)
Do it this way:
SELECT SERVERPROPERTY('Edition')
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now