- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- call Stored procedure from shell script
Operating System - Linux
1753300
Members
7045
Online
108792
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2006 10:47 PM
тАО05-09-2006 10:47 PM
call Stored procedure from shell script
Hi,
I am not able to call a stored procedure from a shell script. This is my code
#!/bin/csh -f
#env variables
setenv DB_IND COM_DB
set dbuser = `cat /opt_apps/database/dbparam | grep $DB_IND | awk -F: '{print $3}'`
set dbpasswd = `cat /opt_apps/database/dbparam | grep $DB_IND | awk -F: '{print $4}'`
set oraclehome = `cat /opt_apps/database/dbparam | grep $DB_IND | awk -F: '{print $5}'`
set oraclesid=`cat /opt_apps/database/dbparam | grep $DB_IND | awk -F: '{print $6}'`
setenv ORACLE_HOME $oraclehome
setenv ORACLE_SID $oraclesid
setenv ORACLE_BIN $oraclehome/bin
setenv NLS_LANG American_America.UTF8
setenv TNS_ADMIN $oraclehome/network/admin
set ldrHome = `cat /opt_apps/comcat/r_curr/be/loads/load.config | grep FTP_HOME | awk -F= '{print $2}'`/eu_fusion
set ldrData = `cat /opt_apps/comcat/r_curr/be/loads/load.config | grep FTP_HOME | awk -F= '{print $2}'`/eu_fusion
# loging into sqlplus
sqlplus -s $dbuser/$dbpasswd
#Executing for the SP populate_eu_staging
exec be_fusion_orderability.populate_eu_staging
#Calling eu_fusion_spool.sql
@$ldrHome/sql/eu_fusion_spool.sql
#rename the above generated file
mv $ldrData/out/orderability_ecomcat_fusion.txt $ldrData/out/orderability_`date +%y%m%d`_ecomcat_fusion.txt
It stop at loging in to sqlplus .
Can you please tell me whats wrong.
I am not able to call a stored procedure from a shell script. This is my code
#!/bin/csh -f
#env variables
setenv DB_IND COM_DB
set dbuser = `cat /opt_apps/database/dbparam | grep $DB_IND | awk -F: '{print $3}'`
set dbpasswd = `cat /opt_apps/database/dbparam | grep $DB_IND | awk -F: '{print $4}'`
set oraclehome = `cat /opt_apps/database/dbparam | grep $DB_IND | awk -F: '{print $5}'`
set oraclesid=`cat /opt_apps/database/dbparam | grep $DB_IND | awk -F: '{print $6}'`
setenv ORACLE_HOME $oraclehome
setenv ORACLE_SID $oraclesid
setenv ORACLE_BIN $oraclehome/bin
setenv NLS_LANG American_America.UTF8
setenv TNS_ADMIN $oraclehome/network/admin
set ldrHome = `cat /opt_apps/comcat/r_curr/be/loads/load.config | grep FTP_HOME | awk -F= '{print $2}'`/eu_fusion
set ldrData = `cat /opt_apps/comcat/r_curr/be/loads/load.config | grep FTP_HOME | awk -F= '{print $2}'`/eu_fusion
# loging into sqlplus
sqlplus -s $dbuser/$dbpasswd
#Executing for the SP populate_eu_staging
exec be_fusion_orderability.populate_eu_staging
#Calling eu_fusion_spool.sql
@$ldrHome/sql/eu_fusion_spool.sql
#rename the above generated file
mv $ldrData/out/orderability_ecomcat_fusion.txt $ldrData/out/orderability_`date +%y%m%d`_ecomcat_fusion.txt
It stop at loging in to sqlplus .
Can you please tell me whats wrong.
- Tags:
- SQL
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2006 10:53 PM
тАО05-09-2006 10:53 PM
Re: call Stored procedure from shell script
Hi,
don't you need somethng like:
sqlplus -s $dbuser/$dbpasswd << .eof
exec be_fusion_orderability.populate_eu_staging
/
@$ldrHome/sql/eu_fusion_spool.sql
exit;
.eof
To prove it take the -s option off sqlplus.
don't you need somethng like:
sqlplus -s $dbuser/$dbpasswd << .eof
exec be_fusion_orderability.populate_eu_staging
/
@$ldrHome/sql/eu_fusion_spool.sql
exit;
.eof
To prove it take the -s option off sqlplus.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-09-2006 11:19 PM
тАО05-09-2006 11:19 PM
Re: call Stored procedure from shell script
try
sqlplus -s $dbuser@ORACLE_SID/$dbpasswd
sqlplus -s $dbuser@ORACLE_SID/$dbpasswd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2006 07:39 PM
тАО05-16-2006 07:39 PM
Re: call Stored procedure from shell script
Suchitra,
can you please update the thread with the solution used, so that we all can learn how to fix the problem.
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
can you please update the thread with the solution used, so that we all can learn how to fix the problem.
Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP