有些测试环境,对数据的准确度要求不是很高的,可以切成非归档模式。
非归档改为归档模式比较简单,设定如下参数就可以了。
alter database archivelog;
SQL> alter database noarchivelog;
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01531: a database already open by the instance
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 242
Next log sequence to archive 244
Current log sequence 244
SQL> show parameter log_archive
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------log_archive_dest string /u01/app/oracle/arch
然后我重启了一次,还是现实归档,尽管提示noarchvelog执行成功,
alter database backup controlfile to trace;
在udump下找到对应的spid的trace文件按
select spid from v$process where addr in (
select addr from v$session where sid in (select sid from v$mystat where rownum<2));
SQL> select spid from v$process where addr='3792379C';
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@oel1 admin]$ cd $ORACLE_BASE
[oracle@oel1 oracle]$ cd admin
[oracle@oel1 admin]$ cd *
[oracle@oel1 PODD]$ cd udump
[oracle@oel1 udump]$ ll *12718*
-rw-r----- 1 oracle dba 10070 Oct 30 22:29 podd_ora_12718.trc
CREATE CONTROLFILE REUSE DATABASE "PODD" NORESETLOGS
NOARCHIVELOG 把里面的force logging archivelog该为noarchivelog SQL> startup nomount
ORACLE instance started.
Total System Global Area 398458880 bytes
Fixed Size 1219664 bytes
Variable Size 113247152 bytes
Database Buffers 276824064 bytes
Redo Buffers 7168000 bytes
SQL> CREATE CONTROLFILE REUSE DATABASE "PODD" NORESETLOGS NOARCHIVELOG
。。。。。。
Control file created.
SQL> alter database open;
Database altered.
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 243
Current log sequence 245
这样归档就改为非归档模式了。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23718752/viewspace-747960/,如需转载,请注明出处,否则将追究法律责任。