When connected to oracle database through rman directly from the terminal, everything works fine, but when the same connection string is executed through a shell script rman connects to the database in a no mount state, not sure why, using oralce 11g, oracle Linux, and the connection string is :

rman target / catalog (userName)/(password)@//(IPADDRESS):(PORT)/SYNDEV

Kris Johnston said in a comment:

nomount/mount/open are the states of the database... something can't connect to the db one way and connect as nomount, and connect to the same db a different way and connect as mount or open. It doesn't work like that. It sounds like you are connecting to a different database altogether. To check, verify the dbid's are the same/different when you connect via RMAN. Also, instead of connecting to rman, connect to sqlplus using your various connection methods, then check: select status from v$instance; select dbid from v$database; (have to bring the db into mount state to query v$database).

Issue has been fixed. Kris, your explanation actually made sense, I am not sure why, but there were multiple Oracle instances running in top for the same database, so I had to kill all those and use the same SID strings in the scripts, with the exact case, and everything worked fine.

|improve this answer|||||

To connect to RMAN from the operating system command line and hide authentication information, you must first start RMAN and then perform either of the following actions:

  1. Run the CONNECT commands at the RMAN prompt. ...
  2. Run a command file at the RMAN prompt that contains the connection information.
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.