Dataguardinaction Demo Output
Dataguardinaction Demo Output
Connected.
------------ Apply Lag Control
------------ Make sure RTQ is active
SQL> @sysdba_kokki
SQL> connect sys/oracle@kokki as sysdba
Connected.
SQL> alter database open;
Database altered.
Configuration - PeppiEnKokki
Configuration Status:
SUCCESS
Database - kokki
Database Status:
SUCCESS
VALUE UNIT
------------ ------------------------------
+00 00:00:00 day(2) to second(0) interval
14 rows updated.
SQL> rollback;
Rollback complete.
VALUE
------------
+00 00:00:15
Session altered.
COUNT(*)
----------
107
------------ Hmmmm
------------ Unset the standby_max_data_delay parameter
SQL> alter session set standby_max_data_delay = none;
Session altered.
VALUE
------------
+00 00:01:29
Session altered.
------------ Why
SQL> !./dg_apply_on kokki
DGMGRL> edit database kokki set state=apply-on;
Session altered.
COUNT(*)
----------
107
Session altered.
COUNT(*)
----------
107
COUNT(*)
----------
107
COUNT(*)
----------
107
------------ Clean up
------------ Automatic Block Media Recovery
------------ Create a tablespace to play with
SQL> connect system/oracle
Connected.
SQL> create tablespace corrupt datafile size 10m;
Tablespace created.
Table created.
ROWID
------------------
AAADtaAAFAAAACDAAI
Table created.
ROWID
------------------
AAADtbAAFAAAACLAAD
JOB
---------
MANAGER
TRACE
------------------------------------------------------------------------
--------
/u01/app/oracle/diag/rdbms/peppi/v1120/trace
------------ Clean up
SQL> drop table e1 purge;
Table dropped.
Table dropped.
Tablespace dropped.
------------ Role Based Services
DGMGRL> edit database kokki set state=apply-on;
connect sys/oracle@kokki
startup force mount
ORACLE instance started.
Database mounted.
SQL> @sysdba_peppi
SQL> connect sys/oracle@peppi as sysdba
Connected.
------------ See the Data Guard config
SQL> !./dg_show_config
DGMGRL> show configuration;
Configuration - PeppiEnKokki
Configuration Status:
SUCCESS
------------ Display the Oracle Restart config for the physical standby
SQL> !ssh el5 ~/dg11gR2/run_with_env.sh srvctl config db -d kokki
Database unique name: kokki
Database name: v1120
Oracle home: /u01/app/oracle/product/11.2.0
Oracle user: oracle
Spfile:
Domain: mount
Start options: open
Stop options: immediate
Database role: physical_standby
Management policy: AUTOMATIC
Disk Groups:
Services:
no rows selected
HOST_NAME
----------------------------------------------------------------
prutser.nl.oracle.com
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "v1120" on database "peppi"
Starting instance "v1120"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "kokki"
HOST_NAME
----------------------------------------------------------------
el5.nl.oracle.com
Configuration - PeppiEnKokki
Configuration Status:
SUCCESS
DATABASE_ROLE
----------------
SNAPSHOT STANDBY
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "v1120" on database "peppi"
Starting instance "v1120"...
ORACLE instance started.
Database mounted.
Database "peppi" converted successfully
Database altered.
Configuration - PeppiEnKokki
Configuration Status:
SUCCESS
Database - peppi
Database Status:
SUCCESS
------------ How can we add the RTQ service in the data dictionary?
SQL> !ssh el5 ~/dg11gR2/run_with_env.sh srvctl start service -d kokki -s
dg_rtq
HOST_NAME
----------------------------------------------------------------
prutser.nl.oracle.com
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "v1120" on database "kokki"
Starting instance "v1120"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "peppi"
HOST_NAME
----------------------------------------------------------------
el5.nl.oracle.com
HOST_NAME
----------------------------------------------------------------
prutser.nl.oracle.com
------------ Clean up
SQL> !srvctl stop service -d peppi -s dg_prod
SQL> @sysdba_peppi
SQL> connect sys/oracle@peppi as sysdba
Connected.
SQL> exec dbms_service.delete_service('dg_prod')