Bo's Oracle Station

查看: 1492|回复: 0

第21次:2014.09.15

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2014-9-16 09:34:39 | 显示全部楼层 |阅读模式
station1-2014-09-15.txt:
  1. nnected to an idle instance.
  2. SQL> startup
  3. ORACLE instance started.

  4. Total System Global Area 1073741824 bytes
  5. Fixed Size                    1264968 bytes
  6. Variable Size                  276824760 bytes
  7. Database Buffers          788529152 bytes
  8. Redo Buffers                    7122944 bytes
  9. Database mounted.
  10. Database opened.
  11. SQL> exit
  12. Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
  13. With the Partitioning, OLAP and Data Mining options
  14. [oracle@station1 ~]$ lsnrctl services

  15. LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 14-SEP-2014 19:18:33

  16. Copyright (c) 1991, 2005, Oracle.  All rights reserved.

  17. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.1)(PORT=1521)))
  18. Services Summary...
  19. Service "PROD" has 2 instance(s).
  20.   Instance "PROD", status UNKNOWN, has 1 handler(s) for this service...
  21.     Handler(s):
  22.       "DEDICATED" established:0 refused:0
  23.          LOCAL SERVER
  24.   Instance "PROD", status READY, has 1 handler(s) for this service...
  25.     Handler(s):
  26.       "DEDICATED" established:9 refused:0 state:ready
  27.          LOCAL SERVER
  28. Service "PROD_DGB" has 1 instance(s).
  29.   Instance "PROD", status READY, has 1 handler(s) for this service...
  30.     Handler(s):
  31.       "DEDICATED" established:9 refused:0 state:ready
  32.          LOCAL SERVER
  33. Service "PROD_XPT" has 1 instance(s).
  34.   Instance "PROD", status READY, has 1 handler(s) for this service...
  35.     Handler(s):
  36.       "DEDICATED" established:9 refused:0 state:ready
  37.          LOCAL SERVER
  38. The command completed successfully
  39. [oracle@station1 ~]$ sqlplus /nolog   

  40. SQL*Plus: Release 10.2.0.2.0 - Production on Sun Sep 14 19:29:29 2014

  41. Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

  42. SQL> conn / as sysdba
  43. Connected.
  44. SQL> archive log list
  45. Database log mode               Archive Mode
  46. Automatic archival               Enabled
  47. Archive destination               USE_DB_RECOVERY_FILE_DEST
  48. Oldest online log sequence     5
  49. Next log sequence to archive   7
  50. Current log sequence               7
  51. SQL> exit
  52. Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
  53. With the Partitioning, OLAP and Data Mining options
  54. [oracle@station1 ~]$ cd /u01/app/
  55. [oracle@station1 app]$ ls
  56. oracle  oraInventory
  57. [oracle@station1 app]$ cd oracle
  58. [oracle@station1 oracle]$ ls
  59. admin  agent10g  flash_recovery_area  oradata  oraInventory  product
  60. [oracle@station1 oracle]$ cd flash_recovery_area/
  61. [oracle@station1 flash_recovery_area]$ ls
  62. PROD
  63. [oracle@station1 flash_recovery_area]$ cd PROD/
  64. [oracle@station1 PROD]$ ls
  65. archivelog  autobackup  flashback  onlinelog
  66. [oracle@station1 PROD]$ cd archivelog
  67. [oracle@station1 archivelog]$ ls
  68. 2014_08_31  2014_09_04  2014_09_10  2014_09_12  2014_09_14
  69. [oracle@station1 archivelog]$ cd 2014_09_14
  70. [oracle@station1 2014_09_14]$ ls
  71. o1_mf_1_10_b1bn8dcx_.arc  o1_mf_1_23_b1brk0hn_.arc  o1_mf_1_57_b19vqs3f_.arc  o1_mf_1_6_b1bl5jz2_.arc   o1_mf_1_82_b1b4vlyx_.arc
  72. o1_mf_1_11_b1bn8xo3_.arc  o1_mf_1_24_b1bsdhcb_.arc  o1_mf_1_58_b19vrnjy_.arc  o1_mf_1_6_b1by8fn1_.arc   o1_mf_1_83_b1b4vm7t_.arc
  73. o1_mf_1_12_b1bn91gy_.arc  o1_mf_1_25_b1bsdhj2_.arc  o1_mf_1_59_b19vsfvj_.arc  o1_mf_1_70_b1b03wmf_.arc  o1_mf_1_84_b1b4vs79_.arc
  74. o1_mf_1_13_b1bn9415_.arc  o1_mf_1_26_b1bsdtf7_.arc  o1_mf_1_5_b1bl40n3_.arc   o1_mf_1_71_b1b03x1c_.arc  o1_mf_1_85_b1b4vso0_.arc
  75. o1_mf_1_14_b1bnf07z_.arc  o1_mf_1_28_b1bsf0gg_.arc  o1_mf_1_5_b1by5zkd_.arc   o1_mf_1_72_b1b0nvow_.arc  o1_mf_1_86_b1bh5pjh_.arc
  76. o1_mf_1_15_b1bnf0tz_.arc  o1_mf_1_29_b1bsf0kh_.arc  o1_mf_1_60_b19w3c4k_.arc  o1_mf_1_73_b1b46jgo_.arc  o1_mf_1_87_b1bhcwkh_.arc
  77. o1_mf_1_16_b1bnf3jz_.arc  o1_mf_1_2_b1bhzrrb_.arc   o1_mf_1_61_b19w5p1v_.arc  o1_mf_1_74_b1b46jrk_.arc  o1_mf_1_88_b1bhcwm5_.arc
  78. o1_mf_1_17_b1bnfdlw_.arc  o1_mf_1_2_b1btd2rm_.arc   o1_mf_1_62_b19wh1l5_.arc  o1_mf_1_75_b1b46vw1_.arc  o1_mf_1_89_b1bhd6sx_.arc
  79. o1_mf_1_18_b1bnlzpv_.arc  o1_mf_1_30_b1bsr5pd_.arc  o1_mf_1_63_b19whr28_.arc  o1_mf_1_76_b1b46w3t_.arc  o1_mf_1_8_b1bmft1y_.arc
  80. o1_mf_1_19_b1bnmls3_.arc  o1_mf_1_3_b1bksmyd_.arc   o1_mf_1_64_b19wj5br_.arc  o1_mf_1_77_b1b471ch_.arc  o1_mf_1_91_b1bhddss_.arc
  81. o1_mf_1_1_b1bhtf6n_.arc   o1_mf_1_3_b1by5hrn_.arc   o1_mf_1_65_b19wpdyt_.arc  o1_mf_1_78_b1b471wx_.arc  o1_mf_1_92_b1bhdf5b_.arc
  82. o1_mf_1_1_b1bsrcmt_.arc   o1_mf_1_4_b1bl0nqm_.arc   o1_mf_1_66_b1b03k7l_.arc  o1_mf_1_79_b1b4ovf2_.arc  o1_mf_1_93_b1bhsz37_.arc
  83. o1_mf_1_20_b1bno1xk_.arc  o1_mf_1_4_b1by5zft_.arc   o1_mf_1_67_b1b03kjs_.arc  o1_mf_1_7_b1bmfghf_.arc   o1_mf_1_9_b1bmg92r_.arc
  84. o1_mf_1_21_b1bqc6pd_.arc  o1_mf_1_55_b19vqfm9_.arc  o1_mf_1_68_b1b03pt6_.arc  o1_mf_1_80_b1b4v8gt_.arc
  85. o1_mf_1_22_b1bqcbrh_.arc  o1_mf_1_56_b19vqkrn_.arc  o1_mf_1_69_b1b03q5r_.arc  o1_mf_1_81_b1b4v8t3_.arc
  86. [oracle@station1 2014_09_14]$ ls -ltr o1_mf_1_1_*
  87. -rw-r----- 1 oracle oinstall 1024 Sep 14 15:10 o1_mf_1_1_b1bhtf6n_.arc
  88. -rw-r----- 1 oracle oinstall 1024 Sep 14 17:59 o1_mf_1_1_b1bsrcmt_.arc
  89. [oracle@station1 2014_09_14]$ md5sum  o1_mf_1_12_b1bn91gy_.arc
  90. 37a6e8dbcb683aee59e50eb64f29e9e1  o1_mf_1_12_b1bn91gy_.arc
  91. [oracle@station1 2014_09_14]$ sqlplus /nolog

  92. SQL*Plus: Release 10.2.0.2.0 - Production on Sun Sep 14 19:34:15 2014

  93. Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

  94. SQL> conn / as sysdba
  95. Connected.
  96. SQL> show parameter log_Archive_format

  97. NAME                                     TYPE         VALUE
  98. ------------------------------------ ----------- ------------------------------
  99. log_archive_format                     string         %t_%s_%r.dbf
  100. SQL> exit
  101. Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
  102. With the Partitioning, OLAP and Data Mining options
  103. [oracle@station1 2014_09_14]$ scp o1_mf_1_1_b1bsrcmt_.arc  station2:/u01/app/oracle/stdbyarch/LOGSTDBY/
  104. oracle@station2's password:
  105. o1_mf_1_1_b1bsrcmt_.arc                                                                                            100% 1024     1.0KB/s   00:00   
  106. [oracle@station1 2014_09_14]$ sqlplus /nolog

  107. SQL*Plus: Release 10.2.0.2.0 - Production on Sun Sep 14 19:42:36 2014

  108. Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

  109. SQL> conn hr/hr
  110. Connected.
  111. SQL> select  *  from tab;

  112. TNAME                               TABTYPE        CLUSTERID
  113. ------------------------------ ------- ----------
  114. T762                               TABLE
  115. T1351                               TABLE

  116. SQL> select  * from T1351;

  117.          A
  118. ----------
  119.          1

  120. SQL> update T1351 set a=2 ;

  121. 1 row updated.

  122. SQL> commit;

  123. Commit complete.

  124. SQL> select  * from T1351;

  125.          A
  126. ----------
  127.          2

  128. SQL> update T1351 set a=3;

  129. 1 row updated.

  130. SQL> commit;

  131. Commit complete.

  132. SQL>
复制代码

station2-2014-09-15.txt:
  1. Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

  2. SQL> conn / as sysdba
  3. Connected to an idle instance.
  4. SQL> startup
  5. ORACLE instance started.

  6. Total System Global Area 1073741824 bytes
  7. Fixed Size                    1264968 bytes
  8. Variable Size                  260047544 bytes
  9. Database Buffers          805306368 bytes
  10. Redo Buffers                    7122944 bytes
  11. Database mounted.
  12. Database opened.
  13. SQL> exit
  14. Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
  15. With the Partitioning, OLAP and Data Mining options
  16. [oracle@station2 ~]$ lsnrctl services

  17. LSNRCTL for Linux: Version 10.2.0.2.0 - Production on 14-SEP-2014 19:18:59

  18. Copyright (c) 1991, 2005, Oracle.  All rights reserved.

  19. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.2)(PORT=1521)))
  20. Services Summary...
  21. Service "EMREP" has 1 instance(s).
  22.   Instance "EMREP", status READY, has 1 handler(s) for this service...
  23.     Handler(s):
  24.       "DEDICATED" established:17 refused:0 state:ready
  25.          LOCAL SERVER
  26. Service "EMREP_XPT" has 1 instance(s).
  27.   Instance "EMREP", status READY, has 1 handler(s) for this service...
  28.     Handler(s):
  29.       "DEDICATED" established:17 refused:0 state:ready
  30.          LOCAL SERVER
  31. Service "LOGSTDBY" has 1 instance(s).
  32.   Instance "LOGSTDBY", status READY, has 1 handler(s) for this service...
  33.     Handler(s):
  34.       "DEDICATED" established:9 refused:0 state:ready
  35.          LOCAL SERVER
  36. Service "LOGSTDBY_DGB" has 1 instance(s).
  37.   Instance "LOGSTDBY", status READY, has 1 handler(s) for this service...
  38.     Handler(s):
  39.       "DEDICATED" established:9 refused:0 state:ready
  40.          LOCAL SERVER
  41. Service "LOGSTDBY_DGMGRL" has 1 instance(s).
  42.   Instance "LOGSTDBY", status UNKNOWN, has 1 handler(s) for this service...
  43.     Handler(s):
  44.       "DEDICATED" established:8 refused:0
  45.          LOCAL SERVER
  46. Service "LOGSTDBY_XPT" has 1 instance(s).
  47.   Instance "LOGSTDBY", status READY, has 1 handler(s) for this service...
  48.     Handler(s):
  49.       "DEDICATED" established:9 refused:0 state:ready
  50.          LOCAL SERVER
  51. Service "STDBY_DGMGRL" has 1 instance(s).
  52.   Instance "STDBY", status UNKNOWN, has 1 handler(s) for this service...
  53.     Handler(s):
  54.       "DEDICATED" established:0 refused:0
  55.          LOCAL SERVER
  56. The command completed successfully
  57. [oracle@station2 ~]$ cd /u01/app/
  58. [oracle@station2 app]$ ls
  59. oracle  oraInventory
  60. [oracle@station2 app]$ cd oracle/
  61. [oracle@station2 oracle]$ ls
  62. admin  flash_recovery_area  OracleHomes  oradata  oraInventory  product  stdbyarch
  63. [oracle@station2 oracle]$ cd stdbyarch
  64. [oracle@station2 stdbyarch]$ ls
  65. LOGSTDBY
  66. [oracle@station2 stdbyarch]$ cd LOGSTDBY/
  67. [oracle@station2 LOGSTDBY]$ ls
  68. 1_10_858265791.dbf  1_12_858265791.dbf  1_14_858265791.dbf  1_24_858265791.dbf  1_26_858265791.dbf  1_28_858265791.dbf  1_6_858275973.dbf
  69. 1_11_858265791.dbf  1_13_858265791.dbf  1_1_858275973.dbf   1_25_858265791.dbf  1_27_858265791.dbf  1_29_858265791.dbf  dgarc
  70. [oracle@station2 LOGSTDBY]$ pwd
  71. /u01/app/oracle/stdbyarch/LOGSTDBY
  72. [oracle@station2 LOGSTDBY]$ md5sum 1_12_858265791.dbf
  73. 37a6e8dbcb683aee59e50eb64f29e9e1  1_12_858265791.dbf
  74. [oracle@station2 LOGSTDBY]$ ls
  75. 1_10_858265791.dbf  1_12_858265791.dbf  1_14_858265791.dbf  1_24_858265791.dbf  1_26_858265791.dbf  1_28_858265791.dbf  1_6_858275973.dbf
  76. 1_11_858265791.dbf  1_13_858265791.dbf  1_1_858275973.dbf   1_25_858265791.dbf  1_27_858265791.dbf  1_29_858265791.dbf  dgarc
  77. [oracle@station2 LOGSTDBY]$ pwd
  78. /u01/app/oracle/stdbyarch/LOGSTDBY
  79. [oracle@station2 LOGSTDBY]$ ls
  80. 1_10_858265791.dbf  1_13_858265791.dbf  1_24_858265791.dbf  1_27_858265791.dbf  1_6_858275973.dbf
  81. 1_11_858265791.dbf  1_14_858265791.dbf  1_25_858265791.dbf  1_28_858265791.dbf  dgarc
  82. 1_12_858265791.dbf  1_1_858275973.dbf   1_26_858265791.dbf  1_29_858265791.dbf  o1_mf_1_1_b1bsrcmt_.arc
  83. [oracle@station2 LOGSTDBY]$ pwd
  84. /u01/app/oracle/stdbyarch/LOGSTDBY
  85. [oracle@station2 LOGSTDBY]$ . oraenv
  86. ORACLE_SID = [LOGSTDBY] ?
  87. [oracle@station2 LOGSTDBY]$ sqlplus /nolog

  88. SQL*Plus: Release 10.2.0.2.0 - Production on Sun Sep 14 19:37:06 2014

  89. Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

  90. SQL> conn / as sysdba
  91. Connected.
  92. SQL> alter database register logical logfile '/u01/app/oracle/stdbyarch/LOGSTDBY/o1_mf_1_1_b1bsrcmt_.arc';

  93. Database altered.

  94. SQL> alter database start logical apply immediate;
  95. alter database start logical apply immediate
  96.                              *
  97. ERROR at line 1:
  98. ORA-00905: missing keyword


  99. SQL>  alter database start logical standby apply immediate;
  100. alter database start logical standby apply immediate
  101. *
  102. ERROR at line 1:
  103. ORA-16103: Logical Standby apply must be stopped to allow this operation


  104. SQL>  alter database stop logical standby apply ;

  105. Database altered.

  106. SQL> alter database start logical standby apply immediate;

  107. Database altered.

  108. SQL> conn hr/hr
  109. Connected.
  110. SQL> select  * from t1351;

  111.          A
  112. ----------
  113.          1

  114. SQL> /

  115.          A
  116. ----------
  117.          1

  118. SQL> /

  119.          A
  120. ----------
  121.          1

  122. SQL> /

  123.          A
  124. ----------
  125.          2

  126. SQL> /

  127.          A
  128. ----------
  129.          2

  130. SQL> /

  131.          A
  132. ----------
  133.          2

  134. SQL> /

  135.          A
  136. ----------
  137.          2

  138. SQL> /

  139.          A
  140. ----------
  141.          3

  142. SQL>
复制代码

2014-09-15.sql:
  1. select  * from dba_logstdby_events  order by event_time desc;

  2. select  * from v$logstdby_process;

  3. select  * from dba_logstdby_log;

  4. select * from v$logstdby_state;

  5. select  * from v$logstdby_progress;

  6. select  * from dba_logstdby_parameters;


  7. begin
  8.    dbms_logstdby.apply_set('LOG_AUTO_DELETE','FALSE');
  9. end;
复制代码

2014-09-15.txt:

  1. select  * from dba_logstdby_events  order by event_time desc;

  2. select  * from v$logstdby_process;

  3. select  * from dba_logstdby_log;

  4. select * from v$logstdby_state;

  5. select  * from v$logstdby_progress;
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-22 11:28 , Processed in 0.043558 second(s), 24 queries .

快速回复 返回顶部 返回列表