Search code examples
relational-databasesybasesap-ase

How to update statistics automatically in Sybase ASE 15.7


I want to update the statistics for all the tables in Sybase ASE 15.7 My question is if there is an automatic way to do it especially when there is no running process esp. at night?

Thanks,

Ali


Solution

  • You can use the Sybase ASE Job Scheduler to setup tasks to run on a regular basis.

    Job Scheduler eases the management of ASE by providing the ability to define and schedule database administration and maintenance tasks. With Job Scheduler, jobs that normally require interaction from a database administrator can be scheduled to run unattended at the appropriate times, freeing the database administrator to attend to other issues.

    Job Scheduler allows you to create and schedule jobs, and to share jobs and schedules. One database administrator can create a job, and other database administrators can then schedule and run that job on another server. You can create jobs as follows:

    • From scratch using the command line or GUI
    • From a SQL batch file
    • From a template

    Job Scheduler captures the results and output of jobs and records that information in log tables. This data can be viewed at a later date. In addition, Job Scheduler keeps a history of scheduled jobs; however, to keep a limit on the size of the history table, Job Scheduler monitors it and removes outdated, unnecessary history records.