Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FarSync feature summary :
- 3 Oracle linux machins , Database 12.1.0.2
- Primary machine :
- e20lora1 , database : ldb1
- Far sync machine :
- e20fs , database : ldb1fs
- Standby machine :
- e20rora1 , database : ldb1sb
- Main points :
- 1. we use active dataguard (standby can be query)
- 2. we use near real time :
- 2.1 data shipped from the redo log buffer (LGWR process)
- 2.2 write to local redo to FS (SYNC mode ) - (RFS process)
- 2.3 data shipped to standby (ASYNC) - (LNS process)
- 2.4 write to loadl redo in stnadnby - (RFS process)
- 2.5 apply there (MRP0)
- starting point - everying in sync
- ldb1 LGWR 87 77
- ldb1fs RFS 0 0
- ldb1fs RFS 87 77
- ldb1fs LNS 87 77
- ldb1fs RFS 0 0
- ldb1sb RFS 87 77
- ldb1sb RFS 0 0
- ldb1sb RFS 0 0
- ldb1sb RFS 0 0
- ldb1sb MRP0 87 77
- Test case 1 - new data is pushed to primary , while standby is down. FS - stay the same -up & running no restart
- ldb1 LGWR 90 52355
- ldb1fs RFS 0 0
- ldb1fs RFS 90 52355
- ldb1fs LNS 87 416
- ldb1fs RFS 0 0
- select INSTANCE_NAME,process,SEQUENCE#,BLOCK# from v$instance ,v$managed_standby where process in ('LGWR','LNS','RFS','MRP0')
- *
- ERROR at line 1:
- ORA-01034: ORACLE not available
- Process ID: 0
- Session ID: 0 Serial number: 0
- SQL> select count(*) from t_ts_Test;
- COUNT(*)
- ----------
- 200004
- SQL> exec p_ts_test(200000, 5000);
- PL/SQL procedure successfully completed.
- SQL> SQL> select count(*) from t_ts_Test;
- COUNT(*)
- ----------
- 400004
- SQL>
- primary is stopped . standby is started , FS - stay the same - up & running
- select INSTANCE_NAME,process,SEQUENCE#,BLOCK# from v$instance ,v$managed_standby where process in ('LGWR','LNS','RFS','MRP0')
- *
- ERROR at line 1:
- ORA-01034: ORACLE not available
- Process ID: 0
- Session ID: 0 Serial number: 0
- ldb1fs LNS 90 51202
- ldb1sb RFS 90 51202
- ldb1sb RFS 0 0
- ldb1sb RFS 0 0
- ldb1sb RFS 0 0
- ldb1sb MRP0 90 52778
- 05:13:04 [ 03-NOV-14 ])`SYS@ldb1sb>select count(*) from t_ts_test;
- COUNT(*)
- ----------
- 400004
- Elapsed: 00:00:00.02
- 05:14:24 [ 03-NOV-14 ] SYS@ldb1sb>
- Test case 2 - new data is pushed to primary , while standby is down. FS - is rebooted
- ldb1 LGWR 98 268
- ldb1fs RFS 0 0
- ldb1fs RFS 98 268
- ldb1fs LNS 95 41480
- ldb1fs RFS 0 0
- select INSTANCE_NAME,process,SEQUENCE#,BLOCK# from v$instance ,v$managed_standby where process in ('LGWR','LNS','RFS','MRP0')
- *
- ERROR at line 1:
- ORA-01034: ORACLE not available
- Process ID: 0
- Session ID: 0 Serial number: 0
- PL/SQL procedure successfully completed.
- SQL> select count(*) from t_ts_Test;
- COUNT(*)
- ----------
- 800004
- SQL>
- --> primary is stopped (Abort)
- --> Far sync is stopeed
- --> standby is started
- select INSTANCE_NAME,process,SEQUENCE#,BLOCK# from v$instance ,v$managed_standby where process in ('LGWR','LNS','RFS','MRP0')
- *
- ERROR at line 1:
- ORA-01034: ORACLE not available
- Process ID: 0
- Session ID: 0 Serial number: 0
- ldb1sb RFS 0 0
- ldb1sb RFS 0 0
- ldb1sb RFS 0 0
- This query from the standby so we've missing data (the data in the redo/not applied ):
- 06:22:37 [ 03-NOV-14 ] SYS@ldb1sb>select count(*) from t_ts_test;
- COUNT(*)
- ----------
- 720004
- Elapsed: 00:00:00.04
- 06:23:18 [ 03-NOV-14 ] SYS@ldb1sb>
- To complete we've to inistaite a fail over :
- DGMGRL> FAILOVER TO ldb1sb
- 06:56:23 [ 03-NOV-14 ]chSYS@ldb1sb> select count(*) from t_ts_Test;
- COUNT(*)
- ----------
- 800004
- Elapsed: 00:00:00.03
- 06:56:26 [ 03-NOV-14 ] SYS@ldb1sb>
- Appendix A - Dataguard configuration
- Primary machine :
- e20lora1 , database : ldb1
- Database - ldb1
- Role: PRIMARY
- Intended State: TRANSPORT-ON
- Instance(s):
- ldb1
- Properties:
- DGConnectIdentifier = 'ldb1'
- ObserverConnectIdentifier = ''
- LogXptMode = 'SYNC'
- RedoRoutes = '(LOCAL : ldb1fs SYNC)'
- DelayMins = '0'
- Binding = 'optional'
- MaxFailure = '0'
- MaxConnections = '1'
- ReopenSecs = '300'
- NetTimeout = '30'
- RedoCompression = 'DISABLE'
- LogShipping = 'ON'
- PreferredApplyInstance = ''
- ApplyInstanceTimeout = '0'
- ApplyLagThreshold = '0'
- TransportLagThreshold = '0'
- TransportDisconnectedThreshold = '30'
- ApplyParallel = 'AUTO'
- StandbyFileManagement = 'AUTO'
- ArchiveLagTarget = '0'
- LogArchiveMaxProcesses = '4'
- LogArchiveMinSucceedDest = '1'
- DbFileNameConvert = 'ldb1, ldb1sb'
- LogFileNameConvert = 'ldb1, ldb1sb'
- FastStartFailoverTarget = ''
- InconsistentProperties = '(monitor)'
- InconsistentLogXptProps = '(monitor)'
- SendQEntries = '(monitor)'
- LogXptStatus = '(monitor)'
- RecvQEntries = '(monitor)'
- StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.11)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ldb1_DGMGRL)(INSTANCE_NAME=ldb1)(SERVER=DEDICATED)))'
- StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
- AlternateLocation = ''
- LogArchiveTrace = '0'
- LogArchiveFormat = '%t_%s_%r.arc'
- TopWaitEvents = '(monitor)'
- Far sync machine :
- e20fs , database : ldb1fs
- Far Sync Instance - ldb1fs
- Transport Lag: 0 seconds (computed 0 seconds ago)
- Instance(s):
- ldb1fs
- Properties:
- DGConnectIdentifier = 'ldb1fs'
- LogXptMode = 'ASYNC'
- RedoRoutes = '(ldb1 : ldb1sb ASYNC)'
- Binding = 'optional'
- MaxFailure = '0'
- MaxConnections = '1'
- ReopenSecs = '300'
- NetTimeout = '30'
- RedoCompression = 'DISABLE'
- LogShipping = 'ON'
- TransportLagThreshold = '0'
- TransportDisconnectedThreshold = '30'
- LogArchiveMaxProcesses = '4'
- LogArchiveMinSucceedDest = '1'
- LogFileNameConvert = 'ldb1, ldb1fs'
- InconsistentProperties = '(monitor)'
- InconsistentLogXptProps = '(monitor)'
- LogXptStatus = '(monitor)'
- StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
- AlternateLocation = ''
- LogArchiveTrace = '0'
- LogArchiveFormat = '%t_%s_%r.arc'
- TopWaitEvents = '(monitor)'
- Standby machine :
- e20rora1 , database : ldb1sb
- Database - ldb1sb
- Role: PHYSICAL STANDBY
- Intended State: APPLY-ON
- Transport Lag: 0 seconds (computed 0 seconds ago)
- Apply Lag: 0 seconds (computed 0 seconds ago)
- Average Apply Rate: 14.00 KByte/s
- Active Apply Rate: 1.40 MByte/s
- Maximum Apply Rate: 1.40 MByte/s
- Real Time Query: ON
- Instance(s):
- ldb1sb
- Properties:
- DGConnectIdentifier = 'ldb1sb'
- ObserverConnectIdentifier = ''
- LogXptMode = 'ASYNC'
- RedoRoutes = ''
- DelayMins = '0'
- Binding = 'optional'
- MaxFailure = '0'
- MaxConnections = '1'
- ReopenSecs = '300'
- NetTimeout = '30'
- RedoCompression = 'DISABLE'
- LogShipping = 'ON'
- PreferredApplyInstance = ''
- ApplyInstanceTimeout = '0'
- ApplyLagThreshold = '0'
- TransportLagThreshold = '0'
- TransportDisconnectedThreshold = '30'
- ApplyParallel = 'AUTO'
- StandbyFileManagement = 'AUTO'
- ArchiveLagTarget = '0'
- LogArchiveMaxProcesses = '4'
- LogArchiveMinSucceedDest = '1'
- DbFileNameConvert = 'ldb1, ldb1sb'
- LogFileNameConvert = 'ldb1, ldb1sb'
- FastStartFailoverTarget = ''
- InconsistentProperties = '(monitor)'
- InconsistentLogXptProps = '(monitor)'
- SendQEntries = '(monitor)'
- LogXptStatus = '(monitor)'
- RecvQEntries = '(monitor)'
- StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ldb1sb_DGMGRL)(INSTANCE_NAME=ldb1sb)(SERVER=DEDICATED)))'
- StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
- AlternateLocation = ''
- LogArchiveTrace = '0'
- LogArchiveFormat = '%t_%s_%r.arc'
- TopWaitEvents = '(monitor)'
- Test case
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement