0% found this document useful (0 votes)
92 views5 pages

Upgrading Job Scheduler Templates

This document provides instructions for upgrading Job Scheduler after upgrading to a new SAP ASE server. It describes steps to copy over the Job Scheduler database, update templates and jobs, and install updated stored procedures. Modifications may be needed to jobs created from updated templates to account for new parameters.

Uploaded by

bbierr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views5 pages

Upgrading Job Scheduler Templates

This document provides instructions for upgrading Job Scheduler after upgrading to a new SAP ASE server. It describes steps to copy over the Job Scheduler database, update templates and jobs, and install updated stored procedures. Modifications may be needed to jobs created from updated templates to account for new parameters.

Uploaded by

bbierr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

5/27/2019

Installation and Upgrade Guide for Linux


Generated on: 2019-05-27

SAP Adaptive Server Enterprise | 16.0.3.6

PUBLIC

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the SAP Help Portal.

This is custom documentation. For more information, please visit the SAP Help Portal 1
5/27/2019

Upgrading Job Scheduler


After upgrading to a new SAP ASE server, upgrade Job Scheduler.

Context

Note
You must have $SYBASE/$SYBASE_OCS/bin directory in $PATH so the isql executable is accessible. Use isql to perform all
the steps in this task.

Procedure
1. Copy the directory services entry for JSAGENT (or jsagent) from the old server to the new server.

2. Make sure the new server is running.

3. Ensure that at least 9000 locks are con gured. If the number of locks on the server is fewer than 9000, increase it:

1> sp_configure "number of locks", 9000


2> go

4. Before you restart the SAP ASE server and run Job Scheduler, run the installjsdb script to Job Scheduler tables and
stored procedures:

a. Disable Job Scheduler:

1> sp_configure "enable job scheduler", 0


2> go
1> sybmgmtdb..sp_sjobcontrol @name=NULL, @option="stop_js"
2> go

b. Run the installjsdb script:

isql –Usa –Psa_password –S<servername>


–i$SYBASE/$SYBASE_ASE/scripts/installjsdb

Note
The directory with the isql executable ( $SYBASE/$SYBASE_OCS/bin) must be in your path.

The installjsdb script looks for the sybmgmtdb database.

c. Enable Job Scheduler:

sp_configure "enable job scheduler", 1

d. To start Job Scheduler, either restart the server, or enter:

1> use sybmgmtdb


2> go
1> sp_sjobcontrol @name=NULL, @option="start_js"
2> go

5. Restart the SAP ASE server if you restarted Job Scheduler manually.

6. (Optional) Add more log space. Some 64-bit platforms require additional space for the sybmgmtdb log:

1> use master


2> go
This is custom documentation. For more information, please visit the SAP Help Portal 2
5/27/2019
1> alter database sybmgmtdb LOG on sybmgmtdev=20
2> go

7. To upgrade sybmgmtdb, run the installjsdb script that is included, saving the output to a le:

isql -Usa -P<sa_password> -S<servername> -n -i$SYBASE/$SYBASE_ASE/scripts/installjsdb


-o<output_file>

Note
When upgrading to SAP ASE version 16.0 SP03 from earlier versions, make sure that the size of sybmgmtdb is at
least 160 MB, so that it has at least 60 MB of free log space.

Related Information
Upgrading Job Scheduler Templates

Upgrading Job Scheduler Templates


After upgrading to the new server, upgrade the templates and jobs created by Job Scheduler.

Context

Note
Several changes impact the Job Scheduler templates. These changes make some templates incompatible with earlier
versions of the server. The current templates are version 3.0 in the XML les.

Procedure
1. Disable Job Scheduler.

2. Upgrade any environment variables, scripts, or applications that refer to the Job Scheduler directory path. The Job
Scheduler directory is under the ASE-16_0 directory, in $SYBASE/$SYBASE_ASE/jobscheduler .

Directories below jobscheduler remain the same.

3. Copy les from the jobscheduler directory to the ASE-16_0 directory. If you are installing the new server directories
over the old server directories, the installer automatically moves your les to the new jobscheduler directory.

4. If you modi ed SAP-supplied templates, stored procedures, or XML documents, do not overlay the new templates with
your modi ed versions. If you do, you lose the enhancements provided by the revised templates. Carefully merge your
template changes into the SAP template les, or better yet, rename your modi ed templates.

5. You may need to make minor modi cations to jobs you created from 2.0 or earlier templates. In some templates,
parameters changed from varchar(5) to int. The following table lists the templates that changed in version 2.1 and
the changes you must make to the SQL code in the jobs created from the templates.

Changed Job Scheduler Templates

Datatype for <parameter> Changed from


Template Modi ed Files varchar(5) to int

dump database jst_dump_databases @use_srvr_name

dump database log jst_dump_log @truncate_flag and @use_srvr_name

update statistics jst_update_statistics @index_flag

rebuild indexes jst_reorg_rebuild_indexes @dump_flag

This is custom documentation. For more information, please visit the SAP Help Portal 3
5/27/2019

Datatype for <parameter> Changed from


Template Modi ed Files varchar(5) to int

rebuild table jst_reorg_rebuild_tables @dump_flag

reclaim indexes jst_reclaim_index_spac @dump_flag

reclaim tables jst_reclaim_table_space @resume_flag

6. Some Job Scheduler templates have been modi ed to support new server functionality. These changes are related to
new parameters for specifying a partition name, or a data change value for the new server commands that added these
options. If you have jobs created from any of the enhanced templates, modify the SQL of the jobs for the 16.0 SP03
servers.

If you have a job scheduled to run on a pre-16.0 server and you need it to also run on 16.0 SP03 servers, leave the
existing job alone and create a new job for pre-16.0 servers, as the job commands are different.

You need not modify any jobs you run on pre-16.0 servers. The following table lists the templates that changed in version
3.0 and the changes you must make to jobs created from them.

Note
All templates listed below, except delete statistics, are incompatible with pre-15.0.1 servers. Do not use them to
create jobs that are scheduled on pre-15.0.1 servers; you must use the 2.1 or 2.2 versions for pre-15.0.1 servers.

Modified Job Scheduler Templates

Template Modi ed File Change Description Job Modi cations

delete statistics jst_delete_statistics Added @ptn_name as third Optional.


parameter.

update statistics jst_update_statistics Added @ptn_name as fth Required. Include values (or
parameter, NULL) for new parameters.
@datachg_threshold as
the 10th parameter, and
added reference.

rebuild indexes jst_reorg_rebuild_indexes Added @ndx_ptn_name as Required. Include value (or


third parameter. NULL) for new parameter.

reclaim indexes jst_reclaim_index_space Added @ptn_name as third Required. Include value (or
parameter. NULL) for new parameter.

reclaim tables jst_reclaim_table_space Added @ptn_name as Required. Include value (or


second parameter. NULL) for new parameter.

multiple jst_get_freespace , Replace reserved_pgs and No impact on job SQL.


jst_get_usedspace data_pgs with
reserved_pages and
data_pages.

7. Install the template stored procedures and move them to the Job Scheduler template stored procedure directory. For
example:

cd $SYBASE/$SYBASE_ASE/jobscheduler/Templates/sprocs

Run the stored procedure installation script for each server being updated:

installTemplateProcs <<servername>> <<username>> <<password>>

This is custom documentation. For more information, please visit the SAP Help Portal 4
5/27/2019

Note
Upgrade template stored procedures on all Job Scheduler servers and target servers that are updated to SAP ASE
version 16.0 SP03.

8. Install and move the template XML documents into the JS template XML directory. For example:

cd $SYBASE/$SYBASE_ASE/jobscheduler/Templates/xml

9. Before running the installTemplateXml XML installation script, set the SYBASE_ASE_SA_USER environment
variable and SYBASE_ASE_SA_PWD variable in the SYBASE.csh le before running the XML installation script:

10. Run the XML installation script on 16.0 SP03 servers with Job Scheduler installed:

installTemplateXml <servername> <machinename> <serverport>


    <username> <password> [<language_code>]

Use "en" for the <language_code> or omit the parameter completely, as "en" is the default.

Note
Upgrade template XML documents on all Job Scheduler servers updated to SAP ASE version 16.0 SP03. Do not
install them on pre-16.0 servers or servers where Job Scheduler is not installed.

This is custom documentation. For more information, please visit the SAP Help Portal 5

You might also like