Which Account Is Used When Executing Xp_cmdshell 'wmic ... "java -jar ..."'
I have a jar file that I want to run as a step in an SQL Job. However, the jar file has to run on machineA but the SQL job is schedule on serverA. To make this possible, in serverA
Solution 1:
xp_cmdshell runs under the security context of the SQL Server service account if the invoking login is a sysadmin role member. For non-sysadmin role members, xp_cmdshell runs under the security context of the xp_cmdshell proxy account.
Not sure why you are using T-SQL to invoke the process. Instead, consider using a CmdExec job step type to execute the command directly. You can specify the desired security context of the process in the job step configuration (SQL Server Agent service account or proxy). See https://msdn.microsoft.com/en-us/library/ms190264.aspx.
Post a Comment for "Which Account Is Used When Executing Xp_cmdshell 'wmic ... "java -jar ..."'"