below is an example of a shell script that calls pl/sql procedures and scripts. this is done at a scheduled time by using the crontab on the unix server to initiate this shell script, which in turn calls the procedures. hope this helps some.
# . /oracle/local/scripts/orac
# for the SQL code to be understood.
. /oracle/local/scripts/orac
# Environment variables
DBINSTANCE=dev
LOGON_NAME=mylogon
LOGON_PASSWD=mypassword
XML_DIR="/home/ehsitdev"
# Change directory to the xml directory
cd $XML_DIR
# Connect to Oracle database
inst $DBINSTANCE
# Start sqlplus, log in to database, and initiate error log file
sqlplus -s $LOGON_NAME/$LOGON_PASSWD << SQLCMDS
SET heading off
SET termout on
SET trimspool on
SET feedback off
SET serveroutput on
select to_char(sysdate, 'Dy DD-Mon-YYYY HH24:MI:SS') as "Process Start Time" from dual;
EXEC setMaxMemorySize_proc(2000
COMMIT;
EXEC bo_material_proc;
EXEC transform_expression_proc;
COMMIT;
@$HOME/insert_to_tmp.sql
COMMIT;
EXEC get_tmp_record_proc;
@$HOME/update_picklist.sql
@$HOME/update_op_uom.sql
COMMIT;
select to_char(sysdate, 'Dy DD-Mon-YYYY HH24:MI:SS') as "Process End Time" from dual;
EXIT
SQLCMDS
Main Topics
Browse All Topics





by: stemu2000Posted on 2003-02-20 at 13:31:55ID: 7989637
http://www.dbresources.com /articles/ plsql/plsq l_001_FTP. html
Cheers, Stefan