Bo's Oracle Station

查看: 1796|回复: 0

第2次活动:2017-07-16(星期日晚上7:00-10:00)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-7-15 16:25:39 | 显示全部楼层 |阅读模式
第二次活动:2017-07-16(星期日晚上7:00-10:00)

  1. select  d.FLASHBACK_ON
  2. from v_$database d;

  3. select  * from v$database_incarnation;

  4. alter database flashback  on;

  5. select  * from v$flashback_database_log;

  6. select  * from v$flashback_database_stat;

  7. ---------------

  8. select  * from v$restore_point;

  9. select current_scn from v$database;

  10. create restore point before_patch ;
复制代码


  1. ---------------------------------------------- LAB 5 ----------------------------------------------
  2.              5_基于时间的不完全恢复
  3. ---------------------------------------------- LAB 5 ----------------------------------------------


  4. ******************
  5. 你的主机信息如下:
  6. ******************
  7. 192.168.1.90

  8. station90.example.com

  9. Linux station90.example.com 2.6.32-696.el6.x86_64 #1 SMP Tue Feb 21 00:53:17 EST 2017 x86_64 x86_64 x86_64 GNU/Linux


  10. Name           Type           Target    State     Host        
  11. ------------------------------------------------------------
  12. ora.DATA.dg    ora....up.type ONLINE    ONLINE    station90   
  13. ora.FRA.dg     ora....up.type ONLINE    ONLINE    station90   
  14. ora....ER.lsnr ora....er.type ONLINE    ONLINE    station90   
  15. ora.asm        ora.asm.type   ONLINE    ONLINE    station90   
  16. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station90   
  17. ora.diskmon    ora....on.type ONLINE    ONLINE    station90   
  18. ora.orcl.db    ora....se.type ONLINE    ONLINE    station90   

  19. SQL*Plus: Release 11.2.0.1.0 Production on Sun Jul 16 20:44:03 2017

  20. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  21. SQL> Connected.
  22. SQL> SQL> SQL>
  23. A
  24. --------------------
  25. Botang
  26. ****************************
  27. The database open mode here:
  28. ****************************

  29. D
  30. -
  31. X

  32. OPEN_MODE
  33. --------------------
  34. READ WRITE
  35. **********************************
  36. The database archivelog mode here:
  37. **********************************
  38. Database log mode               Archive Mode
  39. Automatic archival               Enabled
  40. Archive destination               USE_DB_RECOVERY_FILE_DEST
  41. Oldest online log sequence     29
  42. Next log sequence to archive   31
  43. Current log sequence               31
  44. ***************************
  45. The database datafile here:
  46. ***************************

  47. TABLESPACE_NAME                STATUS
  48. ------------------------------ ---------------
  49. SYSTEM                               ONLINE
  50. SYSAUX                               ONLINE
  51. UNDOTBS1                       ONLINE
  52. TEMP                               ONLINE
  53. USERS                               ONLINE
  54. EXAMPLE                        ONLINE

  55. NAME                                                                  STATUS
  56. ----------------------------------------------------------------- ---------------
  57. +DATA/orcl/datafile/system.256.816169553                          SYSTEM
  58. +DATA/orcl/datafile/sysaux.257.816169553                          ONLINE
  59. +DATA/orcl/datafile/undotbs1.258.816169553                          ONLINE
  60. +DATA/orcl/datafile/users.259.816169553                           ONLINE
  61. +DATA/orcl/datafile/example.265.816169651                          ONLINE
  62. ******************************
  63. The database controlfile here:
  64. ******************************

  65. NAME
  66. -----------------------------------------------------------------
  67. +DATA/orcl/controlfile/current.260.816169631
  68. +FRA/orcl/controlfile/current.256.816169633
  69. **************************
  70. The database logfile here:
  71. **************************

  72. MEMBER
  73. --------------------------------------------------------------------------------
  74. +DATA/orcl/onlinelog/group_3.263.816169641
  75. +FRA/orcl/onlinelog/group_3.259.816169641
  76. +DATA/orcl/onlinelog/group_2.262.816169639
  77. +FRA/orcl/onlinelog/group_2.258.816169639
  78. +DATA/orcl/onlinelog/group_1.261.816169635
  79. +FRA/orcl/onlinelog/group_1.257.816169637
  80. SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  81. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  82. and Real Application Testing options


  83. SQL*Plus: Release 11.2.0.1.0 Production on Sun Jul 16 20:44:03 2017

  84. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  85. SQL> Connected.
  86. SQL> SQL> SQL>
  87. A
  88. --------------------
  89. Botang
  90. **************************
  91. Table successfully created.
  92. **************************

  93.          A
  94. ----------
  95.          1
  96. ********************************************************************************
  97. **************************
  98. After the displayed moment, the table will continuously be inserted with more
  99. rows, but finnally be droped.
  100. ********************************************************************************
  101. **************************


  102. SYSDATE
  103. -------------------
  104. 2017-07-16:20:44:09


  105.          A
  106. ----------
  107.          1
  108.          2
  109.          3
  110.          4
  111.          5
  112. SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  113. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  114. and Real Application Testing options




  115. SQL*Plus: Release 11.2.0.1.0 Production on Sun Jul 16 20:44:21 2017

  116. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  117. SQL> Connected.
  118. SQL> SQL> SQL>
  119. A
  120. --------------------
  121. Botang
  122. ****************************
  123. The destory take place here:
  124. ****************************
  125. SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  126. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  127. and Real Application Testing options


  128. THE END
复制代码

  1. ---------------------------------------------- LAB 6a ----------------------------------------------
  2.              6a_基于log序列号的不完全恢复
  3. ---------------------------------------------- LAB 6a ----------------------------------------------


  4. ******************
  5. 你的主机信息如下:
  6. ******************
  7. 192.168.1.90

  8. station90.example.com

  9. Linux station90.example.com 2.6.32-696.el6.x86_64 #1 SMP Tue Feb 21 00:53:17 EST 2017 x86_64 x86_64 x86_64 GNU/Linux


  10. Name           Type           Target    State     Host        
  11. ------------------------------------------------------------
  12. ora.DATA.dg    ora....up.type ONLINE    ONLINE    station90   
  13. ora.FRA.dg     ora....up.type ONLINE    ONLINE    station90   
  14. ora....ER.lsnr ora....er.type ONLINE    ONLINE    station90   
  15. ora.asm        ora.asm.type   ONLINE    ONLINE    station90   
  16. ora.cssd       ora.cssd.type  ONLINE    ONLINE    station90   
  17. ora.diskmon    ora....on.type ONLINE    ONLINE    station90   
  18. ora.orcl.db    ora....se.type ONLINE    ONLINE    station90   

  19. SQL*Plus: Release 11.2.0.1.0 Production on Sun Jul 16 21:44:41 2017

  20. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  21. SQL> Connected.
  22. SQL> SQL> SQL>
  23. A
  24. --------------------
  25. Botang
  26. ****************************
  27. The database open mode here:
  28. ****************************

  29. D
  30. -
  31. X

  32. OPEN_MODE
  33. --------------------
  34. READ WRITE
  35. **********************************
  36. The database archivelog mode here:
  37. **********************************
  38. Database log mode               Archive Mode
  39. Automatic archival               Enabled
  40. Archive destination               USE_DB_RECOVERY_FILE_DEST
  41. Oldest online log sequence     9
  42. Next log sequence to archive   11
  43. Current log sequence               11
  44. ***************************
  45. The database datafile here:
  46. ***************************

  47. TABLESPACE_NAME                STATUS
  48. ------------------------------ ---------------
  49. SYSTEM                               ONLINE
  50. SYSAUX                               ONLINE
  51. UNDOTBS1                       ONLINE
  52. TEMP                               ONLINE
  53. USERS                               ONLINE
  54. EXAMPLE                        ONLINE

  55. NAME                                                                  STATUS
  56. ----------------------------------------------------------------- ---------------
  57. +DATA/orcl/datafile/system.256.816169553                          SYSTEM
  58. +DATA/orcl/datafile/sysaux.257.816169553                          ONLINE
  59. +DATA/orcl/datafile/undotbs1.258.816169553                          ONLINE
  60. +DATA/orcl/datafile/users.259.816169553                           ONLINE
  61. +DATA/orcl/datafile/example.265.816169651                          ONLINE
  62. ******************************
  63. The database controlfile here:
  64. ******************************

  65. NAME
  66. -----------------------------------------------------------------
  67. +DATA/orcl/controlfile/current.260.816169631
  68. +FRA/orcl/controlfile/current.256.816169633
  69. **************************
  70. The database logfile here:
  71. **************************

  72. MEMBER
  73. --------------------------------------------------------------------------------
  74. +DATA/orcl/onlinelog/group_3.263.816169641
  75. +FRA/orcl/onlinelog/group_3.259.816169641
  76. +DATA/orcl/onlinelog/group_2.262.816169639
  77. +FRA/orcl/onlinelog/group_2.258.816169639
  78. +DATA/orcl/onlinelog/group_1.261.816169635
  79. +FRA/orcl/onlinelog/group_1.257.816169637
  80. SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  81. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  82. and Real Application Testing options


  83. SQL*Plus: Release 11.2.0.1.0 Production on Sun Jul 16 21:44:41 2017

  84. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  85. SQL> Connected.
  86. SQL> SQL> SQL>
  87. A
  88. --------------------
  89. Botang
  90. **************************
  91. Table successfully created.
  92. **************************

  93.          A
  94. ----------
  95.          1
  96. ********************************************************************************
  97. ***************************
  98. After the displayed moment, the table will continuously be inserted with more
  99. rows, but finnally be droped..
  100. ********************************************************************************
  101. ***************************


  102.    THREAD#  SEQUENCE#
  103. ---------- ----------
  104.          1           13
  105.          1           11
  106.          1           12
  107. Database log mode               Archive Mode
  108. Automatic archival               Enabled
  109. Archive destination               USE_DB_RECOVERY_FILE_DEST
  110. Oldest online log sequence     11
  111. Next log sequence to archive   13
  112. Current log sequence               13


  113.          A
  114. ----------
  115.          1
  116.          2
  117.          3
  118.          4
  119.          5
  120. SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  121. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  122. and Real Application Testing options




  123. SQL*Plus: Release 11.2.0.1.0 Production on Sun Jul 16 21:44:57 2017

  124. Copyright (c) 1982, 2009, Oracle.  All rights reserved.

  125. SQL> Connected.
  126. SQL> SQL> SQL>
  127. A
  128. --------------------
  129. Botang
  130. ****************************
  131. The destory take place here:
  132. ****************************
  133. SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  134. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  135. and Real Application Testing options


  136. THE END
复制代码


回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-4 09:09 , Processed in 0.086034 second(s), 24 queries .

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