|
--Basic steps to create a job through the wizard
(1) Enterprise Manager-->Management-->SQL Server Agent-->Jobs
(2) Right-click the job --> New job
(3) "General" tab
-->Enter the job name in "Name"
-->If you don't want the job to run immediately after creation, clear the "Enable" check box
For example, if you want to test a job before running on schedule, disable the job.
-->If the job only runs on this server, click the "Target the local server" option
-->If the server is the main server and the job is running on other servers, click the "Target multiple servers" option
-->Enter the description of the job function in the "Description" box, the maximum number of characters is 512
(4) "Step" tab --> New
-->Enter the step name in "step name"
-->Select "Transact-SQL Script (TSQL)" in "Type"
-->"Database" select the database to execute the command
-->Enter the statement to be executed in "Command": For example, EXEC stored procedure name...
-->OK
(5) "Scheduling" Tab --> New Schedule
-->Enter the schedule name in "Name"
-->Select the execution method of your job in "Scheduling Type"
(If you choose "Repeat", you can click "Change" to set the way you repeat the job)
(6) Start the SQL Agent service and set it to start automatically, otherwise your job will not be executed
--Open SQL SERVER Service Manager-->Click "Start/Continue"-->The service will be started automatically when the OS is started
--Or My Computer-->Control Panel-->Administrative Tools-->Services-->Right-click SQLSERVERAGENT-->Properties-->Startup Type-->Select "Auto Start"-->OK. |
|