Advertisement
agonenil

Farsync test

Nov 3rd, 2014
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.98 KB | None | 0 0
  1. FarSync feature summary :
  2.  
  3. 3 Oracle linux machins , Database 12.1.0.2
  4.  
  5.  
  6. Primary machine :
  7. e20lora1 , database : ldb1
  8. Far sync machine :
  9. e20fs , database : ldb1fs
  10. Standby machine :
  11. e20rora1 , database : ldb1sb
  12.  
  13.  
  14. Main points :
  15. 1. we use active dataguard (standby can be query)
  16. 2. we use near real time :
  17. 2.1 data shipped from the redo log buffer (LGWR process)
  18. 2.2 write to local redo to FS (SYNC mode ) - (RFS process)
  19. 2.3 data shipped to standby (ASYNC) - (LNS process)
  20. 2.4 write to loadl redo in stnadnby - (RFS process)
  21. 2.5 apply there (MRP0)
  22.  
  23.  
  24. starting point - everying in sync
  25.  
  26. ldb1 LGWR 87 77
  27.  
  28. ldb1fs RFS 0 0
  29. ldb1fs RFS 87 77
  30. ldb1fs LNS 87 77
  31. ldb1fs RFS 0 0
  32.  
  33. ldb1sb RFS 87 77
  34. ldb1sb RFS 0 0
  35. ldb1sb RFS 0 0
  36. ldb1sb RFS 0 0
  37. ldb1sb MRP0 87 77
  38.  
  39.  
  40.  
  41. Test case 1 - new data is pushed to primary , while standby is down. FS - stay the same -up & running no restart
  42.  
  43.  
  44.  
  45.  
  46.  
  47. ldb1 LGWR 90 52355
  48.  
  49. ldb1fs RFS 0 0
  50. ldb1fs RFS 90 52355
  51. ldb1fs LNS 87 416
  52. ldb1fs RFS 0 0
  53. select INSTANCE_NAME,process,SEQUENCE#,BLOCK# from v$instance ,v$managed_standby where process in ('LGWR','LNS','RFS','MRP0')
  54. *
  55. ERROR at line 1:
  56. ORA-01034: ORACLE not available
  57. Process ID: 0
  58. Session ID: 0 Serial number: 0
  59.  
  60. SQL> select count(*) from t_ts_Test;
  61.  
  62. COUNT(*)
  63. ----------
  64. 200004
  65.  
  66. SQL> exec p_ts_test(200000, 5000);
  67.  
  68.  
  69. PL/SQL procedure successfully completed.
  70.  
  71. SQL> SQL> select count(*) from t_ts_Test;
  72.  
  73. COUNT(*)
  74. ----------
  75. 400004
  76.  
  77. SQL>
  78.  
  79.  
  80. primary is stopped . standby is started , FS - stay the same - up & running
  81.  
  82.  
  83. select INSTANCE_NAME,process,SEQUENCE#,BLOCK# from v$instance ,v$managed_standby where process in ('LGWR','LNS','RFS','MRP0')
  84. *
  85. ERROR at line 1:
  86. ORA-01034: ORACLE not available
  87. Process ID: 0
  88. Session ID: 0 Serial number: 0
  89.  
  90.  
  91.  
  92. ldb1fs LNS 90 51202
  93.  
  94. ldb1sb RFS 90 51202
  95. ldb1sb RFS 0 0
  96. ldb1sb RFS 0 0
  97. ldb1sb RFS 0 0
  98. ldb1sb MRP0 90 52778
  99.  
  100. 05:13:04 [ 03-NOV-14 ])`SYS@ldb1sb>select count(*) from t_ts_test;
  101.  
  102. COUNT(*)
  103. ----------
  104. 400004
  105.  
  106. Elapsed: 00:00:00.02
  107. 05:14:24 [ 03-NOV-14 ] SYS@ldb1sb>
  108.  
  109.  
  110.  
  111. Test case 2 - new data is pushed to primary , while standby is down. FS - is rebooted
  112.  
  113.  
  114.  
  115. ldb1 LGWR 98 268
  116.  
  117. ldb1fs RFS 0 0
  118. ldb1fs RFS 98 268
  119. ldb1fs LNS 95 41480
  120. ldb1fs RFS 0 0
  121. select INSTANCE_NAME,process,SEQUENCE#,BLOCK# from v$instance ,v$managed_standby where process in ('LGWR','LNS','RFS','MRP0')
  122. *
  123. ERROR at line 1:
  124. ORA-01034: ORACLE not available
  125. Process ID: 0
  126. Session ID: 0 Serial number: 0
  127.  
  128.  
  129.  
  130.  
  131. PL/SQL procedure successfully completed.
  132.  
  133. SQL> select count(*) from t_ts_Test;
  134.  
  135. COUNT(*)
  136. ----------
  137. 800004
  138.  
  139. SQL>
  140.  
  141.  
  142. --> primary is stopped (Abort)
  143. --> Far sync is stopeed
  144. --> standby is started
  145.  
  146. select INSTANCE_NAME,process,SEQUENCE#,BLOCK# from v$instance ,v$managed_standby where process in ('LGWR','LNS','RFS','MRP0')
  147. *
  148. ERROR at line 1:
  149. ORA-01034: ORACLE not available
  150. Process ID: 0
  151. Session ID: 0 Serial number: 0
  152.  
  153.  
  154.  
  155. ldb1sb RFS 0 0
  156. ldb1sb RFS 0 0
  157. ldb1sb RFS 0 0
  158.  
  159.  
  160. This query from the standby so we've missing data (the data in the redo/not applied ):
  161. 06:22:37 [ 03-NOV-14 ] SYS@ldb1sb>select count(*) from t_ts_test;
  162.  
  163. COUNT(*)
  164. ----------
  165. 720004
  166.  
  167. Elapsed: 00:00:00.04
  168. 06:23:18 [ 03-NOV-14 ] SYS@ldb1sb>
  169.  
  170.  
  171. To complete we've to inistaite a fail over :
  172. DGMGRL> FAILOVER TO ldb1sb
  173.  
  174.  
  175. 06:56:23 [ 03-NOV-14 ]chSYS@ldb1sb> select count(*) from t_ts_Test;
  176.  
  177. COUNT(*)
  178. ----------
  179. 800004
  180.  
  181. Elapsed: 00:00:00.03
  182. 06:56:26 [ 03-NOV-14 ] SYS@ldb1sb>
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192. Appendix A - Dataguard configuration
  193. Primary machine :
  194. e20lora1 , database : ldb1
  195.  
  196. Database - ldb1
  197.  
  198. Role: PRIMARY
  199. Intended State: TRANSPORT-ON
  200. Instance(s):
  201. ldb1
  202.  
  203. Properties:
  204. DGConnectIdentifier = 'ldb1'
  205. ObserverConnectIdentifier = ''
  206. LogXptMode = 'SYNC'
  207. RedoRoutes = '(LOCAL : ldb1fs SYNC)'
  208. DelayMins = '0'
  209. Binding = 'optional'
  210. MaxFailure = '0'
  211. MaxConnections = '1'
  212. ReopenSecs = '300'
  213. NetTimeout = '30'
  214. RedoCompression = 'DISABLE'
  215. LogShipping = 'ON'
  216. PreferredApplyInstance = ''
  217. ApplyInstanceTimeout = '0'
  218. ApplyLagThreshold = '0'
  219. TransportLagThreshold = '0'
  220. TransportDisconnectedThreshold = '30'
  221. ApplyParallel = 'AUTO'
  222. StandbyFileManagement = 'AUTO'
  223. ArchiveLagTarget = '0'
  224. LogArchiveMaxProcesses = '4'
  225. LogArchiveMinSucceedDest = '1'
  226. DbFileNameConvert = 'ldb1, ldb1sb'
  227. LogFileNameConvert = 'ldb1, ldb1sb'
  228. FastStartFailoverTarget = ''
  229. InconsistentProperties = '(monitor)'
  230. InconsistentLogXptProps = '(monitor)'
  231. SendQEntries = '(monitor)'
  232. LogXptStatus = '(monitor)'
  233. RecvQEntries = '(monitor)'
  234. StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.11)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ldb1_DGMGRL)(INSTANCE_NAME=ldb1)(SERVER=DEDICATED)))'
  235. StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
  236. AlternateLocation = ''
  237. LogArchiveTrace = '0'
  238. LogArchiveFormat = '%t_%s_%r.arc'
  239. TopWaitEvents = '(monitor)'
  240.  
  241.  
  242. Far sync machine :
  243. e20fs , database : ldb1fs
  244.  
  245. Far Sync Instance - ldb1fs
  246.  
  247. Transport Lag: 0 seconds (computed 0 seconds ago)
  248. Instance(s):
  249. ldb1fs
  250.  
  251. Properties:
  252. DGConnectIdentifier = 'ldb1fs'
  253. LogXptMode = 'ASYNC'
  254. RedoRoutes = '(ldb1 : ldb1sb ASYNC)'
  255. Binding = 'optional'
  256. MaxFailure = '0'
  257. MaxConnections = '1'
  258. ReopenSecs = '300'
  259. NetTimeout = '30'
  260. RedoCompression = 'DISABLE'
  261. LogShipping = 'ON'
  262. TransportLagThreshold = '0'
  263. TransportDisconnectedThreshold = '30'
  264. LogArchiveMaxProcesses = '4'
  265. LogArchiveMinSucceedDest = '1'
  266. LogFileNameConvert = 'ldb1, ldb1fs'
  267. InconsistentProperties = '(monitor)'
  268. InconsistentLogXptProps = '(monitor)'
  269. LogXptStatus = '(monitor)'
  270. StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
  271. AlternateLocation = ''
  272. LogArchiveTrace = '0'
  273. LogArchiveFormat = '%t_%s_%r.arc'
  274. TopWaitEvents = '(monitor)'
  275.  
  276.  
  277. Standby machine :
  278. e20rora1 , database : ldb1sb
  279.  
  280.  
  281. Database - ldb1sb
  282.  
  283. Role: PHYSICAL STANDBY
  284. Intended State: APPLY-ON
  285. Transport Lag: 0 seconds (computed 0 seconds ago)
  286. Apply Lag: 0 seconds (computed 0 seconds ago)
  287. Average Apply Rate: 14.00 KByte/s
  288. Active Apply Rate: 1.40 MByte/s
  289. Maximum Apply Rate: 1.40 MByte/s
  290. Real Time Query: ON
  291. Instance(s):
  292. ldb1sb
  293.  
  294. Properties:
  295. DGConnectIdentifier = 'ldb1sb'
  296. ObserverConnectIdentifier = ''
  297. LogXptMode = 'ASYNC'
  298. RedoRoutes = ''
  299. DelayMins = '0'
  300. Binding = 'optional'
  301. MaxFailure = '0'
  302. MaxConnections = '1'
  303. ReopenSecs = '300'
  304. NetTimeout = '30'
  305. RedoCompression = 'DISABLE'
  306. LogShipping = 'ON'
  307. PreferredApplyInstance = ''
  308. ApplyInstanceTimeout = '0'
  309. ApplyLagThreshold = '0'
  310. TransportLagThreshold = '0'
  311. TransportDisconnectedThreshold = '30'
  312. ApplyParallel = 'AUTO'
  313. StandbyFileManagement = 'AUTO'
  314. ArchiveLagTarget = '0'
  315. LogArchiveMaxProcesses = '4'
  316. LogArchiveMinSucceedDest = '1'
  317. DbFileNameConvert = 'ldb1, ldb1sb'
  318. LogFileNameConvert = 'ldb1, ldb1sb'
  319. FastStartFailoverTarget = ''
  320. InconsistentProperties = '(monitor)'
  321. InconsistentLogXptProps = '(monitor)'
  322. SendQEntries = '(monitor)'
  323. LogXptStatus = '(monitor)'
  324. RecvQEntries = '(monitor)'
  325. StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ldb1sb_DGMGRL)(INSTANCE_NAME=ldb1sb)(SERVER=DEDICATED)))'
  326. StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
  327. AlternateLocation = ''
  328. LogArchiveTrace = '0'
  329. LogArchiveFormat = '%t_%s_%r.arc'
  330. TopWaitEvents = '(monitor)'
  331.  
  332.  
  333.  
  334.  
  335. Test case
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement