Adding detailed transaction log file application throughput information to SQL Log

Stanislav Dinkelis 96 Reputation points
2021-05-17T18:05:52+00:00

I've spent quite a few time searching on the matter, no luck so far, decided to post my question here.

I wonder is there a way at all to add (concatenate) TLog (rollforward) application throughput (speed) detail to the existing information in SQL Log for Standby database.

That is, literally, this

"RESTORE LOG successfully processed 24011 pages in 1.264 seconds (148.403 MB/sec)."

to this

"
Message
Log was restored. Database: <a user database name>, creation date(time): 2018/02/16(01:17:50), first LSN: 47072:120299:1, last LSN: 47076:54786:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'<path>\<db_name>_backup_2021_05_17_170006_0460796.trn'}). This is an informational message. No user action is required
"

to be something like

"
Message
Log was restored. Database: <a user database name>, creation date(time): 2018/02/16(01:17:50), first LSN: 47072:120299:1, last LSN: 47076:54786:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'<path>\<db_name>_backup_2021_05_17_170006_0460796.trn'}). This is an informational message. No user action is required

RESTORE LOG successfully processed 24011 pages in 1.264 seconds (148.403 MB/sec).
"
?

Thank you!

Stan

SQL Server | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Stanislav Dinkelis 96 Reputation points
    2021-05-18T20:11:54.183+00:00

    Hi Amelia,

    Thank you!

    Stan

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AmeliaGu-MSFT 14,011 Reputation points Microsoft External Staff
    2021-05-18T06:39:31.877+00:00

    Hi StanislavDinkelis-7675,
    I haven't found a Trace Flag that can help add “RESTORE LOG successfully processed xxxxx pages in xxx seconds (xxx MB/sec)” message to the error log.
    I think we may not be able to add such message to error log, this may be by design.
    And it seems we only can view the “RESTORE LOG successfully processed xxxxx pages in xxx seconds (xxx MB/sec).” in the message when restoring log in T-SQL.
    97317-01.jpg

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.