Download presentation
Presentation is loading. Please wait.
1
SQL Server Agent All the Knobs You Need to Know
Taiob M Ali
2
About Me 10 Years as DBA MCSA SQL Server 2012 Certified MongoDB DBA
11 Years in Merchant Marine Education Naval Science and Computer Science
3
Agenda Agent Security Schedule when CPU Idle Job History Operators
Alerts Proxies
4
Security-Service Account
Should not run as Local System Account Run under domain account but not a member of local admin group Give privilege to “Log on as a service” How to do it?
5
Security-Users MSDB database roles SQLAgentUserRole SQLAgentReaderRole
SQLAgentOperatorRole Details
6
Agenda Agent Security Schedule when CPU Idle Job History Operators
Alerts Proxies
7
Job Schedule Skip a single run- do not disable job
An extra run- add an one time schedule One time job –Delete automatically. Changing standard schedules
9
Job Schedule- Idle CPU Schedule a job when CPU is idle
Create a definition of idle CPU Chose from “Schedule Type”
10
Job Schedule- Idle CPU Does not work out of the gate
CPU Idle definition control schedule Need custom solution
11
Interval in Seconds Running every 20 Secs—CPU IDLE Definition control job schedule Hour Interval Running every hour—Custom Solution; You control job schedule
12
CPU Idle condition meet Test Run every 20 sec
Job Run FIRE JOB
13
Control Job run every one hour
Disable Job Control Job run every one hour CPU Idle condition meet Test Run every 20 sec Job Run only if Enabled FIRE JOB Enable Job
14
DEMO– Schedule Job When CPU Idle
15
Agenda Agent Security Schedule when CPU Idle Job History Operators
Alerts Proxies
16
Job History …History is truncated
If bigger than 3998 char get truncated
17
Why does history get truncated?
20
Custom Solution More Options Per job category Per job
Different threshold for success/failure Default value Details: bit.ly/purgehistory
21
Driving table
22
Create two store procedures
One will drive DBA_sysjobhistory_driver One will do the purge DBA_sp_jobhistory_row_limiter
23
Schedule a job
24
Fail Safe 30 days
25
Agenda Agent Security Schedule when CPU Idle Job History Operators
Alerts Proxies
26
DEMO-Operators
27
Built in report 20 most frequently executed jobs
20 most frequently failing jobs 20 slowest jobs based Job Steps Execution History
28
Agenda Agent Security Schedule when CPU Idle Job History Operators
Alerts Proxies
29
Alert Powerful feature for monitoring SQL Server Event
Performance Condition WMI Event-added in 2005 Service broker must be enabled for MSDB Pager and net send options will be removed from SQL Server Agent in a future version of Microsoft SQL Server
30
DEMO ALERT
31
Agenda Agent Security Schedule when CPU Idle Job History Operators
Alerts Proxies
32
Proxies-when to Use Jobs are interacting with other network components or machines. .bat file PowerShell script
33
Proxies-How to set up Create a privileged account Create a credential Create a new proxy Use proxy in job step
34
DEMO Proxies
35
Resource Security Considerations - SQL Server Installation
SQL Server Agent Fixed Database Roles Script to create alerts by Glenn Berry Custom Category article by Tim Ford Scripts-custom job history retention Deadlock alert blog How to read Deadlock Graph
36
@SqlWorldWide linkedin.com/in/taiobali sqlworldwide.com
38
I am Thankful to Robert Padilla Mike Hillwig Adam Machanic
Jeremy Lowell Suneel Mundlapudi Ayman El-Ghazali Kenneth Fisher
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.