Loading
Shell Script to Run SQL Script Sample

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Shell Script to Run a SQL Script


Ans)

This is sample Shell Script gives us an idea on how to write a
Shell Script to Run a SQL Script.

Please examples meant for giving an idea , you need to customize these
your needs.

RunSQL.sh:

 setenv ORACLE_HOME /export/apps/oracli/cust/10.1.0.3
 setenv TNS_ADMIN /export/apps/oracli/cust/admin/network
 setenv PATH /export/apps/oracli/cust/10.1.0.3/bin:${PATH}
 setenv  LD_LIBRARY_PATH /export/apps/oracli/cust/10.1.0.3/lib

sqlplus @[DB_USER]@@[DB_INSTANCE_NAME]/@[DB_PWD] @$HOME/bin/ProductLoad.sql

 ProductLoad.sql :

delete "SalesOrder"."SELR_SRVR";

insert into  "SalesOrder"."SELR_SRVR"
select unique PRODUCT_ID, PRODUCT_NME,NVL(SUBSTR(ENTY_NO,1,5),PRODUCT_ID),NVL(ENTY_NME,SUBSTR(PRODUCT_NME,1,60)),
PRNT_SELR_STAT,PRNT_SRVR_STAT  from SalesOrder.X_SELR_SRVR_STGG
where PRNT_SELR_STAT = 3 or "PRNT_SRVR_STAT" = 5;

exit



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Shell Script to Run SQL Script Sample


Shell Script to Run SQL Script Sample

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free