Oracle数据库可以运行在两种模式下:归档模式(archivelog)和非归档模式(noarchivelog)
检查归档模式命令
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence
Current log sequence
设置归档模式
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 archivelog;
Database altered
SQL> alter database open;
Database altered
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence
Next log sequence to archive
Current log sequence
如果需要停止归档模式使用alter database noarchivelog 命令Oracleg之前你还需要修改初始化参数使数据库处于自动归档模式在pfile/spfile中设置如下参数
log_archive_start = true
重启数据库此参数生效此时数据库处于自动归档模式也可以在数据库启动过程中手工执行
archive log start
使数据库启用自动归档但是重启后数据库仍然处于手工归档模式g使用db_recovery_file_dest来作为归档日志的存放地
SQL> show parameter db_recovery
NAME TYPE VALUE
db_recovery_file_dest string /home/oracle/orag/flash_reco
very_area/
db_recovery_file_dest_size big integer G
可以修改db_recovery_file_dest_size参数的大小
alter system set db_recovery_file_dest_size=