Hallengren @DatabasesInParallel sql_message_id 50000 in sysjobhistory table












2















Just implemented Ola's Parallel execution for backups, integrity checks and index maintenance. Everything appears to be running great but I am seeing sql_message_id 50000 in the sysjobhistory table for the new executions. I am also seeing [SQLSTATE 01000] on each line of the job output files. Is this normal behavior? I can't seem to find any in-depth documentation online.










share|improve this question





























    2















    Just implemented Ola's Parallel execution for backups, integrity checks and index maintenance. Everything appears to be running great but I am seeing sql_message_id 50000 in the sysjobhistory table for the new executions. I am also seeing [SQLSTATE 01000] on each line of the job output files. Is this normal behavior? I can't seem to find any in-depth documentation online.










    share|improve this question



























      2












      2








      2








      Just implemented Ola's Parallel execution for backups, integrity checks and index maintenance. Everything appears to be running great but I am seeing sql_message_id 50000 in the sysjobhistory table for the new executions. I am also seeing [SQLSTATE 01000] on each line of the job output files. Is this normal behavior? I can't seem to find any in-depth documentation online.










      share|improve this question
















      Just implemented Ola's Parallel execution for backups, integrity checks and index maintenance. Everything appears to be running great but I am seeing sql_message_id 50000 in the sysjobhistory table for the new executions. I am also seeing [SQLSTATE 01000] on each line of the job output files. Is this normal behavior? I can't seem to find any in-depth documentation online.







      ola-hallengren






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 9 hours ago







      Jeff Gerew

















      asked Jan 10 at 21:12









      Jeff GerewJeff Gerew

      114




      114






















          1 Answer
          1






          active

          oldest

          votes


















          3














          The Message 50000 in msdb.dbo.Sysjobhistory is intended.



          Take part of Ola Hallengren's index optimize procedure:[dbo].[IndexOptimize], part of the integrity checks: [dbo].[DatabaseIntegrityCheck] or part of the backup procedure: [dbo].[DatabaseBackup], the same RAISERROR() Statements will be shown:



            SET @StartMessage = 'Date and time: ' + CONVERT(nvarchar,@StartTime,120)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Server: ' + CAST(SERVERPROPERTY('ServerName') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + CAST(SERVERPROPERTY('ProductVersion') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Edition: ' + CAST(SERVERPROPERTY('Edition') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Platform: ' + @HostPlatform
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Procedure: ' + QUOTENAME(DB_NAME(DB_ID())) + '.' + QUOTENAME(@SchemaName) + '.' + QUOTENAME(@ObjectName)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Parameters: ' + @Parameters
          SET @StartMessage = REPLACE(@StartMessage,'%','%%')
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + @VersionTimestamp
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Source: https://ola.hallengren.com' + CHAR(13) + CHAR(10) + ' '

          RAISERROR(@StartMessage,10,1) WITH NOWAIT


          The RAISERRROR()'s are going to be executing when the procedure runs.



          Looking into the history, we see the 'error's' shown:



          select message From msdb..sysjobhistory 
          where sql_message_id =50000


          Result



          Executed as user: DOMAINtest. ...0000)  Server: test [SQLSTATE 01000] (Message 50000)  Version: 12.0.5546.0 [SQLSTATE 01000] (Message 50000) ...


          With the same Server and Version info as defined in the previous T-SQL examples.



          Why does the 'error' start at 50000?



          It starts at 50000, because starting from 50000 and upwards is where user generated errors can be defined.



          Why are there raiserror()'s in the procedures?



          My opinion is that the RAISERRROR() is added to add additional information to the history DMV, as to know what is being executed, and have additional information without it being a mess. It gives you control over what will be shown.



          I will leave more in depth reasoning to Ola himself.



          Subsequentially the history is added to the SSMS Job Activity monitor that we (Most of us) know and use:
          enter image description here



          So to answer the question, it is coded into the proc with reasoning behind it.





          RAISERROR() 50000 default example



          You can only generate custom errors with raiserrror when using an error number starting from 50000.



          Testing with a job, with no specific error number:



          enter image description here



          Result:



          enter image description here



          Starts at 50000.






          share|improve this answer





















          • 4





            This is normal for T-SQL job steps in SQL Server Agent.

            – Ola Hallengren
            Jan 11 at 21:10






          • 4





            I am using RAISERRROR in the stored procedures to print information about what the stored procedure is doing. I am using RAISERRROR ... WITH NOWAIT instead of PRINT to assure that the text is printed immediately.

            – Ola Hallengren
            Jan 11 at 21:14











          • Thank you @OlaHallengren

            – Jeff Gerew
            9 hours ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f226835%2fhallengren-databasesinparallel-sql-message-id-50000-in-sysjobhistory-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          The Message 50000 in msdb.dbo.Sysjobhistory is intended.



          Take part of Ola Hallengren's index optimize procedure:[dbo].[IndexOptimize], part of the integrity checks: [dbo].[DatabaseIntegrityCheck] or part of the backup procedure: [dbo].[DatabaseBackup], the same RAISERROR() Statements will be shown:



            SET @StartMessage = 'Date and time: ' + CONVERT(nvarchar,@StartTime,120)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Server: ' + CAST(SERVERPROPERTY('ServerName') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + CAST(SERVERPROPERTY('ProductVersion') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Edition: ' + CAST(SERVERPROPERTY('Edition') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Platform: ' + @HostPlatform
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Procedure: ' + QUOTENAME(DB_NAME(DB_ID())) + '.' + QUOTENAME(@SchemaName) + '.' + QUOTENAME(@ObjectName)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Parameters: ' + @Parameters
          SET @StartMessage = REPLACE(@StartMessage,'%','%%')
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + @VersionTimestamp
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Source: https://ola.hallengren.com' + CHAR(13) + CHAR(10) + ' '

          RAISERROR(@StartMessage,10,1) WITH NOWAIT


          The RAISERRROR()'s are going to be executing when the procedure runs.



          Looking into the history, we see the 'error's' shown:



          select message From msdb..sysjobhistory 
          where sql_message_id =50000


          Result



          Executed as user: DOMAINtest. ...0000)  Server: test [SQLSTATE 01000] (Message 50000)  Version: 12.0.5546.0 [SQLSTATE 01000] (Message 50000) ...


          With the same Server and Version info as defined in the previous T-SQL examples.



          Why does the 'error' start at 50000?



          It starts at 50000, because starting from 50000 and upwards is where user generated errors can be defined.



          Why are there raiserror()'s in the procedures?



          My opinion is that the RAISERRROR() is added to add additional information to the history DMV, as to know what is being executed, and have additional information without it being a mess. It gives you control over what will be shown.



          I will leave more in depth reasoning to Ola himself.



          Subsequentially the history is added to the SSMS Job Activity monitor that we (Most of us) know and use:
          enter image description here



          So to answer the question, it is coded into the proc with reasoning behind it.





          RAISERROR() 50000 default example



          You can only generate custom errors with raiserrror when using an error number starting from 50000.



          Testing with a job, with no specific error number:



          enter image description here



          Result:



          enter image description here



          Starts at 50000.






          share|improve this answer





















          • 4





            This is normal for T-SQL job steps in SQL Server Agent.

            – Ola Hallengren
            Jan 11 at 21:10






          • 4





            I am using RAISERRROR in the stored procedures to print information about what the stored procedure is doing. I am using RAISERRROR ... WITH NOWAIT instead of PRINT to assure that the text is printed immediately.

            – Ola Hallengren
            Jan 11 at 21:14











          • Thank you @OlaHallengren

            – Jeff Gerew
            9 hours ago
















          3














          The Message 50000 in msdb.dbo.Sysjobhistory is intended.



          Take part of Ola Hallengren's index optimize procedure:[dbo].[IndexOptimize], part of the integrity checks: [dbo].[DatabaseIntegrityCheck] or part of the backup procedure: [dbo].[DatabaseBackup], the same RAISERROR() Statements will be shown:



            SET @StartMessage = 'Date and time: ' + CONVERT(nvarchar,@StartTime,120)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Server: ' + CAST(SERVERPROPERTY('ServerName') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + CAST(SERVERPROPERTY('ProductVersion') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Edition: ' + CAST(SERVERPROPERTY('Edition') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Platform: ' + @HostPlatform
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Procedure: ' + QUOTENAME(DB_NAME(DB_ID())) + '.' + QUOTENAME(@SchemaName) + '.' + QUOTENAME(@ObjectName)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Parameters: ' + @Parameters
          SET @StartMessage = REPLACE(@StartMessage,'%','%%')
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + @VersionTimestamp
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Source: https://ola.hallengren.com' + CHAR(13) + CHAR(10) + ' '

          RAISERROR(@StartMessage,10,1) WITH NOWAIT


          The RAISERRROR()'s are going to be executing when the procedure runs.



          Looking into the history, we see the 'error's' shown:



          select message From msdb..sysjobhistory 
          where sql_message_id =50000


          Result



          Executed as user: DOMAINtest. ...0000)  Server: test [SQLSTATE 01000] (Message 50000)  Version: 12.0.5546.0 [SQLSTATE 01000] (Message 50000) ...


          With the same Server and Version info as defined in the previous T-SQL examples.



          Why does the 'error' start at 50000?



          It starts at 50000, because starting from 50000 and upwards is where user generated errors can be defined.



          Why are there raiserror()'s in the procedures?



          My opinion is that the RAISERRROR() is added to add additional information to the history DMV, as to know what is being executed, and have additional information without it being a mess. It gives you control over what will be shown.



          I will leave more in depth reasoning to Ola himself.



          Subsequentially the history is added to the SSMS Job Activity monitor that we (Most of us) know and use:
          enter image description here



          So to answer the question, it is coded into the proc with reasoning behind it.





          RAISERROR() 50000 default example



          You can only generate custom errors with raiserrror when using an error number starting from 50000.



          Testing with a job, with no specific error number:



          enter image description here



          Result:



          enter image description here



          Starts at 50000.






          share|improve this answer





















          • 4





            This is normal for T-SQL job steps in SQL Server Agent.

            – Ola Hallengren
            Jan 11 at 21:10






          • 4





            I am using RAISERRROR in the stored procedures to print information about what the stored procedure is doing. I am using RAISERRROR ... WITH NOWAIT instead of PRINT to assure that the text is printed immediately.

            – Ola Hallengren
            Jan 11 at 21:14











          • Thank you @OlaHallengren

            – Jeff Gerew
            9 hours ago














          3












          3








          3







          The Message 50000 in msdb.dbo.Sysjobhistory is intended.



          Take part of Ola Hallengren's index optimize procedure:[dbo].[IndexOptimize], part of the integrity checks: [dbo].[DatabaseIntegrityCheck] or part of the backup procedure: [dbo].[DatabaseBackup], the same RAISERROR() Statements will be shown:



            SET @StartMessage = 'Date and time: ' + CONVERT(nvarchar,@StartTime,120)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Server: ' + CAST(SERVERPROPERTY('ServerName') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + CAST(SERVERPROPERTY('ProductVersion') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Edition: ' + CAST(SERVERPROPERTY('Edition') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Platform: ' + @HostPlatform
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Procedure: ' + QUOTENAME(DB_NAME(DB_ID())) + '.' + QUOTENAME(@SchemaName) + '.' + QUOTENAME(@ObjectName)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Parameters: ' + @Parameters
          SET @StartMessage = REPLACE(@StartMessage,'%','%%')
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + @VersionTimestamp
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Source: https://ola.hallengren.com' + CHAR(13) + CHAR(10) + ' '

          RAISERROR(@StartMessage,10,1) WITH NOWAIT


          The RAISERRROR()'s are going to be executing when the procedure runs.



          Looking into the history, we see the 'error's' shown:



          select message From msdb..sysjobhistory 
          where sql_message_id =50000


          Result



          Executed as user: DOMAINtest. ...0000)  Server: test [SQLSTATE 01000] (Message 50000)  Version: 12.0.5546.0 [SQLSTATE 01000] (Message 50000) ...


          With the same Server and Version info as defined in the previous T-SQL examples.



          Why does the 'error' start at 50000?



          It starts at 50000, because starting from 50000 and upwards is where user generated errors can be defined.



          Why are there raiserror()'s in the procedures?



          My opinion is that the RAISERRROR() is added to add additional information to the history DMV, as to know what is being executed, and have additional information without it being a mess. It gives you control over what will be shown.



          I will leave more in depth reasoning to Ola himself.



          Subsequentially the history is added to the SSMS Job Activity monitor that we (Most of us) know and use:
          enter image description here



          So to answer the question, it is coded into the proc with reasoning behind it.





          RAISERROR() 50000 default example



          You can only generate custom errors with raiserrror when using an error number starting from 50000.



          Testing with a job, with no specific error number:



          enter image description here



          Result:



          enter image description here



          Starts at 50000.






          share|improve this answer















          The Message 50000 in msdb.dbo.Sysjobhistory is intended.



          Take part of Ola Hallengren's index optimize procedure:[dbo].[IndexOptimize], part of the integrity checks: [dbo].[DatabaseIntegrityCheck] or part of the backup procedure: [dbo].[DatabaseBackup], the same RAISERROR() Statements will be shown:



            SET @StartMessage = 'Date and time: ' + CONVERT(nvarchar,@StartTime,120)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Server: ' + CAST(SERVERPROPERTY('ServerName') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + CAST(SERVERPROPERTY('ProductVersion') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Edition: ' + CAST(SERVERPROPERTY('Edition') AS nvarchar(max))
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Platform: ' + @HostPlatform
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Procedure: ' + QUOTENAME(DB_NAME(DB_ID())) + '.' + QUOTENAME(@SchemaName) + '.' + QUOTENAME(@ObjectName)
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Parameters: ' + @Parameters
          SET @StartMessage = REPLACE(@StartMessage,'%','%%')
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Version: ' + @VersionTimestamp
          RAISERROR(@StartMessage,10,1) WITH NOWAIT

          SET @StartMessage = 'Source: https://ola.hallengren.com' + CHAR(13) + CHAR(10) + ' '

          RAISERROR(@StartMessage,10,1) WITH NOWAIT


          The RAISERRROR()'s are going to be executing when the procedure runs.



          Looking into the history, we see the 'error's' shown:



          select message From msdb..sysjobhistory 
          where sql_message_id =50000


          Result



          Executed as user: DOMAINtest. ...0000)  Server: test [SQLSTATE 01000] (Message 50000)  Version: 12.0.5546.0 [SQLSTATE 01000] (Message 50000) ...


          With the same Server and Version info as defined in the previous T-SQL examples.



          Why does the 'error' start at 50000?



          It starts at 50000, because starting from 50000 and upwards is where user generated errors can be defined.



          Why are there raiserror()'s in the procedures?



          My opinion is that the RAISERRROR() is added to add additional information to the history DMV, as to know what is being executed, and have additional information without it being a mess. It gives you control over what will be shown.



          I will leave more in depth reasoning to Ola himself.



          Subsequentially the history is added to the SSMS Job Activity monitor that we (Most of us) know and use:
          enter image description here



          So to answer the question, it is coded into the proc with reasoning behind it.





          RAISERROR() 50000 default example



          You can only generate custom errors with raiserrror when using an error number starting from 50000.



          Testing with a job, with no specific error number:



          enter image description here



          Result:



          enter image description here



          Starts at 50000.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 10 at 22:27

























          answered Jan 10 at 22:09









          Randi VertongenRandi Vertongen

          1,847316




          1,847316








          • 4





            This is normal for T-SQL job steps in SQL Server Agent.

            – Ola Hallengren
            Jan 11 at 21:10






          • 4





            I am using RAISERRROR in the stored procedures to print information about what the stored procedure is doing. I am using RAISERRROR ... WITH NOWAIT instead of PRINT to assure that the text is printed immediately.

            – Ola Hallengren
            Jan 11 at 21:14











          • Thank you @OlaHallengren

            – Jeff Gerew
            9 hours ago














          • 4





            This is normal for T-SQL job steps in SQL Server Agent.

            – Ola Hallengren
            Jan 11 at 21:10






          • 4





            I am using RAISERRROR in the stored procedures to print information about what the stored procedure is doing. I am using RAISERRROR ... WITH NOWAIT instead of PRINT to assure that the text is printed immediately.

            – Ola Hallengren
            Jan 11 at 21:14











          • Thank you @OlaHallengren

            – Jeff Gerew
            9 hours ago








          4




          4





          This is normal for T-SQL job steps in SQL Server Agent.

          – Ola Hallengren
          Jan 11 at 21:10





          This is normal for T-SQL job steps in SQL Server Agent.

          – Ola Hallengren
          Jan 11 at 21:10




          4




          4





          I am using RAISERRROR in the stored procedures to print information about what the stored procedure is doing. I am using RAISERRROR ... WITH NOWAIT instead of PRINT to assure that the text is printed immediately.

          – Ola Hallengren
          Jan 11 at 21:14





          I am using RAISERRROR in the stored procedures to print information about what the stored procedure is doing. I am using RAISERRROR ... WITH NOWAIT instead of PRINT to assure that the text is printed immediately.

          – Ola Hallengren
          Jan 11 at 21:14













          Thank you @OlaHallengren

          – Jeff Gerew
          9 hours ago





          Thank you @OlaHallengren

          – Jeff Gerew
          9 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f226835%2fhallengren-databasesinparallel-sql-message-id-50000-in-sysjobhistory-table%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          الفوسفات في المغرب

          Four equal circles intersect: What is the area of the small shaded portion and its height

          بطل الاتحاد السوفيتي