UFN_SQLJOB_USEPOWERSHELLSCRIPT

Return

Return Type
bit

Definition

Copy


create function dbo.UFN_SQLJOB_USEPOWERSHELLSCRIPT()
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