Apr 13 2021 07:24 PM
Hello,
Apparently there is no way to remove the output produced by the BACKUP command.
You can use the trace flag 3226 to remove the writing to the SQL Server's log file, and use the option
WITH STATS = 100 to reduce the number of completion messages, but you will still have a 4 lines message :
100 percent processed.
Processed 680 pages for database 'myDB', file 'myDB' on file 1.
Processed 1 pages for database 'myDB', file 'myDB_log' on file 1.
BACKUP DATABASE successfully processed 681 pages in 1.272 seconds (4.177 MB/sec).
It's really a big problem when you are calling BACKUP command from a service broker queue. Indeed, in this case, you will find in the SQL Server's log file, these 4 lines (due to the fact that a service broker queue log everything wrote to the console output)
If someone can help me on that, it would be greatly appreciated.
Or if it's not possible to suppress these rows, is there a way to ask for a new option for the BACKUP command ?
Thanks in advance!
Feb 18 2023 10:36 AM