750 likes | 881 Views
ASE134 Job Scheduler. Marion Morrison Sr. Software Engineer mmorriso@sybase.com / 303 413-4250 06/12/2003. What is Job Scheduler. ASE Self Management & Tuning Feature. A central component of Sybase’s self-management and resource tuning initiative and architecture
E N D
ASE134 Job Scheduler Marion MorrisonSr. Software Engineermmorriso@sybase.com / 303 413-425006/12/2003
What is Job Scheduler ASE Self Management & Tuning Feature • A central component of Sybase’s self-management and resource tuning initiative and architecture • Job creation and scheduling feature
Job Scheduler Benefits Reduces Total Cost of Operation • Improved Ease of Use • Replacement for UNIX Cron Jobs • System-wide Server Management • Time-Sensitive Scheduling • Sybase Central • Relief for DBAs • Write jobs in SQL, not OS-dependent scripts • Automated database management tasks • ASE tunes itself • More time for other DBA responsibilities • Complete logging of job results • Sybase Created and Certified Templates
Server ASE Plugin ASE ASE ASE Job Scheduler in Pictures Architecture: High-Level View Job Scheduler Server Target Server ASE JS Agent job info ASE JS Task job id scheduled job info job, schedule, admin data scheduled job info Stored Procedures sybmgmtdb c:\> sp_….
Job Scheduler Pieces Architecture Components • sybmgmtdb • JS Task • JS Agent • Stored procedure interface • ASE plugin interface • Templates
sybmgmtdb Job Scheduler’s Database • New internal database • Used by all Job Scheduler components • Holds definitions of Jobs and Schedules • Stores output from job execution
JS Task Job Scheduler’s Internal Monitor • Part of ASE internals • Controls JS Agent • Determines which jobs need to run and when • Passes job execution requests to JS Agent
JS Agent Job Control Engine • External Open Client process • Responds to Job execution requests from JS Task • Retrieves Job information from sybmgmtdb • Executes Job against the target ASE • Stores Job status and output in sybmgmtdb
Job Scheduler Interfaces Stored Procedures • Job Scheduler provides a collection of stored procedures for command-line management • Job and schedule management stored procedures have restricted permissions • Job results are accessible by the job owner and administrators
Job Scheduler Interfaces ASE Plugin • New Windows for Job Scheduler Management in ASE Plugin • Scheduled Jobs • Jobs • Schedules • Scheduling Jobs • Scheduled Jobs • Job History • Job Logs • Administration
Scheduled Jobs Finding JS in ASE
Jobs Add Job Wizard
Jobs Giving the Job a Name
Jobs Job Description
Jobs SQL
Jobs Options
Jobs Timeout
Jobs Summary
Jobs New Job Added to List
Schedules Add Schedule Wizard
Schedules Give the Schedule a Name
Schedules Provide a Description
Schedules Set Start Time
Schedules Set Start Date
Schedules Set End Date
Schedules Set Recurrence
Schedules Summary
Schedules New Schedule Added to List
Scheduling A Job East Meets West
Scheduling A Job Confirmation of Job
Scheduling A Job Choose a Schedule
Scheduling A Job Choose a Server
Scheduling A Job Set Options for Scheduled Job
Scheduling A Job Set More Options for the Scheduled Job
Scheduling A Job Scheduled Job Summary
Scheduling A Job New Scheduled Job in List
Run Now Running a Job Outside Its Schedule
Job History Scheduled Job Status
Logging Job Output
Stopping a Job Terminating or Disabling a Job
JS Administration Managing Job Scheduler • Need js_admin_role • Configure JS Task • Configure sybmgmtdb
JS Administration Scheduled Job Context Menu
JS Administration Task Configuration
JS Administration Database Configuration
Demo Job Scheduler in Action • Create the Job • Create the Schedule • Schedule the Job • Run the Job • Review the Job History and Output
Job Scheduler Templates Shortcut for Creating Jobs • Basis for Creating Jobs • Routine Jobs run on multiple databases and on multiple servers • Write once, run as often as needed, wherever needed • Provided by Sybase with Job Scheduler • Data back-up • Statistics management • Reorg • Reconfiguration
Templates & Jobs Creating a Job from a Template • Add Job • Select Template “Browse” button • Select template • Input values for job parameters • Job SQL is written to the Job Definition text box • Add your own SQL if you want • Continue on as you would for any Job created from scratch
Add Job Wizard Start Job as Usual
Job Template Wizard Select Template Category
Job Template Wizard Select Template