Installing Job Scheduler manually

When you select the Job Scheduler option during the Adaptive Server installation, it is installed and configured. If you do not select Job Scheduler during the Adaptive Server installation, it will not be installed.

If you want to install Job Scheduler manually, after you have installed Adaptive Server, complete the following steps.

StepsInstalling Job Scheduler

  1. Create a device called sybmgmtdev with a size of at least 75 MB.

  2. Run the installjsdb script:

    isql –Usa –Psa_password –Sservername –i $SYBASE/$SYBASE_ASE/scripts/installjsdb
    

    NoteYou must have the directory with the location of the isql executable ($SYBASE/$SYBASE_OCS/bin) in your path.

    The installjsdb script looks for the sybmgmtdb database. If it exists, the script creates Job Scheduler tables and stored procedures. If it does not exist, the script looks for the sybmgmtdev device on which to create the sybmgmtdb database, the tables, and stored procedures.

    NoteIf the installjsdb script finds neither a sybmgmtdev device nor a sybmgmtdb database, it creates a sybmgmtdb database on the master device. Sybase strongly recommends that you remove the sybmgmtdb database from the master device to prevent cluttering it and to make recovery easier in the case of a disk failure.

  3. Create a directory services entry for the JS Agent using dscp, dsedit, or a text editor as appropriate for your specific directory services setup and operating system. Sybase suggests the name of “server name_JSAGENT”:

    servername_JSAGENT
        master tcp ether server_machine port_number
        query  tcp ether server_machine port_number
    

    where:

    • server_machine is the name of the machine on which the Job Scheduler Adaptive Server is installed.

    • port_number is the port on which the JS Task communicates with the JS Agent.

      NoteYou must specify a port currently not in use.

    See the System Administration Guide, Volume 1 for more information on directory services.

  4. Use sp_addserver to create an entry in the sysservers table:

    sp_addserver SYB_JSAGENT, null, <servername_JSAGENT>
    

    See the ASE Reference Manual, Volume 2: Commands for more information on sp_addserver.

  5. Enable Job Scheduler:

    sp_configure “enable job scheduler”, 1
    
  6. Set the number of user connections appropriately. Sybase recommends that you increase the number of user connections by at least 3 times the amount you increase job scheduler tasks. For example, if you increase the value for job scheduler tasks from the default (4) to 8, then you should increase the value for number of user connections by 12 because (8 - 4) x 3 = 12.

    NoteChanging the number of user connections may require that you increase the value for max memory.

  7. To start Job Scheduler, you can either restart the server or use the following commands:

    use sybmgmtdb
    go
    sp_sjobcontrol @name=NULL, @option="start_js"
    go
    

For more information, see “sp_sjobcontrol”.