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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值