467,146 Members | 1,042 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,146 developers. It's quick & easy.

Export ORACLE_HOME failed in crontab

Dear all,

I need to write a crontab in HP-UX to rebuild index for SAP, but I couldn't export ORACLE_HOME, very frustrated !!!

# Use SAP BR*TOOLS to reorganize indexes in SAP database

<I have already tried many different ways to export ORACLE_HOME, but all fail, please see the details >

Expand|Select|Wrap|Line Numbers
  1. # save the name of index with poor storage quality into a file
  2. $sql = "/oracle/DEV/920_64/bin/sqlplus sapdev/password \@/oracle/DEV/genrebidx2.sql";
  3. $result = system($sql);
Aug 28 '08 #1
  • viewed: 4659
2 Replies
Continue .....

Expand|Select|Wrap|Line Numbers
  1. #!/opt/perl/bin/perl
  2. #
  3. # Use SAP BR*TOOLS to reorganize indexes in SAP database
  4. #
  6. <I have already tried many different ways to export ORACLE_HOME, but all fail, please see the details >
  8. # save the name of index with poor storage quality into a file
  9. $sql = "/oracle/DEV/920_64/bin/sqlplus sapdev/password \@/oracle/DEV/genrebidx2.sql";
  10. $result = system($sql); 

Case 1
export ORACLE_HOME=/oracle/DEV/920_64;

Bareword found where operator expected at /oracle/DEV/idx_rebuild.sh line 7, near "/oracle/DEV"
(Missing operator before DEV?)
syntax error at /oracle/DEV/idx_rebuild.sh line 7, near "/oracle/DEV"
Execution of /oracle/DEV/idx_rebuild.sh aborted due to compilation errors.

Case 2

Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

Case 3
export ORACLE_HOME="/oracle/DEV/920_64";

Can't locate object method "export" via package "ORACLE_HOME" (perhaps you forgot to load "ORACLE_HOME"?) at /oracle/DEV/idx_rebuild.sh line 7.

Any ideal ?
Is the problem related to Perl or Perl has its own format in export ORACLE_HOME environment variable in crontab ?
Please tell me, thanks.
Aug 28 '08 #2
Expert 512MB
Is what you posted the actual code you have tried or is there more? What are you using to connect to the Oracle database?

Also, not sure why you broke this up over two posts when a portion of it is the same. Please use the code tags when posting code and data.

Aug 28 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Arkascha | last post: by
3 posts views Thread by Frank R. Suchy | last post: by
205 posts views Thread by Jeremy Siek | last post: by
3 posts views Thread by rbt | last post: by
2 posts views Thread by David Garamond | last post: by
2 posts views Thread by martijn@gamecreators.nl | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.