-- 查看当前的归档模式
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination D:oracleora92RDBMS
Oldest online log sequence 0
Current log sequence 1
SQL> show parameter log_archive_start
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_start boolean FALSE
-- 第一步、修改log_archive_start参数
SQL> alter system set log_archive_start=true scope=spfile;
System altered.
-- 因为是修改参数文件,所以不会马上生效
SQL> show parameter log_archive_start
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_start boolean FALSE
-- 第二步、重新启动数据库
-- 先关闭
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
-- 再以挂载方式启动
SQL> startup mount
ORACLE instance started.
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
-- 第三步、改变数据库归档模式
SQL> alter database archivelog;
Database altered.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination D:oracleora92RDBMS
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1
-- 最后,重新打开数据库
SQL> alter database open;
Database altered.
--=========== 下面是反操作 ============--
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination D:oracleora92RDBMS
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1
SQL> alter system set log_archive_start=false 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 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL> archive log list
Database log mode Archive Mode
Automatic archival Disabled
Archive destination D:oracleora92RDBMS
Oldest online log sequence 0
Next log sequence to archive 1
Current log sequence 1
SQL> alter database noarchivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination D:oracleora92RDBMS
Oldest online log sequence 0
Current log sequence 1
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/17826/viewspace-912026/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/17826/viewspace-912026/