Limitations and Restrictions
- To create a job, a user must be a member of one of the SQL Server Agent fixed database roles or the sysadmin fixed server role. A job can be edited only by its owner or members of the sysadmin role.
- Assigning a job to another login does not guarantee that the new owner has sufficient permission to run the job successfully.
- Local jobs are cached by the local SQL Server Agent. Therefore, any modifications implicitly force SQL Server Agent to re-cache the job. Because SQL Server Agent does not cache the job until sp_add_jobserver is called, it is more efficient to call sp_add_jobserver last.
Security
- You must be a system administrator to change the owner of a job.
- For security reasons, only the job owner or a member of the sysadmin role can change the definition of the job. Only members of the sysadmin fixed server role can assign job ownership to other users, and they can run any job, regardless of the job owner.
- If you change job ownership to a user who is not a member of the sysadmin fixed server role, and the job is executing job steps that require proxy accounts (for example, SSIS package execution), make sure that the user has access to that proxy account or else the job will fail.
To create a SQL Server Agent job
- In the Object Explorer, click the plus sign to expand the server where you want to create a SQL Server Agent job.
- Click the plus sign to expand SQL Server Agent.
- Right-click the Jobs folder and select New Job….
- In the New Job dialog box, on the General page, modify the general properties of the job. For more information on the available options on this page, see Job Properties / New Job (General Page)
- On the Steps page, organize the job steps. For more information on the available options on this page, see Job Properties / New Job (Steps Page)
- On the Schedules page, organize schedules for the job. For more information on the available options on this page, see Job Properties / New Job (Schedules Page)
- On the Alerts page, organize the alerts for the job. For more information on the available options on this page, see Job Properties / New Job (Alerts Page)
- On the Notifications page, set actions for Microsoft SQL Server Agent to perform when the job completes. For more information on the available options on this page, see Job Properties / New Job (Notifications Page).
- On the Targets page, manage the target servers for the job. For more information on the available options on this page, see Job Properties / New Job (Targets Page).
- When finished, click OK.
.
0 comments:
Post a Comment