- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron failing I need help.
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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-29-2004 04:17 AM
06-29-2004 04:17 AM
I set up a cron to start an sql command under a different user name other than root.
the cron looks like this.
07 16 * * * $TFADMIN /home/asy/sqlplus snapadmin/snapadmin @crontest
and this is the error Iam getting
Message file sp1
Error 6 initializing SQL*Plus
What could be the problem.
Regards
Bonnie.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2004 04:22 AM
06-29-2004 04:22 AM
Re: cron failing I need help.
I've never tried doing it the way you have listed. Normally I would do:
07 16 * * * su - crontest -c ".../sqlplus..."
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2004 04:22 AM
06-29-2004 04:22 AM
Re: cron failing I need help.
You really have to invoke your script (which is typically a wrapper script) with a fully qualified pathname and then the script itself should explicitly set and export any needed environment variables before actually spawning the real script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2004 04:36 AM
06-29-2004 04:36 AM
Re: cron failing I need help.
Let me give it another try.
Regards
Bonnie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2004 01:56 AM
06-30-2004 01:56 AM
SolutionTake your cron command and put it into a script;
#!/bin/ksh
# get oracle's environment
. /home/oracle/.ora_defaults
$TFADMIN/home/asy/sqlplus snapadmin/snapadmin @crontest
------ or ------------
my_script contains
#!/bin/ksh
# get oracle's environment
$TFADMIN/home/asy/sqlplus snapadmin/snapadmin @crontest
cron table has su - oracle -c my_script
assuming $TFADMIN is defined somewhere