oracle11R2 log_archive_format

log_archive_format定义了归档文件名称的格式。

SQL> select * from v$version;

BANNER


Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

PL/SQL Release 11.2.0.3.0 - Production

CORE 11.2.0.3.0 Production

TNS for Linux: Version 11.2.0.3.0 - Production

NLSRTL Version 11.2.0.3.0 - Production

     default value

SQL> show parameter log_archive_format;

NAME TYPE VALUE


log_archive_format string %t_%s_%r.dbf

     detail

l %s:日志序列号

l %S:日志序列号(带有前导)

l %t:重做线程编号

l %T:重做线程编号(带有前导)

l %a:活动ID号

l %d:数据库ID号

l %r:resetlogs的ID值

modify

SQL> alter system set log_archive_format=’ARCH_%t_%s_%r.ARC’ scope=both;

alter system set log_archive_format=’ARCH_%t_%s_%r.ARC’ scope=both

             *

ERROR at line 1:

ORA-02095: specified initialization parameter cannot be modified

SQL> alter system set log_archive_format=’ARCH_%t_%s_%r.ARC’ scope=spfile;

System altered.

     restart

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup;

ORACLE instance started.

Total System Global Area 1603411968 bytes

Fixed Size 2228784 bytes

Variable Size 973082064 bytes

Database Buffers 620756992 bytes

Redo Buffers 7344128 bytes

Database mounted.

Database opened.

     check

SQL> show parameter log_archive_format;

NAME TYPE VALUE


log_archive_format string ARCH_%t_%s_%r.ARC

SQL> alter system switch logfile;

System altered.

[oracle@orcl01rmp]$ ls -l

total 43992

-rw-r—–. 1oracle oinstall 16677376 Jan 5 10:521_23_899396931.dbf

-rw-r—–. 1oracle oinstall 24066560 Jan 5 10:521_24_899396931.dbf

-rw-r—–. 1oracle oinstall 2202624 Jan 5 10:52 1_25_899396931.dbf

-rw-r—–. 1oracle oinstall 2093568 Jan 5 14:04 ARCH_1_27_899396931.ARC

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值