Could anyone please help me to understand this code under SQL-Server Job
steps. One of the step having this process and I am not getting its process behavior with Type - "Operating System (CmdExe)
" and Run-as - "SQL Server Agent Service Account
".
Also, What is the actual role of these Type
& Run-as
in option?
Run as
defines the proxy account to be used to run this step. Proxy accounts defines a security context in which this job step runs. Each proxy corresponds to a security credential. For example, if you try to execute a copy command with CmdExec
type, you must use a credential (e.g. Windows user account) that has rights to read the source file and rights to write in the destination folder.
Job steps can be different types:
Executable programs and operating system commands.
Transact-SQL statements, including stored procedures and extended stored procedures.
PowerShell scripts.
Microsoft ActiveX scripts.
Replication tasks.
Analysis Services tasks.
Integration Services packages.
Each type is executed differently. T-SQL scripts are sent to the database engine, executable programs (CmdExec) starts external programs (e.g. copy
to copy files, or DTSRun to run a DTS package outside of SQL Server, as in your example), etc.