Bug in SQL 2019 - Error writing Log Shipping job history

  • Has anyone come across this bug, and if so have they found a fix for it? From what we can see the error is in a stored proc that seems to be in the Resource Database, and we don't have visibility on it. While Log Shipping still works, we have found without the Log History being written, we start getting "Log Shipping out of sync" alerts as soon as we hit the out of sync time, with no way of stopping it other than disabling the alerts. It looks like this exists in 2017 as well, and word is Microsoft are not in a hurry to fix it.

    Message

    2019-11-28 09:15:01.28 *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

    2019-11-28 09:15:01.28 *** Error: Failed to convert parameter value from a SqlGuid to a String.(System.Data) ***

    2019-11-28 09:15:01.28 *** Error: Object must implement IConvertible.(mscorlib) ***

    2019-11-28 09:15:01.28 Retrieving backup settings. Primary ID: '8e691816-9019-4e62-aab1-fb1ccf86144b'

    2019-11-28 09:15:01.28 *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

    2019-11-28 09:15:01.28 *** Error: Failed to convert parameter value from a SqlGuid to a String.(System.Data) ***

    2019-11-28 09:15:01.28 *** Error: Object must implement IConvertible.(mscorlib) ***

    2019-11-28 09:15:01.30 Retrieved backup settings. Primary Database: 'DBName', Backup Directory: 'H:\SQLLogDumps\DBName\', Backup Retention Period: 4320 minute(s), Backup Compression: Server Default

    2019-11-28 09:15:01.30 *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***

    2019-11-28 09:15:01.30 *** Error: Failed to convert parameter value from a SqlGuid to a String.(System.Data) ***

    2019-11-28 09:15:01.30 *** Error: Object must implement IConvertible.(mscorlib) ***

    Leo
    Nothing in life is ever so complicated that with a little work it can't be made more complicated.

  • I'm having the same problem and I am very agreeing that this is a bug.

    Topics I wrote : https://www.sqlservercentral.com/forums/topic/log-shipping-agent-error-message

    https://social.msdn.microsoft.com/Forums/en-US/82446ed1-7001-436f-9c38-217f9a9d5a0f/log-shipping-in-sqlserver2019-error?forum=sqldatabaseengine

    We hope the issue will be fixed soon. But now i'm thinking about downgrading because of this issue.

    Thanks to Leo.Miller.

    • This reply was modified 4 years, 4 months ago by  sidewing.
    • This reply was modified 4 years, 4 months ago by  sidewing.
  • I have been told by Microsoft will be fixed in CU2.

    I have the same problem and as we monitor msdb.dbo.log_shipping_monitor_secondary I wrote the following work around to the SQL 2019 error, which updates the monitoring table.

    I can not update the info for last copied file so I just update it to the same as the last restored file which I get from msdb..restorehistory.

    I hope it helps you:

    UPDATE ms SET

    last_restored_file = B.physical_device_name,

    last_restored_date = B.restore_date,

    last_restored_date_utc = B.restore_date_utc

    ,

    last_copied_file = B.physical_device_name,

    last_copied_date = B.restore_date,

    last_copied_date_utc = B.restore_date_utc

    FROM msdb.dbo.log_shipping_monitor_secondary ms JOIN (

    SELECT rs.destination_database_name, RestoreBuFamily.physical_device_name, rs.restore_date, rs.restore_date as restore_date_utc

    FROM msdb..restorehistory rs JOIN (

    SELECT [destination_database_name], MAX(restore_history_id) AS MAX_restore_history_id

    FROM msdb..restorehistory

    WHERE restore_type = 'L'

    GROUP BY [destination_database_name]

    ) AS A

    ON rs.restore_history_id = A.MAX_restore_history_id

    and rs.[destination_database_name] = A.[destination_database_name]

    LEFT JOIN msdb.dbo.backupset RestoreSet with (nolock)

    ON rs.backup_set_id = RestoreSet.backup_set_id

    LEFT JOIN msdb.dbo.backupmediafamily RestoreBuFamily with (nolock)

    ON RestoreBuFamily.media_set_id = RestoreSet.media_set_id

    ) as B

    ON ms.secondary_database = B.destination_database_name

     

  • I had the same issue, but I can`t manage it still.

  • Update to CU8 , to fix it..

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply