Home » RDBMS Server » Server Administration » More considerations of database batch job
More considerations of database batch job [message #117928] Sun, 01 May 2005 13:03 Go to next message
chunyuh
Messages: 13
Registered: April 2005
Junior Member
Usually DBA have many batch jobs running on production database environments and many of these batch jobs are actually shell scripts which invoke SQL*Plus to do DB tasks. Usually, batch jobs are scheduled to run by crontab.

A typical batch job looks like:

export ORACLE_HOME=...
export ORACLE_SID=...
export PATH=$ORACLE_HOME/bin:$PATH
sqlplus -s /nolog<
connect userid/passwd
--sql statements here
quit
EOF

Some concerns We have are:

1. batch job could fail because SQL*Plus can not connect to database for exceeding max sessions limit. We can not suppose that there are not many connections to Oracle when batch job runs.

2. Even SQL*Plus can access Oracle, it's still a lot of cost for SQL*Plus to connect and discconect again and again.

3. Crontab is not perfect. First, cron daemon examines cron entries once every minute, which is not very satisfactory. Second, crontab can be changed by anyone who can have oracle OS account access. We want a more restrictive protection mechanism for submitting or changing batch job.

Solution:
A batch job system should be developped. This batch job system should take all the above 3 points into consideration. The main idea is:
1. A typical number of Oracle sessions are kept for batch jobs. The number should be configurable.
2. Authentication, Authorization and Accounting (AAA) functionality should be included for submitting or changing batch jobs.
3. An admin dameon is listenning the request from the users all the time. A commond line user interface is provided for user to submit or change batch jobs. GUI is not necessary. Smile

Perl can be used to develop this batch system quickly.

Original Post is http://mtsmart.kmip.net/archives/2005/05/more_considerat.html
Re: More considerations of database batch job [message #118003 is a reply to message #117928] Mon, 02 May 2005 09:36 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Why not just use the oracle job scheduler?
Re: More considerations of database batch job [message #118020 is a reply to message #118003] Mon, 02 May 2005 11:59 Go to previous message
chunyuh
Messages: 13
Registered: April 2005
Junior Member
dbms_job works fine, but not all batch jobs are just DB tasks.

Thanks

Chunyu Hu
http://mtsmart.kmip.net
Previous Topic: In 10046 trace why does Oracle call....
Next Topic: a very strange Oracle signature error..
Goto Forum:
  


Current Time: Sun Jan 26 04:38:38 CST 2025