Sunday 30 December 2018

Steps type in sql server agent job

A job step is an action that the job takes on a database or a server. Every job must have at least one job step.
   

Job steps can be:
·         ActiveX Script
·         Operating System (cmdExec)
·         PowerShell
·         Replication Distributor
·         Replication Merge
·         Replication Queue Reader
·         Replication Transaction-Load Reader
·         Replication Snapshot
·         SQL Server Analysis Services Command
·         SQL Server Analysis Services Query
·         SQL Server Integration Services Package
·         Transact-SQL Script(T-SQL)

ActiveX Script
With the help of this type, we can execute VBScript or JScript.


PowerShell
We can run PowerShell
   

SQL Server Analysis services
We can run the analysis services command or Query (DAX or MDX) query. Here we need to identify the OLAP server name and Script.


SQL Server Integration services
When we are creating an Integration Services package job step, we must do the following:
·         Identify the source of the package.
·         Identify the location of the package.
·         If configuration files are required for the package, identify the configuration files.
·         If command files are required for the package, identify the command files.
·         Identify the verification to use for the package. Identify the data sources for the package.
·         Identify the log providers for the package.
·         Specify variables and values to set before running the package.
·         Identify execution options.
·         Add or modify command-line options


 Package source may be as below
    

Transact-SQLript(T-SQL)
We need to select the database name
  

And write the SQL query.
Replication Job Steps
When we create publications and subscriptions using replication, replication jobs are created by default. The type of job created is determined by the type of replication (snapshot, transactional, or merge) and the options used.
·         Replication job steps activate one of these replication agents:
·         Snapshot Agent (Snapshot job)
·         Log Reader Agent (LogReader job)
·         Distribution Agent (Distribution job)
·         Merge Agent (Merge job)

·         Queue Reader Agent (QueueReader job)

2 comments:

If you have any doubt, please let me know.

Popular Posts