5160 Errors Running on SQL2000

ChrisAVWoodChrisAVWood Posts: 361
edited April 1, 2008 3:50PM in SQL Backup Previous Versions

I have seen some instances where SQLBackup is returning a 5160 error. These are scheduled SQLAgent backup jobs. The error shows in the SQLAgent job history but the job does not even show up in the Red Gate GUI Activity History.

I searched the SQLBackup forums and KB and only see data about mutex's but I do not see that anywhere in my problem.

Firstly what is a 5160 error and how do I fix it?


English DBA living in CANADA


  • peteypetey Posts: 2,358 New member
    When a SQL Backup extended stored procedure is ran, SQL Server passes the command to the SQL Backup Agent service via a mapped file. SQL Server needs to obtain a 'lock' on this file, before it writes to that file, as the mapped file should be written to by only one process at any one time.

    Error 5160 indicates that SQL Server failed to get a lock on this file after waiting 5 seconds. Are you running a number of SQL Backup extended stored procedures simultaneously?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • Petey,

    We may have had a couple of other SQLBackup jobs running at that time. As this is SQL2000 it could be MemToLeave, which is only 128Mb on SQL2000. I have increased the MemToLeave on SQL2005 as we have had 1010 errors. Will increasing the MemToLeave help?


    English DBA living in CANADA
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi Chris,

    Probably not... but there is a guide to configuring the SQL Server MemToLeave on our website if you're interested.
  • Thanks Brian. As I mentioned I have had to use this with SQL2005 because of a number of CLR processes also using the same memory.

    I did look in the Redgate log and I see no entries when the failures happened. I will monitor the jobs on the server to see if it happens again.

    English DBA living in CANADA
  • Brian,

    What I have found is that a number of log backups may have collided with each other. I have now shifted the timing of some of the log backups.

    Thanks for your help

    English DBA living in CANADA
Sign In or Register to comment.