1753587 Members
6939 Online
108796 Solutions
New Discussion юеВ

Re: rma script fails

 
shabir_1
Occasional Advisor

rma script fails

Hi,

ORACLE=oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORACLE_SID=cieho
export PATH=$PATH:/usr/local/bin:$ORACLE_HOME/bin

su - $ORACLE -c "rman catalog=rman/rman target=sys/redhat @incr.sql"
it fails ++ su - oracle -c 'rman catalog=rman/rman target=sys/redhat @incr.sql'

it fails with following error
-bash: rman: command not found

pls any input to resolve this issue

Thanks
(Shabir)


6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: rma script fails

It's probably not carrying your path over when you do the 'su'.

Specify the full path to the 'rman' executable.

su - $ORACLE -c "/u01/app/oracle/product/10.2.0/db_1/bin/rman catalog=rman/rman target=sys/redhat @incr.sql"
Dennis Handly
Acclaimed Contributor

Re: rma script fails

Since you are doing "su -", your $PATH setting isn't copied over, as Patrick said.

You could add $PATH to the oracle user or add it on that command:
su - $ORACLE -c "export PATH=$PATH; rman catalog=rman/rman target=sys/redhat @incr.sql"

Your other variables aren't copied either, do you need them?
shabir_1
Occasional Advisor

Re: rma script fails

Hi Patrik,

Thanks lot for your inputs

We try but it fails againg

++ su - oracle -c '/u01/app/oracle/product/10.2.0/db_1/bin/rman catalog=rman/rman target=sys/Janet12 @incr.sql'

Message file RMAN.msb not found

Verify that ORACLE_HOME is set properly


thanks
(Shabir)
Dennis Handly
Acclaimed Contributor

Re: rma script fails

>Verify that ORACLE_HOME is set properly

That's what I cautioned you about:
su - $ORACLE -c "export PATH=$PATH ORACLE_HOME=$ORACLE_HOME ORACLE_SID=$ORACLE_SID; rman catalog=rman/rman target=sys/redhat @incr.sql"
shabir_1
Occasional Advisor

Re: rma script fails

Hi,
Thanks lot it works

Shabir
Dennis Handly
Acclaimed Contributor

Re: rma script fails

>Thanks lot it works

If you are happy with the answers you got, please the following about how to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33