现在的位置: 首页 > 综合 > 正文

ORA-16179: incremental changes to “log_archive_dest_1″ not allowed with SPFILE

2013年10月10日 ⁄ 综合 ⁄ 共 1784字 ⁄ 字号 评论关闭

author: skate
time :2009/06/26


 

 

SQL> alter system set log_archive_dest_1='/oracle/product/9.2.0/arch' scope= spfile;
alter system set log_archive_dest_1='/oracle/product/9.2.0/arch' scope= spfile
*
第 1 行出现错误:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE

原因是少了LOCATION或SERVICE关键字

SQL> alter system set log_archive_dest_1='location=/oracle/product/9.2.0/arch' scope=spfile;

系统已更改。

SQL> alter system archive log all;
alter system archive log all
*
第 1 行出现错误:
ORA-00271: there are no logs that need archiving

SQL> alter system archive log current;

系统已更改。

SQL> alter system archive log current;

系统已更改。

说明:

ALTER SYSTEM SWITCH LOGFILE 是强制日志切换,不一定就归档当前的重做日志文件(若自动归档打开,就归档前的重做日志,若自动归档没有打开,就不归档当前重做日志。)
ALTER SYSTEM ARCHIVE LOG CURRENT 是归档当前的重做日志文件,如果自动归档有没有打开,将报ORA-00258错误。
alter system archive log all;--归档所有已填满的联机日志

主要的区别在于
ALTER SYSTEM SWITCH LOGFILE 对单实例数据库或RAC中的当前实例执行日志切换。
而ALTER SYSTEM ARCHIVE LOG CURRENT 会对数据库中的所有实例执行日志切换

一般的RMAN脚本都是写ALTER SYSTEM ARCHIVE LOG CURRENT ,因为RMAN是可以备份归档日志的。alter system archive log current 这样后就可以将所有的归档都备份出来了

归档进程查看
(1)select * rom v$bgprocess where paddr<>'0' and name like '%ARC%'
(2)ps -ef | grep ora_arc

.归档路径
(1)archive log list;
(2)show parameter LOG_ARCHIVE_DEST
(3select dest_name,destination,status from v$archive_dest;

删除归档日志
用rman命令
run{
allocate channel c type disk;
delete force noprompt archivelog all;
release channel c;
}

 

数据库启用归档
分为两种,一种:oracle10g以前版本,另外一种是oracle10g

 

oracle10g 以前如oracle9i

1.数据库mount状态,

sql> alter database archivelog;

2.更改相应参数,

sql> alter system set log_archive_start = true scope=spfile;

sql> archive log start   ---使数据库启用自动归档,但是重启后数据库仍然处于手工归档模式。

如归档目的地,这个是可选的,如果不想更改可以不修改这个参数

sql> alter system set log_archive_dest_1='location=/u01/arch' scope=spfile;

 

 

oracle10g启用归档日志

oracle10g已经取消log_archive_start

1.数据库mount状态,

sql> alter database archivelog;

2.更改相应参数,如归档目的地,

sql> alter system set log_archive_dest_1='location=/u01/arch' scope=spfile;

 

----end---

抱歉!评论已关闭.