---
title: "Aix5.3下Oracle 10g设置归档模式[原创]"
author: "eryin"
date: "2010-04-08T22:52:43Z"
tags: []
categories: ["数据库"]
slug: "aix5-3-oracle-10g"
draft: false
lastmod: "2010-04-08T23:17:06Z"
id: 638474
url: "https://eryin.iteye.com/blog/638474"
---

***$ 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&gt; ***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&gt; ***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&gt; ***shutdown immediate;***

 

Database closed.  
Database dismounted.  
ORACLE instance shut down.

 

SQL&gt; ***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&gt; ***alter database archivelog;***

 

Database altered.

 

SQL&gt; ***alter database open;***

 

Database altered.

 

SQL&gt; ***alter system set LOG\_ARCHIVE\_DEST\_1='LOCATION=/ora\_data/cpntest/archive';***

 

System altered.

 

SQL&gt; ***shutdown immediate;***

 

Database closed.  
Database dismounted.  
ORACLE instance shut down.

 

SQL&gt; ***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&gt; ***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&gt; ***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](http://mven.cn/post/41.html)