Aix5.3下Oracle 10g設置歸檔模式[原創]

$ sqlplus '/as sysdba'

 

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 10 13:38:57 2009

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

 

SQL> startup;

 

ORACLE instance started.

Total System Global Area 5016387584 bytes
Fixed Size                  2027744 bytes
Variable Size             922750752 bytes
Database Buffers         4076863488 bytes
Redo Buffers               14745600 bytes
Database mounted.
Database opened.

 

SQL> archive log list;

 

Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     62
Current log sequence           64

 

SQL> shutdown immediate;

 

Database closed.
Database dismounted.
ORACLE instance shut down.

 

SQL> startup mount;

 

ORACLE instance started.

Total System Global Area 5016387584 bytes
Fixed Size                  2027744 bytes
Variable Size             922750752 bytes
Database Buffers         4076863488 bytes
Redo Buffers               14745600 bytes
Database mounted.

 

SQL> alter database archivelog;

 

Database altered.

 

SQL> alter database open;

 

Database altered.

 

SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=/ora_data/cpntest/archive';

 

System altered.

 

SQL> shutdown immediate;

 

Database closed.
Database dismounted.
ORACLE instance shut down.

 

SQL> startup;

 

ORACLE instance started.

Total System Global Area 5016387584 bytes
Fixed Size                  2027744 bytes
Variable Size             922750752 bytes
Database Buffers         4076863488 bytes
Redo Buffers               14745600 bytes
Database mounted.
aDatabase opened.

 

SQL> archive log list;

 

Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /ora_data/cpntest/archive
Oldest online log sequence     62
Next log sequence to archive   64
Current log sequence           64

 

SQL> exit

 

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

 

注意:

 

如果是oracle9i,還需要更改如下參數:
alter system set log_archive_start=true scope=spfile;
但是如果在10g中也更改這些參數,數據庫重啓時會有如下提示:
ORA-32004: obsolete and/or deprecated parameter(s) specified
alter system set log_archive_format='%t_%s.dbf' scope=spfile;
但是如果在10g中也更改這些參數,數據庫會不能啓動,如下提示:
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORA-19905: log_archive_format must contain %s, %t and %r


本文來自:韋少乾博客(mven.cn)
詳細出處:http://mven.cn/post/41.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章