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
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] ...
That's a shame to cut and past articles from blog without mentionning the original source blog !
ReplyDeleteI have no issue the content of my blog to be copied as long you provide the original blog or author name......