变更归档路径遇到的ORA-32017and ORA-16179

来源:互联网 发布:led编辑软件下载 编辑:程序博客网 时间:2024/06/10 18:56

1、查看数据库归档情况

SQL> archive log list

Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     5295
Next log sequence to archive   5304
Current log sequence           5304
SQL> show parameter archive


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
archive_lag_target                   integer     0
log_archive_config                   string
log_archive_dest                     string

log_archive_dest_1                   string

2、更改归档路径

SQL>  alter system set log_archive_dest_1='/opt/app/oracle/arch'  scope=both;
 alter system set log_archive_dest_1='/opt/app/oracle/arch'  scope=both
*
ERROR at line 1:
ORA-32017: failure in updating BOTH
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with BOTH


添加关键字 location 即可

SQL>  alter system set log_archive_dest_1='location=/opt/app/oracle/arch'  scope=both;


System altered.


SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /opt/app/oracle/arch
Oldest online log sequence     5295
Next log sequence to archive   5304
Current log sequence           5304

3、查看当前归档信息


SQL> select name,sequence#,first_change# from v$archived_log;

查看当前归档路径


原创粉丝点击