有些测试环境,对数据的准确度要求不是很高的,可以切成非归档模式。
非归档改为归档模式比较简单,设定如下参数就可以了。
然后
startup mount
alter database archivelog;
aler database open
查看archive log lis就可以了
但是归档改为非归档,我试了一下,碰到了以下问题,
---关掉了flashback。。。。。之后重启
SQL>startup mount
SQL> alter database noarchivelog;
Database altered.
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文件按
可以用如下的sql来查询
select spid from v$process where addr in (
select addr from v$session where sid in (select sid from v$mystat where rownum
SQL> select spid from v$process where addr='3792379C';
SPID
------------
12718
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
这样归档就改为非归档模式了。
阅读(7199) | 评论(0) | 转发(3) |
0
上一篇:ORACLE数据文件名导致的奇怪问题
下一篇:归档和非归档模式下ORA-01145错误的解决方法