HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SG/Oracle9i /Toolkit in csh environment.
Operating System - HP-UX
1827728
Members
2703
Online
109968
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
Forums
Discussions
Discussions
Discussions
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
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
06-14-2005 09:08 AM
06-14-2005 09:08 AM
SG/Oracle9i /Toolkit in csh environment.
We found a problem after installing oracle9i and trying to rebuild the cluster. The toolkit files (specifically haoracle_sql.sh) appears to be built for the oracle id to be run in posix shell. Ours runs in a csh environment so the "su - oracle" sections for the start and stop routines fail, (export is not a valid command, also command="pfile=$PFILE" fails.) Does anyone have a haoracle_sql.sh for csh environment?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 06:54 PM
06-14-2005 06:54 PM
Re: SG/Oracle9i /Toolkit in csh environment.
Hi Ed,
Why do you use csh on your HP-UX machines? As far as I know, all Oracle scripts are written in Korn/POSIX shell.
A possible workaround is to do the following:
su - oracle -c"
/usr/bin/sh << EOF
/path/to/haoracle_sql.sh
EOF"
Cheerio,
Renarios
Why do you use csh on your HP-UX machines? As far as I know, all Oracle scripts are written in Korn/POSIX shell.
A possible workaround is to do the following:
su - oracle -c"
/usr/bin/sh << EOF
/path/to/haoracle_sql.sh
EOF"
Cheerio,
Renarios
Nothing is more successfull as failure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2005 07:31 PM
06-14-2005 07:31 PM
Re: SG/Oracle9i /Toolkit in csh environment.
Ed,
Yes, its rubbish isn't it? I only use the ECMT cos HP support get all whiney if they find you've rolled your own scripts rather than used theirs. I have a much richer and more controlable set of scripts I use myself when the occasion arises, and they certainly handle the situation you describe (as well as many other the toolkit doesn't consider!)
Anyway, as indicated above, to make the script work correctly when using csh as oracles shell locate the two lines in haoracle_sql.sh that look like this:
su - ${ORACLE_ADMIN} <
and change them to:
su - ${ORACLE_ADMIN} -c "/usr/bin/sh" <
that should sort it
HTH
Duncan
I am an HPE Employee
Yes, its rubbish isn't it? I only use the ECMT cos HP support get all whiney if they find you've rolled your own scripts rather than used theirs. I have a much richer and more controlable set of scripts I use myself when the occasion arises, and they certainly handle the situation you describe (as well as many other the toolkit doesn't consider!)
Anyway, as indicated above, to make the script work correctly when using csh as oracles shell locate the two lines in haoracle_sql.sh that look like this:
su - ${ORACLE_ADMIN} <
and change them to:
su - ${ORACLE_ADMIN} -c "/usr/bin/sh" <
that should sort it
HTH
Duncan
I am an HPE Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2005 04:38 AM
06-15-2005 04:38 AM
Re: SG/Oracle9i /Toolkit in csh environment.
Thanks for the suggestions. I tried it in a test script and it works only if I hard code the value of $ORACLE_HOME in the sqlplus line. Looks like the export fails to pass the variable. This fails:
#!/usr/bin/sh
su - oracle -c "/usr/bin/sh" < export ORACLE_HOME=/oracle/9.2.0
${ORACLE_HOME}/bin/sqlplus '/ as sysdba' < select INSTANCE_NAME from v\\\$instance;
exit;
SQLEOF
EOF
but the following works:
#!/usr/bin/sh
su - oracle -c "/usr/bin/sh" < export ORACLE_HOME=/oracle/9.2.0
/oracle/9.2.0/bin/sqlplus '/ as sysdba' < select INSTANCE_NAME from v\\\$instance;
exit;
SQLEOF
EOF
Same goes for the csh option, i.e. setenv ORACLE_HOME /oracle/9.2.0 fails to fill $ORACLE_HOME in the sqlplus line but hard code works.
I know this should work, any other suggestions? The environment is HPUX 11.11, running test script as root.
As far as why csh, there has been too much development by dba staff to change it - just not feasible.
#!/usr/bin/sh
su - oracle -c "/usr/bin/sh" <
${ORACLE_HOME}/bin/sqlplus '/ as sysdba' <
exit;
SQLEOF
EOF
but the following works:
#!/usr/bin/sh
su - oracle -c "/usr/bin/sh" <
/oracle/9.2.0/bin/sqlplus '/ as sysdba' <
exit;
SQLEOF
EOF
Same goes for the csh option, i.e. setenv ORACLE_HOME /oracle/9.2.0 fails to fill $ORACLE_HOME in the sqlplus line but hard code works.
I know this should work, any other suggestions? The environment is HPUX 11.11, running test script as root.
As far as why csh, there has been too much development by dba staff to change it - just not feasible.
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.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP