Warning 166: Failed to delete old entries in local history

BryantBryant Posts: 20 Bronze 2
edited January 18, 2008 10:28PM in SQL Backup Previous Versions
Yesterday afternoon my transaction log backup jobs started failing with the following message:
8/9/2007 8:03:41 AM: Warning 166: Failed to delete old entries in local history tables: Error running ExecFast command: Floating point division by zero.

I performed a DBCC CHECKDB on the msdb database and no errors were discovered. The backups appear to be running fine but the msdb cleanup is failing at the end of the job so I get a lot of job failure alerts in my mailbox.

I have SQL Backup Pro version 5.1.0.2781 running on a SQL Server 2000 default instance. Let me know if there is any other information that I can provide that will help you diagnose this better.

Thank you,
Bryant

Comments

  • peteypetey Posts: 2,358 New member
    The local history tables do not refer to the msdb tables, but rather the SQL Backup local data store, which is a SQL Server Compact Edition database. This file is located in <system drive>:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Data\<instance name> and is named data.sdf.

    Warning 166 is raised when old data in this database could not be raised. In your case, it appears that the SQL command to erase the data is invalid. At this point, I'm guessing that some bits of data are incomplete in the database, hence causing the error.

    I have sent you, via private message, instructions on how to turn on debugging to identify the offending SQL command.

    Your transaction log backup is fine, and so are the details in the msdb tables.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • BryantBryant Posts: 20 Bronze 2
    Running the backup manually (like below) cleared up the previous issue but I seem to have run into another problem with the SQL Backup Repository. This time I got a Warning 210 (error writing to backup file/System Error (the parameter is incorrect) with an Error 620 whenever the master database (and only the master db) was backed up via a job or through the SQL Backup GUI. Running the following backup statement via Management Studio (connected to a SQL 2000 instance) cleared up the problem again.
    EXEC master..sqlbackup '-sql "BACKUP DATABASE master TO DISK = &#91;E:\Data\MSSQL\Backup\master.sqb&#93; WITH INIT"'
    

    Any idea what might be causing this? I will send Pete a debug file after I submit this post to see what you can make of it. This server is getting old but we won't have everything moved to new equipment until at least April so I would like to see what can be done to prevent these issues in the future. I am wide open to the possibility that there is something goofy on this server and I can provide detailed server information to Red Gate support.
  • BryantBryant Posts: 20 Bronze 2
    It's back again this morning. It's creating a backup file but fails and leaves the file corrupt when run from a job or from the SQL Backup GUI. Running the backup manually (using the command above) creates a good backup.

    This is only occurring on the master database.
  • I am getting the same error/Warning (Warning 166), but running the task manually does not fix it. Is there a way that I can view this log data and remove whatever it is that is causing this issue?
  • peteypetey Posts: 2,358 New member
    There is a know issue with backups that are of a certain size, and will be addressed in the next release. In the interim, I believe you can contact our support department and request for an internal build.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.