Should be a simple question but I'm fairly new to Oracle and RMAN.
I am trying to duplicate my target database on one host to an auxiliary database on another. The script I'm using was put together by our senior dba who is away this week and I'm having trouble fumbling through it.
Here is the script (on the target side):
========================
PATH=/bin:/usr/bin;export PATH
. /usr/local/lib/uwo_oracle11204.sh
. /usr/local/lib/db_configs/sakprdconfig.sh
ORACLE_SID=sakprd
export ORACLE_SID
rman <<_EOF_
spool log to /oracle/uwosql/sakprd/sql/cr8rmansakfrm.log;
connect target /;
connect catalog rmancat/######@rmanprd;
connect auxiliary sys/######@sakfrm;
sql 'alter system switch logfile';
duplicate target database to sakfrm
until time "to_date('2015/05/25 00:00:00','YYYY/MM/DD HH24:MI:SS')"
pfile = $ORACLE_HOME/dbs/initsakfrm.ora
logfile
group 1 ('/data01/sakdb/sakfrm/redog1f1.dbf') size 100M,
group 2 ('/data01/sakdb/sakfrm/redog2f1.dbf') size 100M,
group 3 ('/data01/sakdb/sakfrm/redog3f1.dbf') size 100M reuse;
spool log off;
exit
_EOF_
========================
I placed my aux in a nomount state and successfully completed the restore via this script. However, I foobar'd something in the startup with regards to pfiles/spfiles and now I have datafiles and control files out of sync. I can't for the life of me get the database up in an open state. I just want to try again. I can place my aux database into a nomount state, but when I try to connect from the target side, I get:
========================
Spooling started in log file: /oracle/uwosql/sakprd/sql/cr8rmansakfrm.log
Recovery Manager11.2.0.4.0
RMAN>
connected to target database: SAKPRD (DBID=3623541827)
RMAN>
connected to recovery catalog database
RMAN>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-04006: error from auxiliary database: ORA-12528: TNS:listener: all appropriate instances are blocking new connections
RMAN>
sql statement: alter system switch logfile
RMAN> 2> 3> 4> 5> 6> 7>
Starting Duplicate Db at 27-MAY-15
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/27/2015 13:10:40
RMAN-05501: aborting duplication of target database
RMAN-06174: not connected to auxiliary database
RMAN>
========================
lsnrctl status on the aux side says:
========================
Service "sakfrm.WORLD" has 1 instance(s).
Instance "sakfrm", status BLOCKED, has 1 handler(s) for this service...
========================
tnsping from the target side says OK.
How can I simply revert my aux database back to some kind of state where I can simply redo my restore. This is a duplication to a temporary database anyway so this can be as stripped down as possible. Alternatively, given that the restore did complete, is there any way to fix my control files and or init files so I can get it to open?