Skip to main content

How To Install Job Scheduler in ASE.


How To Install Job Scheduler in ASE.

 Job scheduler allows DBA to create and schedule administration tasks. Since ASE
v15.0.3, lot of bugs are solved, making job scheduler to be workable. By the way,
I will suggest to heavily test it before to go in production environment!
So how to install it ?
Job scheduler is a separate external process running as an agent (JS Agent), and
an internal ASE task (JS Task) that need a specific database to run. We will need
to setup a database and create a directory services entry in interface file.
Create the database user_db:
Let’s assume the dataserver you created is named SYBPARFRUAT01_DS and
you created 2 separate devices named user_dbdat for data and user_dblog for log
segment.
Connect to the dataserver you want to install the job scheduler and create the
database user_db:
1> create database user_db on user_db_data = 100 log on
user_db_log = 25
2> go
1> sp_dboption user_db,"trunc log",true
2> go
1> sp_dboption user_db, "select into", true
2> go
1> use user_db
2> go
1> checkpoint
2> go
Then, back to Unix command line, you must run the installjsdb script located in
$SYBASE/$SYBASE_ASE/scripts, it will install the job scheduler componants
into database user_db:
isql -Usa -Ppassword -SSYBPARFRUAT01_DS -i
$SYBASE/$SYBASE_ASE/scripts/installjsdb
I previously mentionned job scheduler is a separate server process running as an
agent. So we need to create a directory services entry in interface file.
Let’s call the job scheduler server process SYBPARFRUAT01_JS.
SYBPARFRUAT01_JS
master tcp ether vm.sybnux.com 5999
query tcp ether vm.sybnux.com 5999
Now, let’s connect to the dataserver and add the job scheduler agent using
sp_addserver to create an entry in the dataserver’s sysservers table:
1> sp_addserver SYB_JSAGENT, null, SYBPARFRUAT01_JS
2> go
While executing a job, job scheduler consider all dataservers as remote
servers, including the server where Job Scheduler is installed.
Job scheduler use CIS mechanism. So to execute jobs locally, we need to create
an entry in sysservers (SYBPARFRUAT01_RPC) to alias the local dataserver
(SYBPARFRUAT01_DS):
1> sp_addserver SYBPARFRUAT01_RPC, ASEnterprise, SYBPARFRUAT01_DS
2> go
Setup job scheduler users:
To create, manage, or execute jobs and schedules, we need to create at least one
job scheduler admin account one job scheduler user account.
1> exec sp_addlogin 'jobsadm', 'password', @defdb='user_db',
@deflanguage='us_english'
2>go
1> exec sp_addlogin 'jobsusr', 'password', @defdb='pubs2',
@deflanguage='us_english'
2>go
1> use user_db
2> go
1> sp_adduser jobsadm
2> go
1> use pubs2
2> go
1> sp_adduser jobsusr
2> go
1> sp_addexternlogin
'SYBPARFRUAT01_RPC','jobsadm','jobsadm','password'
2> go
1> sp_addexternlogin
'SYBPARFRUAT01_RPC','jobsusr','jobsusr','password'
2> go
Grant the appropriate roles to logins:
1> sp_role 'grant', js_admin_role, jobsadm
2> go
1> sp_role 'grant', js_user_role, jobsadm
2> go
1> sp_role 'grant', js_user_role, jobsusr
2> go
1> sp_modifylogin jobsadm, 'add default role', js_user_role
2> go
1> sp_modifylogin jobsadm, 'add default role', js_admin_role
2> go
1> sp_modifylogin jobsusr, 'add default role', js_user_role
2> go
Activate and start the jobscheduler agent:
1> sp_configure "enable job scheduler", 1
2> go
1> use user_db
2> go
1> sp_js_wakeup "start_js", 1
2> go
You are now ready to use the jobsheduler.
To stop the jobscheduler proceed as follow:
1> use user_db
2> go
1> sp_js_wakeup "stop_js", 1
2> go

Comments

  1. That's a shame to cut and past articles from blog without mentionning the original source blog !
    I have no issue the content of my blog to be copied as long you provide the original blog or author name......

    ReplyDelete

Post a Comment

Popular posts from this blog

How to set data cache,procedure cahe in ASE

1> sp_cacheconfig "default data cache","1G" 2> go Msg 10879, Level 16, State 1: Server 'SPICE_BIAPPS', Procedure 'sp_cacheconfig', Line 1167: The current 'max memory' value '58368', is not sufficient to change the size of cache 'default data cache' to '1G' (1048576 KB). 'max memory' should be greater than 'total logical memory' '579786' required for the configuration. (return status = 1) 1> sp_configure "max memory" 2> go Parameter Name Default Memory Used Config Value Run Value Unit Type ------------------------------ ----------- ----------- ------------ ------------ -------------------- ---------- max memory 58368 116736 58368 58368 memory pages(2k) dynamic (1 row affected) (return status = 0) 1> sp_configure "max memory","1G" 2>...

Undocumented DBCC commands in ASE

Introduction Undocumented DBCC commands: • DBCC BUFFER • DBCC BYTES • DBCC DBINFO • DBCC DBTABLE • DBCC DES • DBCC HELP • DBCC IND • DBCC LOG • DBCC PAGE • DBCC PROCBUF • DBCC PRTIPAGE • DBCC PSS • DBCC RESOURCE • DBCC TAB Literature Introduction In this article I want to tell you about some useful undocumented DBCC commands, and how you can use these commands in SQL Server 7.0 for administering and monitoring. DBCC is an abbreviation of a DataBase Consistency Checker. This is the description of DBCC from SQL Server Books Online: A statement used to check the logical and physical consistency of a database, check memory usage, decrease the size of a database, check performance statistics, and so on. Database consistency checker (DBCC) ensures the physical and logical consistency of a database, but is not corrective. Undocumented DBCC commands 1. DBCC BUFFER This command can be used to print buffer headers and pages from the buffer cache. Syntax: dbcc buffer ([dbid|dbname] ...

Replication Server Quick Ref Guide

Replication Server Guide : • Replication Server Commands • ASE commands and system stored procedures • ASE RSSD stored procedures • RSSD tables • Replication Server System Functions • Troubleshooting Tips Abbreviations Some abbreviations which are used in this Quick Reference Guide: ASE Adaptive Server Enterprise DSI DataServer Interface - RS thread for a connection to a replicate database DIST Distributor - RS thread per primary database LTM Log Transfer Manager; synonym for RepAgent RS, RepServer Replication Server RepAgent Replication Agent (in primary dataserver) RepDef Replication Definition RSI Replication Server Interface - RS thread related to a route to another RepServer RSM Replication Server Manager (a DBA tool normally used in combination with Sybase Central) RSSD Replication Server System Database SQM Stable Queue Manager - RS thread managing a queue SQT Stable Queue Manager - RS thread assembling transactions Replication Server Commands The following commands can only be ...