Log Shipping failing.

  • 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?

  • 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

  • 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..

  • Have you set up a proxy account for the job(s)?

    Gerald Britton, Pluralsight courses

  • 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

  • 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" 😉

  • 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

  • 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.

  • 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

  • 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.

  • 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" 😉

  • 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?

  • when the backup job fails, what are the error messages?

    Gerald Britton, Pluralsight courses

  • 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

  • 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