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.1 person found this helpful
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.
Much obliged Paul, that's exactly the sort of thing I was looking for!
Just tested it and it doesn't quite do what I require.
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.
Apologies - if you want broker to not restore the database to an online state you will also need to disable it within the configuration beforehand:
1. set offline
2. disable database
3. backup with rman
4. mount database
5. enable database
Hope this helps.
Thanks Paul - that looks a bit more elegant than the solution I came up with which was to simply disable the broker in the primary database :-)