快捷搜索:  as  2018  FtCWSyGV  С˵  test  xxx  Ψһ  w3viyKQx

亚太集团娱乐_教你快速理解Oracle归档模式的命令及参数Oracle归档模式



Oracle数据库可以运行在两种模式下:归档模式(archivelog)和非归档模式(noarchive亚太集团娱乐log)。

反省归档模式敕令:

SQL> archive log list

Database log mode No Archive Mode

Automatic archival Disabled

Archiv亚太集团娱乐e destination USE_DB_RE亚太集团娱乐COVERY_FILE_DEST

Oldes亚太集团娱乐t online log sequence 15

Current log sequence 17

设置归档模式:

SQL> shutdown immediate;

Database closed.

Database 亚太集团娱乐dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

Total System Global Area 1258291200 bytes

Fixed Size 1219160 bytes

Variable Size 318768552 bytes

Database Buffers 922746880 bytes

Redo Buffers 15556608 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 15

Next log sequence to archive 17

Current log sequence 17

假如必要竣事归档模式,应用:alter database noarchivelog 敕令。Oracle10g之前,你还必要改动初始化参数使数据库处于自动归档模式。在pfile/spfile中设置如下参数:

log_archive_start = true

重启数据库此参数生效,此时数据库处于自动归档模式。也可以在数据库启动历程中,手工履行:

archive log start

使数据库启用自动归档,然则重启后数据库仍旧处于手工归档模式。10g应用db_recovery_file_dest来作为归档日志的寄放地。

SQL> show parameter db_recovery

NAME TYPE VALUE

db_recovery_file_dest string /home/oracle/ora10g/flash_reco

very_area/

db_recovery_file_dest_size big integer 20G

可以改动db_recovery_file_dest_size参数的大年夜小

alter system set db_recovery_file_dest_size=21474836480

您可能还会对下面的文章感兴趣: