oracle 9i 设置归档,操作记录:
oracle@suse002c:/opt/ggs> sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Mar 28 09:32:21 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> show parameter spfile
# 设置归档日志的目录
SQL> alter system set log_archive_dest_1='location=/opt/oracle/backup/archive';
System altered.
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string location=/opt/oracle/backup/ar
chive
log_archive_dest_10 string
#设置自动启动归档
SQL> alter system set log_archive_start=true scope=spfile;
System altered.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination /opt/oracle/backup/archive
Oldest online log sequence 78
Current log sequence 80
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 320306616 bytes
Fixed Size 740792 bytes
Variable Size 285212672 bytes
Database Buffers 33554432 bytes
Redo Buffers 798720 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 /opt/oracle/backup/archive
Oldest online log sequence 78
Next log sequence to archive 80
Current log sequence 80
SQL> alter system switch logfile;
System altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /opt/oracle/backup/archive
Oldest online log sequence 79
Next log sequence to archive 81
Current log sequence 81
SQL> alter system switch logfile;
System altered.
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
1 1 82 104857600 1 NO CURRENT
1138749 28-MAR-11
2 1 80 104857600 1 YES INACTIVE
1029520 24-MAR-11
3 1 81 104857600 1 YES INACTIVE
1138704 28-MAR-11
阅读(2137) | 评论(0) | 转发(0) |