12c中alert log的时间格式

从12.2.0.1开始,oracle日志中默认的时间格式做了调整,会看到时间变成了统一的具有毫秒精度的格式

1
2
3
4
5
6
7
8
9
10
PDB$SEED(2):Endian type of dictionary set to little
PDB$SEED(2):Undo initialization finished serial:0 start:144555510 end:144555510 diff:0 ms (0.0 seconds)
PDB$SEED(2):Database Characterset for PDB$SEED is AL32UTF8
2018-11-28T14:25:19.056231+08:00
PDB$SEED(2):Opatch validation is skipped for PDB PDB$SEED (con_id=0)
2018-11-28T14:25:19.722898+08:00
PDB$SEED(2):Opening pdb with no Resource Manager plan active
2018-11-28T14:25:21.006576+08:00
Starting background process CJQ0
Completed: ALTER DATABASE OPEN

12.2.0.1之前的样式

1
2
3
4
5
6
7
8
9
10
11
12
13
Fri Aug 24 10:41:46 2018
MMNL started with pid=16, OS id=12084
starting up 1 shared server(s) ...
ORACLE_BASE from environment = /u01/app/oracle
Fri Aug 24 10:41:46 2018
ALTER DATABASE MOUNT
Changing di2dbun from to xb
Successful mount of redo thread 1, with mount id 2904689898
Database mounted in Exclusive Mode
Lost write protection disabled
Completed: ALTER DATABASE MOUNT
Fri Aug 24 10:41:50 2018
ALTER DATABASE OPEN

这是由于从12.2.0.1开始引入了新的参数UNIFORM_LOG_TIMESTAMP_FORMAT,这个参数默认是true,即表示oracle中所有的trc文件和log file文件(例如alert log)默认会使用新的时间格式,如果看不习惯可以修改回去

1
2
3
4
5
6
7
SYS@ora12c> alter system set UNIFORM_LOG_TIMESTAMP_FORMAT=FALSE scope=both;

System altered.

SYS@ora12c> alter system switch logfile;

System altered.

重新查看日志

1
2
3
ALTER SYSTEM SET uniform_log_timestamp_format=FALSE SCOPE=BOTH;
Wed Nov 28 14:39:45 2018
Thread 1 advanced to log sequence 4 (LGWR switch)

12c中alert log的时间格式
https://www.xbdba.com/2018/11/26/12c-alert-log-date-format/
作者
xbdba
发布于
2018年11月26日
许可协议