As you probably know, database must be started before any other RMAN commands are issued. So… how to solve this issue if you have 100% that your database is open and working? Take a look at my case and my environment variables:
ORACLE_SID=dw
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1/
ORACLE_BASE=/u01/app/oracle/
[oracle@db env]$ rman target /
Recovery Manager: Release 10.2.0.4.0 – Production on Thu Oct 8 15:08:53 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN>
But I am 100% sure that my database is online
So what’s happening here? Take a look at my ORACLE_HOME… Do you find anything strange on it’s path?
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1/
You’re right… I have an extra slash “/” at the end of the path… RMAN strangely thinks my database is not online if the ORACLE_HOME ends with “/” … It works with lsnrctl, emctl and other oracle utils but with RMAN and SQLPLUS won’t work. So the error was a typo… In the bash a command like “cd /u01//app” works, but in this case RMAN and SQLPLUS got confused.
[oracle@db env]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1/
[oracle@db env]$ rman target /
Recovery Manager: Release 10.2.0.4.0 – Production on Thu Oct 8 15:19:10 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database (not started)
RMAN> exit
Recovery Manager complete.
[oracle@db env]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
[oracle@db env]$ rman target /
Recovery Manager: Release 10.2.0.4.0 – Production on Thu Oct 8 15:19:15 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: DW (DBID=3334851943)
RMAN>
Hi joao!
Small thinks like that can make you crazy. Thanks for the hint!
Tobias
By: Tobias Arnhold on October 9, 2009
at 12:15 pm
Hi Tobias,
Yes things like this makes anyone crazy… Earlier I wrote that sqlplus worked with the extra slash in the ORACLE_HOME but it won’t… the commands that worked were lsnrctl and emctl start dbconsole. This post was extremelly fast wroten so i didn’t double check… Sorry if anyone got wrong directions about sqlplus working with the extra slash on oracle_home path.
Joao
By: joao on October 9, 2009
at 1:04 pm