HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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"

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)

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

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