今天早上將一個新的資料庫$ORACLE_SID修改成歸檔模式,修改步驟如下:

orchidllh發表於2005-03-01
1、修改log_archive_dest_1和log_archive_start
SQL> alter system set log_archive_dest_1 = 'LOCATION=/home/oracle/oradata/$ORACLE_SID/arch' scope = both;

System altered.



SQL> alter system set log_archive_start = TRUE scope = spfile;

System altered.

SQL> shutdown immediate 
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area 1002438656 bytes
Fixed Size                   782224 bytes
Variable Size             254021744 bytes
Database Buffers          746586112 bytes
Redo Buffers                1048576 bytes
Database mounted.

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /home/oracle/oradata/$ORACLE_SID/arch
Oldest online log sequence     104
Next log sequence to archive   106
Current log sequence           106

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area 1002438656 bytes
Fixed Size                   782224 bytes
Variable Size             254021744 bytes
Database Buffers          746586112 bytes
Redo Buffers                1048576 bytes
Database mounted.
Database opened.

2、提示有一個引數已經過期了,將其修改回預設值
SQL> alter system set log_archive_start = FALSE scope = spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area 1002438656 bytes
Fixed Size                   782224 bytes
Variable Size             254021744 bytes
Database Buffers          746586112 bytes
Redo Buffers                1048576 bytes
Database mounted.
Database opened.

3、修改回預設值仍然提示錯誤,從引數檔案刪除
SQL> create pfile from spfile;

File created.

[oracle@localhost dbs]$ vi init$ORACLE_SID.ora  ---從pfile檔案刪除行log_archive_star

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile = $ORACLE_HOME/dbs/init$ORACLE_SID.ora
ORACLE instance started.

Total System Global Area 1002438656 bytes
Fixed Size                   782224 bytes
Variable Size             254021744 bytes
Database Buffers          746586112 bytes
Redo Buffers                1048576 bytes
Database mounted.
Database opened.

SQL> create spfile from pfile
  2  ;

File created.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1002438656 bytes
Fixed Size                   782224 bytes
Variable Size             254021744 bytes
Database Buffers          746586112 bytes
Redo Buffers                1048576 bytes
Database mounted.
Database opened.
SQL> select decode(count(*), 1, 'spfile', 'pfile' ) USED from v$spparameter where rownum=1 and isspecified='TRUE';

USED
------
spfile

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/51862/viewspace-180607/,如需轉載,請註明出處,否則將追究法律責任。

相關文章