ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How to enable the flashback database:

How to enable the flashback database:

原创 Linux操作系统 作者:oracle_ace 时间:2009-02-10 11:18:53 0 删除 编辑
How to enable the flashback database:
--------------------------------------
[root@plinuxt19 ~]# su - oracle
[oracle@plinuxt19 ~]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.3.0 - Production on Tue Feb 3 10:49:09 2009

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

SQL> conn / as sysdba;
Connected.

SQL> select name,log_mode from v$database;

NAME      LOG_MODE
--------- ------------
IRMDB     NOARCHIVELOG

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

SQL> startup mount
ORACLE instance started.

Total System Global Area 1375731712 bytes
Fixed Size                  2072672 bytes
Variable Size             570429344 bytes
Database Buffers          788529152 bytes
Redo Buffers               14700544 bytes
Database mounted.

SQL> archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /app/oracle/product/10g/dbs/arch
Oldest online log sequence     40
Current log sequence           42

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /app/oracle/product/10g/dbs/arch
Oldest online log sequence     40
Next log sequence to archive   42
Current log sequence           42

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
NO

SQL> show parameter db_recovery_file_dest;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string
db_recovery_file_dest_size           big integer 0

SQL> alter system set db_recovery_file_dest='/app/oracle/product/flash_recovery_area' scope=spfile;

System altered.

SQL> alter system set db_recovery_file_dest_size=3G scope=spfile;

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1375731712 bytes
Fixed Size                  2072672 bytes
Variable Size             570429344 bytes
Database Buffers          788529152 bytes
Redo Buffers               14700544 bytes
Database mounted.
Database opened.

SQL> show parameter db_recovery_file_dest;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /app/oracle/product/flash_reco
                                                 very_area
db_recovery_file_dest_size           big integer 3G

SQL> show parameter db_flashback_retention_target;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target        integer     1440

SQL> alter system set db_flashback_retention_target=2880 scope=spfile;

System altered.

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

SQL> startup mount;
ORACLE instance started.

Total System Global Area 1375731712 bytes
Fixed Size                  2072672 bytes
Variable Size             570429344 bytes
Database Buffers          788529152 bytes
Redo Buffers               14700544 bytes
Database mounted.

SQL> show parameter db_flashback_retention_target;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target        integer     2880

SQL> alter database flashback on;

Database altered.

SQL> alter database open;

Database altered.

SQL> select flashback_on from v$database;

FLASHBACK_ON
------------------
YES

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

请登录后发表评论 登录
全部评论

注册时间:2007-12-10

  • 博文量
    284
  • 访问量
    800502