熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

Oracle10G啟用閃回功能

2022-06-13   來源: Oracle 

  [oracle@localhost ~]$ sqlplus /nolog

  SQL*Plus: Release Production on Mon May ::

  Copyright (c) Oracle All rights reserved

  SQL> connect /as sysdba
Connected

  SQL> show parameter db_recovery_file_dest;

  NAME TYPE VALUE

db_recovery_file_dest string
db_recovery_file_dest_size big integer

  SQL>
SQL> show parameter db_flashback_retention_target

  NAME TYPE VALUE

db_flashback_retention_target integer

  SQL> show parameter db_recovery_file_dest

  NAME TYPE VALUE

db_recovery_file_dest string
db_recovery_file_dest_size big integer

  SQL> alter system set db_recovery_file_dest_size=;

  System altered

  SQL> alter system set db_recovery_file_dest=/opt/oracle/product/flash_recovery_area;

  System altered

  SQL> show parameter db_flashback_retention_target

  NAME TYPE VALUE

db_flashback_retention_target integer

  SQL> shutdown immediate
Database closed
Database dismounted
ORACLE instance shut down

  SQL> startup mount
ORACLE instance started

  Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
Database mounted

  SQL> alter database flashback on;

  Database altered

  SQL> alter database open;

  Database altered

  SQL> select flashback_on from v$database;

  FLASHBACK_ON

YES

  SQL>

  OK!============

  後來發現問題

  ORA: 非系統表空間USERS無法使用系統回退段

  解決辦法

  PLSQL中

  select segment_namestatus from dba_rollback_segs;

  segment_namestatus

  

   SYSTEM ONLINE
RBS_SMALL OFFLINE

  alter rollback segment RBS_SMALL online;

  問題解決

  參考

發表於: : 主題
這個是因為當前只有system這個回滾段可用
可以查看當前系統回滾段信息
select segment_namestatus from dba_rollback_segs;


SEGMENT_NAME STATUS

SYSTEM ONLINE
RBS OFFLINE
如果有offline的使用alter rollback segment RBS online;
如果只有system這一行那就最好創建新的回滾段了
create rollback segment rbs_small storage(initial k next k minextents maxextents ) tablespace tools;
各個參數的含義你可以到google上搜到
From:http://tw.wingwit.com/Article/program/Oracle/201311/16538.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.