UFN_SQLJOB_USEPOWERSHELL

Return

Return Type
bit

Definition

Copy


create function dbo.UFN_SQLJOB_USEPOWERSHELL()
returns bit
with execute as caller
as begin
  -- if SQL Server is 2016 or newer or ActiveX Proxy jobs were converted (USENEWPROXY = 1) 

  -- then return true, so future scheduled sql jobs get created using the new proxy

    if CONVERT(nvarchar(2),SERVERPROPERTY('productversion')) > 12
        return 1;            

    return (select SQLJOBSCONVERTED from dbo.INSTALLATIONINFO);
end