oracle12c归档⽇志⽂件后缀为.dbf 问题说明:
建库时,归档路径默认使⽤了快速恢复区,归档⽇志⽂件后缀为.arc
⽣成的归档⽇志⽂件如下:
SQL>select thread#,sequence#,name,IS_RECOVERY_DEST_FILE from v$archived_log where name is not null; THREAD# SEQUENCE# NAME IS_RECOVERY_DEST_FILE
---------------------------------------------------------------------------------------------------------------------------------
130/oracle/app/fast_recovery_area/WIND2/archivelog/2021_09_06/o1_mf_1_30_jmc28528_.arc YES
131/oracle/app/fast_recovery_area/WIND2/archivelog/2021_09_06/o1_mf_1_31_jmckszw4_.arc YES 今天对两个数据库参数做了如下调整:
--修改归档路径为/Data/oradata/archivelog
格式化命令format参数SQL>alter system set standby_archive_dest='/Data/oradata/archivelog';
SQL>alter system set log_archive_dest_1='location=/Data/oradata/archivelog';
⼿动切换log后发现新⽣成的归档⽇志后缀变成了.dbf
SQL>alter system switch logfile;
SQL>select thread#,sequence#,name,IS_RECOVERY_DEST_FILE from v$archived_log where name is not null; THREAD# SEQUENCE# NAME IS_RECOVERY_DEST_FILE
---------------------------------------------------------------------------------------------------------------------------------
130/oracle/app/fast_recovery_area/WIND2/archivelog/2021_09_06/o1_mf_1_30_jmc28528_.arc YES
131/oracle/app/fast_recovery_area/WIND2/archivelog/2021_09_06/o1_mf_1_31_jmckszw4_.arc YES
132/Data/oradata/archivelog/1_32_1082313430.dbf NO
原因查:
SQL>show parameter archive_format
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%s_%r.dbf
因为当前设置的⽇志存储格式为: %t_%s_%r.dbf
修改⽅法:
--修改格式为:log_%t_%r_%s.dbf
SQL>alter system set log_archive_format='log_%t_%r_%s.dbf' scope=spfile;
SQL>shutdown immediate
SQL> startup
SQL>show parameter archive_format
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string log_%t_%r_%s.dbf
--修改格式为:%t_%r_%s.arc
SQL>alter system set log_archive_format='%t_%r_%s.arc' scope=spfile;
SQL>shutdown immediate
SQL> startup
SQL>show parameter archive_format
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%r_%s.arc
注意:
ADG中log_archive_format参数修改要指定sid,否则重启后修改⽆效(修改的过程不会报任何错误),修改命令如下:--修改格式为:log_%t_%r_%s.dbf
SQL>alter system set log_archive_format='log_%t_%r_%s.dbf' scope=spfile sid='adg1';
--修改格式为:%t_%r_%s.arc
SQL>alter system set log_archive_format='%t_%r_%s.arc' scope=spfile sid='adg1';
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论