ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 今天早上将一个新的数据库$ORACLE_SID修改成归档模式,修改步骤如下:

今天早上将一个新的数据库$ORACLE_SID修改成归档模式,修改步骤如下:

原创 Linux操作系统 作者:orchidllh 时间:2005-03-01 00:00:00 0 删除 编辑
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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-02-21

  • 博文量
    180
  • 访问量
    842301