Académique Documents
Professionnel Documents
Culture Documents
1 of 5
2 of 5
<service>a % cd ~/../../etc
<service>a % vi oratab lsnrtab
put N in the oratab and lsnrtab so nothing auto starts.
N.B. As the shutdown step reconfigure the standby to be a primary.
Otherwise if they are performing cluster reconfiguration (rather than just a dns rename) the
services will automatically start.
STANDBY:
<service>a % cd ~/../../rc
<service>a % ./${SERVICE}a d (ensure you dont have multiple databases under same service)
Ensure all archives applied.
<service>a % sqlplus /as sysdba
SQL > select thread# "APPL_THREAD#",sequence# "APPL_SEQUENCE#" from v$archived_log
where recid in (select max(recid) from v$archived_log
where applied='YES'
and resetlogs_id = (select resetlogs_id from v$database_incarnation where
status='CURRENT')
group by thread#
)
order by thread#;
Pre requisite for snapshot standby setup is to have flash recovery area and its not mandatory to
switch on flashback.
1) Configure flash recovery area as given below
a) Set the size for recovery area, as part of the DR test app teams will do basic testing
so usage will be very very less, if available assign 10g otherwise 5g should also be
OK.
SQL > Alter system set db_recovery_file_dest_size=10g scope=both;
b) Set Flash recovery area.
Ensure you have flash recovery area else create one using below.
mkdir $ORACLE_ADMIN/flash
Use this location to create flash recovery destination example one is below.
Note please modify directory structure below accordingly
SQL > alter system set db_recovery_file_dest='/app/gors004/01/admin/GORS004T/flash'
scope=both;
2) Stop managed recovery if it is active.
SQL > Alter database recover managed standby database cancel;
3) Convert physical standby database to snapshot standby database.
SQL > ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
SQL > SELECT flashback_on FROM v$database;
FLASHBACK_ON
-----------------------------------------------------RESTORE POINT ONLY
An implicit guaranteed restore point is created when a physical standby database is
converted into a snapshot standby database and this restore point is used to flashback a
snapshot standby to its original state when it is converted back into a physical standby
database.
Set job_queue_processes and aq_tm_processes to 0 as we need to ensure unwanted jobs and
queues are not running. (Optional discuss with app team)
4) The database is dismounted during conversion and must be restarted.
SQL > Shut immediate;
SQL > Startup;
(Below is optional step discuss with app team)
Verify value of job_queue_processes and aq_tm_processes once again, these values can be
reset once dblinks are
recreated and correctly configured
5) Once the database is restarted any transaction can be executed.
SQL> select open_mode, database_role from v$database;
OPEN_MODE DATABASE_ROLE
---------- ---------------READ WRITE SNAPSHOT STANDBY
6) On standby change host name in local_listener parameter
SQL> alter system set local_listener='(address=(protocol=tcp)(host=oorp038a.eu.unilever.com)
(port=16572))' scope=both;
7) Finally stop standby services modify configuration files.
<service>a % ./${SERVICE}a stop (ensure you dont have multiple databases under same
service)
<service>a % cd ~/../../etc
<service>a % cp /app/${SERVICE}/01/etc/${SERVICE}a.definitions /app/${SERVICE}/01/etc/$
{SERVICE}a.definitions.orig
vi
Shutdown HACMP resources for prod AIX-cluster and reconfigure on DR AIX-Cluster UNIX task
Restore HACMP resources for DR AIX cluster and reconfigure on PROD AIX cluster - UNIX task
4 of 5
start recovery
SQL > alter database recover managed standby database disconnect;
References
5 of 5