This content has been marked as final. Show 6 replies
If you are using DG broker to manage your configuration it will always set the database state to what it expects it to be ... e.g. for primary online.
Before you perform your cold backup set the state for primary to be 'OFFLINE' in dg broker.
This should shutdown the primary instance for you, then when you mount it the broker shouldn't automatically open it as the intended state is "OFFLINE".
dgmgrl> edit database 'PRIM' set state = 'OFFLINE'; Operation requires shutdown of instance "PRIM" on database "PRIM".
Now perform your RMAN cold backup then go back into dgmgrl and set the state back to ONLINE which will open the database for you.
Seems I was a bit precipitous. Setting the database to OFFLINE in the DG broker caused the database to shutdown. When I then went into RMAN and MOUNTed it - shortly afterwards the ALTER DATABASE OPEN command was sent again and the database was fully opened.
My database is quite small so I managed to get the datafiles backed up whilst the database was offline however with a bigger database (and to be honest, any real database is going to be bigger than my little test database) I couldn't guarantee the database would be offline whilst all the datafiles were being backed up.