June 29, 2015 at 11:18 am
I have configured Log Shipping, but every time the job runs, it fails. The error I receive is "Access is Denied".
The Agent is running under LocalSystem.
How would I grant access to LocalSystem to copy the backup file and restore it on the Secondary server?
June 29, 2015 at 11:20 am
You can't. The job needs to run with an agent proxy account that uses a Windows domain account with appropriate access.
Gerald Britton, Pluralsight courses
June 29, 2015 at 11:27 am
It fails even when I try to run the Agent as a "Venus" user. Venus user has all the access to different directories. I even restarted the agent but it is still failing..
June 29, 2015 at 11:53 am
Have you set up a proxy account for the job(s)?
Gerald Britton, Pluralsight courses
June 29, 2015 at 12:19 pm
Environment Details:
On the Primary Server:
Agent is running under LocalSystem
Backup job runs successfully everyday
Transactional Log job runs successfully every hour.
Index rebuild job runs successfully as well.
However, when I run the LSCOPY job, it fails. I don't know. If LocalSystem is an issue than other job would be failing as well.
This is how the Log shipping is setup for other environment as well with no issues at all
On the Primary Server:
Agent is running under LocalSystem
On the Secondary Server.
Agent is running under Venus
June 30, 2015 at 12:45 am
g.britton (6/29/2015)
You can't.
This is incorrect, you can. It's just not good practice.
You need to grant the computer account access to the share.
Chitown (6/29/2015)
I have configured Log Shipping, but every time the job runs, it fails. The error I receive is "Access is Denied".
Which job?
There are 3 jobs per LS plan!!
Chitown (6/29/2015)
The Agent is running under LocalSystem.How would I grant access to LocalSystem to copy the backup file and restore it on the Secondary server?
Both instances are running under local system?
Both instances on the same computer?
You'll need to provide a lot more info, not just simply "it won't work"!
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
June 30, 2015 at 6:21 am
Have you followed this:
If the SQL Server service account on your primary server runs under the local system account, you must create your backup folder on the primary server and specify a local path to that folder.
Gerald Britton, Pluralsight courses
June 30, 2015 at 8:43 am
g.britton (6/30/2015)
Have you followed this:If the SQL Server service account on your primary server runs under the local system account, you must create your backup folder on the primary server and specify a local path to that folder.
SQL Server Service is running under Network Service
Agent is running under Venus.
June 30, 2015 at 8:50 am
I have no idea what Venus is. However, you need to ensure that appropriate permissions are in place. Here's a simple way to find out:
Login to the "Venus" machine as Venus. can you read the log ship directory and data? (just try to open the directory and files in notepad).
Gerald Britton, Pluralsight courses
June 30, 2015 at 8:52 am
Perry Whittle
Which job?
There are 3 jobs per LS plan!!
Both instances are running under local system?
Both instances on the same computer?
You'll need to provide a lot more info, not just simply "it won't work"!
LS Backup job isn't running. Copy and Restore jobs are running fine.
Both instances are running under Network Service.
Both Instances are on different server.
On Primary server:
Agent was running under Local System but the backup job failed. Now the SQL Server Agent is running under Venus user who is an administrator and has full access to the backup folder, but the backup job is still failing.
On Secondary Server:
SQL Server Agent is running under Venus user who is an administrator and has full access to the backup folder and it is working just fine.
June 30, 2015 at 8:58 am
Chitown (6/30/2015)
LS Backup job isn't running. Copy and Restore jobs are running fine.
Ok, now we know where to target our efforts
Chitown (6/30/2015)
Both instances are running under Network Service.Both Instances are on different server.
When running under network service or local system the authentication on the network is performed by the computer account, the computer account needs privileges granted on any shares\folders\files
Chitown (6/30/2015)
running under Venus user who is an administrator and has full access to the backup folder.
How have you confirmed this, have you checked or just assuming that as an admin the share\folder is accessible?
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
June 30, 2015 at 9:03 am
g.britton (6/30/2015)
I have no idea what Venus is. However, you need to ensure that appropriate permissions are in place. Here's a simple way to find out:Login to the "Venus" machine as Venus. can you read the log ship directory and data? (just try to open the directory and files in notepad).
Venus is a user, created to run all sorts of jobs.
How and Where would I find this Log Ship Directory?
June 30, 2015 at 9:06 am
when the backup job fails, what are the error messages?
Gerald Britton, Pluralsight courses
June 30, 2015 at 10:15 am
g.britton (6/30/2015)
when the backup job fails, what are the error messages?
D:\Program Files\Microsoft SQL Server\MSSQL10_50.****\MSSQL\Log
June 30, 2015 at 10:24 am
Perry Whittle (6/30/2015)
Chitown (6/30/2015)
LS Backup job isn't running. Copy and Restore jobs are running fine.Ok, now we know where to target our efforts
Chitown (6/30/2015)
Both instances are running under Network Service.Both Instances are on different server.
When running under network service or local system the authentication on the network is performed by the computer account, the computer account needs privileges granted on any shares\folders\files
Please be patient with me since I 'm still at the learning stage, but how do I do this?
How have you confirmed this, have you checked or just assuming that as an admin the share\folder is accessible?
I have created this account, by going to Control Panel, User, Add user, gave this user administrator privileges.
I also gave this user full control on the directory.
Viewing 15 posts - 1 through 15 (of 15 total)
You must be logged in to reply to this topic. Login to reply