Sunday, March 11, 2012

Backup problem

Sorry if i am in wrong place. i read http://msdn2.microsoft.com/en-us/library/aa225964(SQL.80).aspx

the 1st two commond successfully executed

USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_2',
'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_2.dat'

--Create the log backup device.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwindLog1',
'c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwindLog1.dat'

But following command gave me an error which is in the last of this post (red colored)

-- Back up the full MyNwind database.
BACKUP DATABASE test TO MyNwind_2

-- Update activity has occurred since the full database backup.

-- Back up the log of the MyNwind database.
BACKUP LOG test
TO MyNwindLog1

Msg 3201, Level 16, State 1, Line 11
Cannot open backup device 'MyNwind_2(c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyNwind_2.dat)'. Operating system error 5(Access is denied.).

The c:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\

is valid location (i mean this folder exists)

Hi,

if you are using SQL Server Authentication you are authentication on the folder level with the Serice Account which is actually running the SQL Server Service. Make sure this one has the appropiate permissions to access the file path and create files in that folder. Using Windows Authentication will use the credentials of the current user to get access to the path, make then sure this your user has the appropiate permissions. WHat you have to keep in mind is, that the path you are provding here is a local server path, notone of the actual computer you are sending the query from (if you are using a client and do not work directly on the server). You will make sure that the path exists on the executing server.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

No comments:

Post a Comment