[20120109] 11g alert log的一些细小变化.txt
我个人检查数据库,查看alert log文件,喜欢查看文本格式,而不喜欢查看xml格式的文件,对于adrci的命令不是很熟悉,以及不习惯使用.
今天查看对比了两个格式的文件,发现以后要习惯查看xml格式,学会使用adrci命令.
对比如下:
1.xml格式的文件可以精确到milliseconds.
Thread 1 cannot allocate new log, sequence 264
Checkpoint not complete
Current log# 3 seq# 263 mem# 0: +DATA/test/onlinelog/group_3.265.762883411
Current log# 3 seq# 263 mem# 1: +DATA/test/onlinelog/group_3.264.762883411
2012-01-06 10:59:48.677000 +08:00
2012-01-06 10:59:48.677000 +08:00
Thread 1 advanced to log sequence 264 (LGWR switch)
Current log# 1 seq# 264 mem# 0: +DATA/test/onlinelog/group_1.263.762883415
Current log# 1 seq# 264 mem# 1: +DATA/test/onlinelog/group_1.262.762883415
2012-01-06 10:59:50.252000 +08:00
Archived Log entry 259 added for thread 1 sequence 263 ID 0x7ad4e61f dest 1:
2012-01-06 17:11:54.832000 +08:00
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
2012-01-06 17:11:57.014000 +08:00
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
2012-01-06 17:11:59.780000 +08:00
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
2012-01-06 17:12:02.584000 +08:00
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
2012-01-06 17:13:49.250000 +08:00
alert_test.log:
Fri Jan 06 10:59:46 2012
Thread 1 cannot allocate new log, sequence 264
Checkpoint not complete
Current log# 3 seq# 263 mem# 0: +DATA/test/onlinelog/group_3.265.762883411
Current log# 3 seq# 263 mem# 1: +DATA/test/onlinelog/group_3.264.762883411
Thread 1 advanced to log sequence 264 (LGWR switch)
Current log# 1 seq# 264 mem# 0: +DATA/test/onlinelog/group_1.263.762883415
Current log# 1 seq# 264 mem# 1: +DATA/test/onlinelog/group_1.262.762883415
Fri Jan 06 10:59:50 2012
Archived Log entry 259 added for thread 1 sequence 263 ID 0x7ad4e61f dest 1:
Fri Jan 06 17:11:54 2012
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
Fri Jan 06 17:13:49 2012
--可以发现查看xml格式的文件情况时间可以精确到milliseconds.而alert log仅仅到秒.
并且我连续执行如下命令:
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
alert log文本格式仅仅记录一个时间点.
2.xml格式的内容更加详细:
例子:
SQL> show parameter ddl
NAME TYPE VALUE
------------------------------------ ----------- -------------
ddl_lock_timeout integer 0
enable_ddl_logging boolean FALSE
SQL> alter session set enable_ddl_logging=true ;
Session altered.
SQL> create table t1 (id number);
Table created.
adrci下:
2012-01-09 11:35:34.101000 +08:00
create table t1 (id number)
alert_test.log如下:
Mon Jan 09 11:35:34 2012
create table t1 (id number)
除时间差异看,仅仅更精确一些.
但是如果打开log.xml文件,可以看到如下信息:
msg_id='opiexe:3954:4222364190' client_id='' type='NOTIFICATION'
group='schema_ddl' level='16' host_id='test'
host_addr='192.168.XXX.XXX' module='SQL*Plus' pid='5513'>
create table t1 (id number)
可以发现提供更加多的信息,比如使用那个程序执行的,那个IP地址发出的执行命令等一些信息.
看来以后要改变自己一些旧有的习惯,接受与学习adrci命令.
我个人检查数据库,查看alert log文件,喜欢查看文本格式,而不喜欢查看xml格式的文件,对于adrci的命令不是很熟悉,以及不习惯使用.
今天查看对比了两个格式的文件,发现以后要习惯查看xml格式,学会使用adrci命令.
对比如下:
1.xml格式的文件可以精确到milliseconds.
Thread 1 cannot allocate new log, sequence 264
Checkpoint not complete
Current log# 3 seq# 263 mem# 0: +DATA/test/onlinelog/group_3.265.762883411
Current log# 3 seq# 263 mem# 1: +DATA/test/onlinelog/group_3.264.762883411
2012-01-06 10:59:48.677000 +08:00
2012-01-06 10:59:48.677000 +08:00
Thread 1 advanced to log sequence 264 (LGWR switch)
Current log# 1 seq# 264 mem# 0: +DATA/test/onlinelog/group_1.263.762883415
Current log# 1 seq# 264 mem# 1: +DATA/test/onlinelog/group_1.262.762883415
2012-01-06 10:59:50.252000 +08:00
Archived Log entry 259 added for thread 1 sequence 263 ID 0x7ad4e61f dest 1:
2012-01-06 17:11:54.832000 +08:00
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
2012-01-06 17:11:57.014000 +08:00
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
2012-01-06 17:11:59.780000 +08:00
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
2012-01-06 17:12:02.584000 +08:00
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
2012-01-06 17:13:49.250000 +08:00
alert_test.log:
Fri Jan 06 10:59:46 2012
Thread 1 cannot allocate new log, sequence 264
Checkpoint not complete
Current log# 3 seq# 263 mem# 0: +DATA/test/onlinelog/group_3.265.762883411
Current log# 3 seq# 263 mem# 1: +DATA/test/onlinelog/group_3.264.762883411
Thread 1 advanced to log sequence 264 (LGWR switch)
Current log# 1 seq# 264 mem# 0: +DATA/test/onlinelog/group_1.263.762883415
Current log# 1 seq# 264 mem# 1: +DATA/test/onlinelog/group_1.262.762883415
Fri Jan 06 10:59:50 2012
Archived Log entry 259 added for thread 1 sequence 263 ID 0x7ad4e61f dest 1:
Fri Jan 06 17:11:54 2012
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
Fri Jan 06 17:13:49 2012
--可以发现查看xml格式的文件情况时间可以精确到milliseconds.而alert log仅仅到秒.
并且我连续执行如下命令:
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=8 SCOPE=BOTH;
ALTER SYSTEM SET db_file_multiblock_read_count=16 SCOPE=BOTH;
alert log文本格式仅仅记录一个时间点.
2.xml格式的内容更加详细:
例子:
SQL> show parameter ddl
NAME TYPE VALUE
------------------------------------ ----------- -------------
ddl_lock_timeout integer 0
enable_ddl_logging boolean FALSE
SQL> alter session set enable_ddl_logging=true ;
Session altered.
SQL> create table t1 (id number);
Table created.
adrci下:
2012-01-09 11:35:34.101000 +08:00
create table t1 (id number)
alert_test.log如下:
Mon Jan 09 11:35:34 2012
create table t1 (id number)
除时间差异看,仅仅更精确一些.
但是如果打开log.xml文件,可以看到如下信息:
msg_id='opiexe:3954:4222364190' client_id='' type='NOTIFICATION'
group='schema_ddl' level='16' host_id='test'
host_addr='192.168.XXX.XXX' module='SQL*Plus' pid='5513'>
create table t1 (id number)
可以发现提供更加多的信息,比如使用那个程序执行的,那个IP地址发出的执行命令等一些信息.
看来以后要改变自己一些旧有的习惯,接受与学习adrci命令.