启动数据库flashback特性

     在oracle 12C 的环境下开启和关闭数据库闪回(flashbackup)功能。以下是简单的操作过程,但是在生产环境下不建议开启该功能。

点击(此处)折叠或打开

  1. [oracle@localhost ~]$ sqlplus / as sysdba
  2. SQL*Plus: Release 12.1.0.1.0 Production on Mon Dec 14 15:15:35 2015
  3. Copyright (c) 1982, 2013, Oracle. All rights reserved.
  4. Connected to:
  5. Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
  6. With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
  7. SQL> set linesize 200
  8. SQL> set pagesize 999
  9. SQL> SELECT flashback_on, log_mode FROM v$database;
  10. FLASHBACK_ON LOG_MODE
  11. ------------------ ------------
  12. NO ARCHIVELOG
  13. SQL>
  14. SQL>
  15. SQL>
  16. SQL> shutdown immediate;
  17. Database closed.
  18. Database dismounted.
  19. ORACLE instance shut down.
  20. SQL> startup mount;
  21. ORACLE instance started.
  22. Total System Global Area 835104768 bytes
  23. Fixed Size 2293880 bytes
  24. Variable Size 562040712 bytes
  25. Database Buffers 264241152 bytes
  26. Redo Buffers 6529024 bytes
  27. Database mounted.
  28. SQL> alter database flashback on;
  29. Database altered.
  30. SQL> alter database open;
  31. Database altered.
  32. SQL>
  33. SQL>
  34. SQL> SELECT flashback_on, log_mode FROM v$database;
  35. FLASHBACK_ON LOG_MODE
  36. ------------------ ------------
  37. YES ARCHIVELOG
  38. SQL> show parameter recovery
  39. NAME TYPE VALUE
  40. ------------------------------------ ----------- ------------------------------
  41. db_recovery_file_dest string /u01/app/oracle/fast_recovery_
  42. area
  43. db_recovery_file_dest_size big integer 4800M
  44. recovery_parallelism integer 0
  45. SQL> show parameter flashback
  46. NAME TYPE VALUE
  47. ------------------------------------ ----------- ------------------------------
  48. db_flashback_retention_target integer 1440

  49. SQL> alter system set db_flashback_retention_target=2880;
  50. System altered.

  51. SQL> show parameter flashback
  52. NAME TYPE VALUE
  53. ------------------------------------ ----------- ------------------------------
  54. db_flashback_retention_target integer 2880
  55. SQL> shutdown immedaite
  56. SP2-0717: illegal SHUTDOWN option
  57. SQL> shutdown immediate;
  58. Database closed.
  59. Database dismounted.
  60. ORACLE instance shut down.
  61. SQL> startup mount;
  62. ORACLE instance started.
  63. Total System Global Area 835104768 bytes
  64. Fixed Size 2293880 bytes
  65. Variable Size 562040712 bytes
  66. Database Buffers 264241152 bytes
  67. Redo Buffers 6529024 bytes
  68. Database mounted.
  69. SQL> alter database flashback off;
  70. Database altered.
  71. SQL> alter database open;
  72. Database altered.
  73. SQL> SELECT flashback_on, log_mode FROM v$database;
  74. FLASHBACK_ON LOG_MODE
  75. ------------------ ------------
  76. NO ARCHIVELOG
  77. SQL> show parameter recovery
  78. NAME TYPE VALUE
  79. ------------------------------------ ----------- ------------------------------
  80. db_recovery_file_dest string /u01/app/oracle/fast_recovery_
  81. area
  82. db_recovery_file_dest_size big integer 4800M
  83. recovery_parallelism integer 0
  84. SQL> show parameter flashback
  85. NAME TYPE VALUE
  86. ------------------------------------ ----------- ------------------------------
  87. db_flashback_retention_target integer 2880
  88. SQL>


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27039319/viewspace-1871988/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27039319/viewspace-1871988/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值