Can anyone shed some light on this problem. Firstly, we have a cron job which transfers all our redo logs from a primary database server to a standby database server. Both running Oracl9i on Red Hat Linux Ent 4.
I'm trying to write a script to do a recover on the standby databse some time in the evening after all the redo logs have been transferred.
The folloing command is what the cron script does:
sqlplus -s "/as sysdba" @recover.sql
The recover.sql script then contains the following command:
alter database recover managed standby database disconnect;
When I run this command manually from a sqlplus prompt I get
"database altered" returned and the recover can be seen to be running by looking at the managed_standby view. However, when running the script, I receive the following error after the alter command has been issued:
ERROR at line 1:
ORA-01O34: Oracle not available.
The database had been started by "startup nomount" and then "alter database mount standby database" command had been issued before running the script. If after running the script and logging into sqlplus manually and issuing the same command as above, the command works fine.
Any idea?
I'm trying to write a script to do a recover on the standby databse some time in the evening after all the redo logs have been transferred.
The folloing command is what the cron script does:
sqlplus -s "/as sysdba" @recover.sql
The recover.sql script then contains the following command:
alter database recover managed standby database disconnect;
When I run this command manually from a sqlplus prompt I get
"database altered" returned and the recover can be seen to be running by looking at the managed_standby view. However, when running the script, I receive the following error after the alter command has been issued:
ERROR at line 1:
ORA-01O34: Oracle not available.
The database had been started by "startup nomount" and then "alter database mount standby database" command had been issued before running the script. If after running the script and logging into sqlplus manually and issuing the same command as above, the command works fine.
Any idea?