Query to get version of SQL Backup


When I run the master.dbo.sqlbackup stored procedure ,  the version appears in the results header (see picture).  Is there a way to pull this information as a value into a variable? Or is there a parameter that can be passed to the sqlbackup stored procedure to return the version?


I am trying to monitor the version of SQLBackup installed across our various servers and this would help a lot.

Tagged:

Best Answer

  • petey2petey2 Posts: 65 Silver 3
    edited October 14, 2019 12:13AM Accepted Answer
    We don't publicly release documentation for the sqbutility function.  If you want to find the licensing status for an instance, you can use this:
    <div>DECLARE @type INT
    <span style="background-color: transparent; color: inherit; font-size: inherit;"><font face="Roboto, Helvetica Neue, Arial, sans-serif">DECLARE @version varchar(16)</font>
    </span><span style="background-color: transparent; color: inherit; font-size: inherit; font-family: Roboto, "Helvetica Neue", Arial, sans-serif;">DECLARE @serial varchar(32)</span></div><div><br></div><div>EXEC master..sqbutility 1021, @type OUTPUT, @version OUTPUT, @serial OUTPUT
    <span style="background-color: transparent; color: inherit; font-size: inherit; font-family: Roboto, "Helvetica Neue", Arial, sans-serif;">SELECT @type, @version, @serial</span>
    </div>
    Possible values for @type:
    0 = expired trial
    1 = active trial
    2 = standard license
    3 = professional license
    SQL Backup - beyond compression

Answers

  • The version number returned in the result sets header is the version of the SQL Backup extended stored procedure library (xp_sqlbackup.dll) installed on the SQL Server instance.  There isn't a way to retrieve this information via a function.

    The version of the SQL Backup Agent service (SQBCoreService.exe) can be retrieved using the following:

    DECLARE @version varchar(16)
    EXEC master..sqbutility 1030, @version OUTPUT
    SELECT @version

    You might sometimes run into situations where the version of the extended stored procedure library differs from the SQL Backup Agent service e.g. when the extended stored procedure library was locked during an upgrade process.
    SQL Backup - beyond compression
  • BorisimoBorisimo Posts: 2 New member
    Thank you!  Is there more documentation available for the sqbutility stored procedure?   I was wondering if there is another query I can use to determine if SQLBackup is licensed or not on the server.
Sign In or Register to comment.