Following are the various purposes we can go for Shell Scripts in Oracle Apps.
1) If you would like to move the Files from One Unix Server to the Other Unix server, we can opt Shell Scripts.we can transfer all files at a time, we can Zip those files and we can encrypt those files in unix shell scripts.
2) We can connect to the database and perform actions to meet your requirements.
If i need to run a particular procedure from Shell script, we can achieve using the following.
Sample Usage:
Code :
sqlplus -s $user/$pass <<++END>>$LOGFILE
set serveroutput on size 1000000
set feedback off
BEGIN
Package.procedure('$parameter1','$parameter2'... etc)
exception
when others then
dbms_output.put_line (SQLERRM);
RAISE_APPLICATION_ERROR(-20001,'Error',TRUE);
end;
/
++END3) We can submit a concurrent program from Shell Script.
Syntax:
Code :
CONCSUB <APPS username>/<APPS password> \<responsibility application short name> \<responsibility name> \<username> \[WAIT=N|Y|<n seconds>] \CONCURRENT \<program application short name> \<program name> \[PROGRAM_NAME=”<description>”] \[REPEAT_TIME=<resubmission time>] \[REPEAT_INTERVAL= <number>] \[REPEAT_INTERVAL_UNIT=< resubmission unit>] \[REPEAT_INTERVAL_TYPE=< resubmission type>] \[REPEAT_END=<resubmission end date and time>] \[START=<date>] \[IMPLICIT=< type of concurrent request> \[<parameter 1> ... <parameter n>]
Eg:
Code :
v_concreq='./CONCSUB $1 SQLGL "BA Schedule Conc. Programs - FINUSER" FINUSER WAIT=Y CONCURRENT SQLAP "APXMCCDF" $CARDPRGID $TARGET_DIR/$OUTNAME'
where v_concreq is a variable
$1 holds the user/password
FINUSER is the user name
BA Schedule Conc. Programs - FINUSER is the Responsibility name
APXMCCDF is concurrent program short name
CARDPRGID is the first parameter for the concurrent program
TARGET_DIR/$OUTNAME is second parameter for the concurrent programThese are the scenarios i got as our requirement. If there are any queries on this Article, please raise your query. I look forward to post new Articles soon.
Cheers...
3Murthy Reddy
3 Comments


