我的db_recovery_file_dest_size 设的2G,结果不到一个月就撑满了,除了rman好像不知道如何删除,我希望关闭flashback,可是怎麽还是发现还在往里面写日志呢。
是不是还有其他的参数需要调整呢?
我的环境:
Linux 9 + oracle 10.1.0.2
我的操作:
SQL> startup mount
ORACLE instance started.
Total System Global Area 188743680 bytes
Fixed Size 778036 bytes
Variable Size 161751244 bytes
Database Buffers 25165824 bytes
Redo Buffers 1048576 bytes
Database mounted.
SQL> alter database flashback off;
Database altered.
SQL> alter database open;
Database altered.
日志:
Fri Nov 5 08:56:05 2004
ALTER DATABASE MOUNT
Fri Nov 5 08:56:05 2004
Controlfile identified with block size 16384
Fri Nov 5 08:56:09 2004
Setting recovery target incarnation to 2
Fri Nov 5 08:56:09 2004
Successful mount of redo thread 1,with mount id 3860288741
Fri Nov 5 08:56:09 2004
Database mounted in Exclusive Mode.
Completed: ALTER DATABASE MOUNT
Fri Nov 5 08:56:22 2004
alter database flashback off
Fri Nov 5 08:56:22 2004
Flashback Database Disabled?
Completed: alter database flashback off
Fri Nov 5 08:56:29 2004
alter database open
Fri Nov 5 08:56:29 2004
LGWR: STARTING ARCH PROCESSES
ARC0 started with pid=13,OS id=16760
ARC0: Archival started
Fri Nov 5 08:56:29 2004
LGWR: STARTING ARCH PROCESSES COMPLETE
LGWR: Primary database is in CLUSTER CONSISTENT mode
Fri Nov 5 08:56:29 2004
ARC0: Becoming the 'no FAL' ARCH
ARC0: Becoming the 'no SRL' ARCH
ARC1 started with pid=14,OS id=16762
ARC1: Archival started
ARC1: Becoming the heartbeat ARCH
Fri Nov 5 08:56:29 2004
Maximum redo generation record size = 120832 bytes
Maximum redo generation change vector size = 116476 bytes
Private_strands 0 at log switch
Thread 1 opened at log sequence 1023
Current log# 2 seq# 1023 mem# 0: /home/oracle/oradata/ora10g/redo02.log
Successful open of redo thread 1
Fri Nov 5 08:56:29 2004
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Fri Nov 5 08:56:29 2004
SMON: enabling cache recovery
Fri Nov 5 08:56:29 2004
Successfully onlined Undo Tablespace 1.
Fri Nov 5 08:56:29 2004
SMON: enabling tx recovery
Fri Nov 5 08:56:29 2004
Database Characterset is AL32UTF8
Fri Nov 5 08:56:29 2004
Published database character set on system events channel
Fri Nov 5 08:56:29 2004
All processes have switched to database character set
Fri Nov 5 08:56:30 2004
Starting background process QMNC
QMNC started with pid=15,OS id=16828
Fri Nov 5 08:56:30 2004
replication_dependency_tracking turned off (no async multimaster replication found)
Fri Nov 5 08:56:30 2004
Starting background process MMON
Starting background process MMNL
MMON started with pid=16,OS id=16856
MMNL started with pid=17,OS id=16858
Fri Nov 5 08:56:31 2004
Completed: alter database open
Fri Nov 5 08:56:34 2004
db_recovery_file_dest_size of 5120 MB is 42.82% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files,and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Fri Nov 5 09:06:53 2004
Private_strands 7 at log switch
Thread 1 advanced to log sequence 1024
Current log# 3 seq# 1024 mem# 0: /home/oracle/oradata/ora10g/redo03.log
Fri Nov 5 09:06:53 2004
ARC1: Evaluating archive log 2 thread 1 sequence 1023
Fri Nov 5 09:06:53 2004
ora10g; ARC1: Beginning to archive log 2 thread 1 sequence 1023 (2.2041739790:2.2041750599)
ARCH: Connecting to console port...
Fri Nov 5 09:06:53 2004
ora10g; ARC1: Creating local archive destination LOG_ARCHIVE_DEST_10: '/home/oracle/flash_recovery_area/ORA10G/archivelog/2004_11_05/o1_mf_1_1023_%u_.arc' (thread 1 sequence 1023)
ARCH: Connecting to console port...
Fri Nov 5 09:06:53 2004
ora10g; ARC1: Closing local archive destination LOG_ARCHIVE_DEST_10: '/home/oracle/flash_recovery_area/ORA10G/archivelog/2004_11_05/o1_mf_1_1023_0ronkftc_.arc'
ARCH: Connecting to console port...
Committing creation of archivelog '/home/oracle/flash_recovery_area/ORA10G/archivelog/2004_11_05/o1_mf_1_1023_0ronkftc_.arc'
Created Oracle managed file /home/oracle/flash_recovery_area/ORA10G/archivelog/2004_11_05/o1_mf_1_1023_0ronkftc_.arc
Fri Nov 5 09:06:53 2004
ora10g; ARC1: Completed archiving log 2 thread 1 sequence 1023
ARCH: Connecting to console port...
================
你好象需要取消flash recovery area
alter system set db_recovery_file_dest ='' scope=both
=================
谢谢,已经执行过了,这个命令倒是不强调必须在数据库mount且没有open的时候执行。
执行完了发现:
SQL> select * from v$recovery_file_dest;
NAME
--------------------------------------------------------------------------------
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
5368709120 0 0 0
但是那个目录的文件还是在的,我是不是可以手工删除了呢。
================
Re: 如何关闭flashback?
有两种方案,推荐用rman管理归档日志文件,前提是制定一个
合理的备份策略.
1. 使用RMAN,先做一个全备,并且写一个定期备份归档日志
的脚本,如果归档很大,可以每天执行,备份完毕后删除所有的
归档日志
run{
allocate channel c1 type disk ;
allocate channel c2 type disk ;
allocate channel c3 type disk ;
sql'alter system archive log current';
backup filesperset = 20 as BACKUPSET tag 'archivebak' archivelog all delete all input format?
'/u01/rmanbak/orcl/archive/arch%u_%s_%p.bak';
release channel c1;
release channel c2;
release channel c3;
}
# List backup
list backup of archivelog all;
2. 切换到非归档日志模式,同时禁用flashback,清除或者
转移归档日志,然后重新设置相关参数,mount数据库后
再启用归档. 这个操作比较简单,就不多说了.
参考:?http://blog.itpub.net/post/493/3574
?
?
From:http://orchidllh.itpub.net/post/4020/17743