By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,708 Members | 2,080 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,708 IT Pros & Developers. It's quick & easy.

Export ORACLE_HOME failed in crontab

P: 2
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
Share this Question
Share on Google+
2 Replies

P: 2
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/ line 7, near "/oracle/DEV"
(Missing operator before DEV?)
syntax error at /oracle/DEV/ line 7, near "/oracle/DEV"
Execution of /oracle/DEV/ 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/ 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 100+
P: 971
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.