db2快照数据库日志信息 [英] db2 snapshot database log information

查看:78
本文介绍了db2快照数据库日志信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我对我在系统上看到的内容感到有些困惑。我正在尝试开发一个脚本来确定

总日志空间的百分比。如果它太高(80%),则会呼叫DBA

。首先是一些系统信息:


获取db cfg for ip0


第一个活动日志文件= S0055850.LOG

日志文件大小(4KB)(LOGFILSIZ)= 8000

主日志文件数(LOGPRIMARY)= 59

辅助日志文件数(LOGSECOND)= 60

获取db ip0的快照



ls -ltr log_dir


-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:12 S0055850.LOG

-rw ---- --- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055851.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055901.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055900.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:32 S0055852 .LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:4 2 S0055902.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:46 S0055853.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055903.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055854.LOG

- rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055904.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055855.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:33 S0055905.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 10月08 21:47 S0055856.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:07 S0055906.LOG

-rw ---- --- 1 db2ip0 dbip0adm 32776192 Oct 08 22:11 S0055857.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:12 S0055907.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:13 S0055858.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055859 .LOG

-r w ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055908.LOG

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:22 S0055860.LOG

现在问题:


1)从ls -ltr log_dir你可以看到日志文件55850和

55860之间所有这些其他文件已更新。我可以理解为

55850-55860之间的文件但是其他的(例如

55907,55908等)


2)系统使用的日志空间为5779868,小于单日志空间的b / b
。如果是这样的话,为什么第一个活跃于
55850并且之后的所有活动在55850之后都有时间戳?这将是b $ b似乎只有一个登录使用。

提前感谢您提供的任何澄清。


Lew

Hi,

I am a bit confused about what I''m seeing on my systems. I am
trying to develop a script that will determine what percentage of the
total log space is being used. If it is too high (80%) the on-call DBA
will be paged. First some system information:

get db cfg for ip0

First active log file = S0055850.LOG
Log file size (4KB) (LOGFILSIZ) = 8000
Number of primary log files (LOGPRIMARY) = 59
Number of secondary log files (LOGSECOND) = 60

get snapshot for db ip0

Log space used by the database (Bytes) = 5779868

ls -ltr log_dir

-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:12 S0055850.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055851.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055901.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055900.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:32 S0055852.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:42 S0055902.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:46 S0055853.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055903.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055854.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055904.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055855.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:33 S0055905.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:47 S0055856.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:07 S0055906.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:11 S0055857.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:12 S0055907.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:13 S0055858.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055859.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055908.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:22 S0055860.LOG
Now the questions:

1) from the ls -ltr log_dir you can see that between log files 55850 and
55860 all these other files have been updated. I can understand it for
the files between 55850-55860 but what about the others (e.g.
55907,55908, etc.)

2) the log space used by the system is 5779868 which is less than a
single logs worth of space. If that is so why is the first active at
55850 and all the ones after that have timestamps after 55850? It would
seem that there would be only a single log in use.
Thanks in advance for any clarification provided.

Lew

推荐答案

Lew写道:


我对什么有点困惑我在我的系统上看到了。我正在尝试开发一个脚本,用于确定正在使用的总日志空间的百分比。如果它太高(80%),则会呼叫DBA
。首先是一些系统信息:

获取db cfg for ip0
第一个活动日志文件= S0055850.LOG
日志文件大小(4KB)(LOGFILSIZ)= 8000
主日志文件数(LOGPRIMARY)= 59
辅助日志文件数(LOGSECOND)= 60
获取db ip0的快照

日志空间数据库使用(字节)= 5779868
ls -ltr log_dir

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:12 S0055850.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055851.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055901.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055900.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:32 S0055852.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:42 S0055902.LOG
-rw ------- 1 db2ip0 dbip0adm 32776 192 Oct 08 20:46 S0055853.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055903.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055854.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055904.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055855.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:33 S0055905.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:47 S0055856.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:07 S0055906.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:11 S0055857.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:12 S0055907.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:13 S0055858.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055859.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055908.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 2 2:22 S0055860.LOG

现在问题:

1)从ls -ltr log_dir你可以看到日志文件55850和
55860之间所有这些其他文件已更新。我可以理解为55850-55860之间的文件但是其他的(例如
55907,55908等)


第一个活动日志文件是与您的

数据库关联的最旧的日志文件,该数据库具有活动事务(即未提交或回滚
的事务)。

虽然1个连接可能包含跨越这些旧日志文件的事务,但是其他连接工作将生成日志记录,这些记录会填满新的日志文件。


我很好奇,为什么没有日志文件55861-55899,除非

你只是不显示这些文件你的清单。


2)系统使用的日志空间为5779868,小于单日志空间。如果是这样的话,为什么第一个活跃在55850并且之后的所有活动在55850之后有时间戳?它似乎只会使用一个日志。
Hi,

I am a bit confused about what I''m seeing on my systems. I am
trying to develop a script that will determine what percentage of the
total log space is being used. If it is too high (80%) the on-call DBA
will be paged. First some system information:

get db cfg for ip0

First active log file = S0055850.LOG
Log file size (4KB) (LOGFILSIZ) = 8000
Number of primary log files (LOGPRIMARY) = 59
Number of secondary log files (LOGSECOND) = 60

get snapshot for db ip0

Log space used by the database (Bytes) = 5779868

ls -ltr log_dir

-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:12 S0055850.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055851.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055901.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055900.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:32 S0055852.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:42 S0055902.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:46 S0055853.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055903.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055854.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055904.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055855.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:33 S0055905.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:47 S0055856.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:07 S0055906.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:11 S0055857.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:12 S0055907.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:13 S0055858.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055859.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055908.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:22 S0055860.LOG
Now the questions:

1) from the ls -ltr log_dir you can see that between log files 55850 and
55860 all these other files have been updated. I can understand it for
the files between 55850-55860 but what about the others (e.g.
55907,55908, etc.)
The first active log file is the oldest log file associated with your
database that has active transactions (i.e. a transaction that has not
been committed or rolled back).

While 1 connection may have transactions that span these old log files,
other connections doing work will generate log records that fill up
newer log files.

I''m curious, though, why there aren''t log files 55861-55899, unless
you just don''t show these files in your listing.

2) the log space used by the system is 5779868 which is less than a
single logs worth of space. If that is so why is the first active at
55850 and all the ones after that have timestamps after 55850? It would
seem that there would be only a single log in use.




使用的日志空间显示当前总日志空间的大小

由活跃交易分配,这与您有多少可用的日志空间不同。


总可用日志空间=(LOGPRIMARY + LOGSECOND)* LOGFILSIZ * 4096

在您的情况下,(59 + 60)* 8000 * 4096 = 3,899,392,000字节


---- ==通过Newsfeeds.Com发布 - 无限制 - 未经审查 - 安全Usenet新闻== ----
http://www.newsfeeds.com 世界排名第一的新闻组服务! > 100,000新闻组

--- =东/西海岸服务器农场 - 通过加密的总隐私= ---



Log space used shows how much of the total log space is currently
allocated by active transactions, which is different from how much
available log space you have.

Total available log space = (LOGPRIMARY + LOGSECOND) * LOGFILSIZ * 4096

In your case, (59 + 60) * 8000 * 4096 = 3,899,392,000 bytes

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---


什么是LOGRETAIN和USEREXIT的价值?


" Lew" < SE ***** @ yahoo.com>在消息中写道

news:53 ************************** @ posting.google.c om ...
What are the value of LOGRETAIN and USEREXIT?

"Lew" <se*****@yahoo.com> wrote in message
news:53**************************@posting.google.c om...


我对我在系统上看到的内容感到有些困惑。我正在尝试开发一个脚本,用于确定正在使用的总日志空间的百分比。如果它太高(80%),则会呼叫DBA
。首先是一些系统信息:

获取db cfg for ip0
第一个活动日志文件= S0055850.LOG
日志文件大小(4KB)(LOGFILSIZ)= 8000
主日志文件数(LOGPRIMARY)= 59
辅助日志文件数(LOGSECOND)= 60
获取db ip0的快照

日志空间数据库使用(字节)= 5779868
ls -ltr log_dir

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:12 S0055850.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055851.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055901.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055900.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:32 S0055852.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:42 S0055902.LOG
-rw ------- 1 db2ip0 dbip0adm 32776 192 Oct 08 20:46 S0055853.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055903.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055854.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055904.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055855.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:33 S0055905.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:47 S0055856.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:07 S0055906.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:11 S0055857.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:12 S0055907.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:13 S0055858.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055859.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055908.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 2 2:22 S0055860.LOG

现在问题:

1)从ls -ltr log_dir你可以看到日志文件55850和
55860之间所有这些其他文件已更新。我可以理解为55850-55860之间的文件但是其他的(例如
55907,55908等)

2)系统使用的日志空间是5779868,这是一个不错的单日志空间。如果是这样的话,为什么第一个活跃在55850并且之后的所有活动在55850之后有时间戳?它似乎只会使用一个日志。

提前感谢所提供的任何澄清。

Lew
Hi,

I am a bit confused about what I''m seeing on my systems. I am
trying to develop a script that will determine what percentage of the
total log space is being used. If it is too high (80%) the on-call DBA
will be paged. First some system information:

get db cfg for ip0

First active log file = S0055850.LOG
Log file size (4KB) (LOGFILSIZ) = 8000
Number of primary log files (LOGPRIMARY) = 59
Number of secondary log files (LOGSECOND) = 60

get snapshot for db ip0

Log space used by the database (Bytes) = 5779868

ls -ltr log_dir

-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:12 S0055850.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055851.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055901.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055900.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:32 S0055852.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:42 S0055902.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:46 S0055853.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055903.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055854.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055904.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055855.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:33 S0055905.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:47 S0055856.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:07 S0055906.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:11 S0055857.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:12 S0055907.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:13 S0055858.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055859.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055908.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:22 S0055860.LOG
Now the questions:

1) from the ls -ltr log_dir you can see that between log files 55850 and
55860 all these other files have been updated. I can understand it for
the files between 55850-55860 but what about the others (e.g.
55907,55908, etc.)

2) the log space used by the system is 5779868 which is less than a
single logs worth of space. If that is so why is the first active at
55850 and all the ones after that have timestamps after 55850? It would
seem that there would be only a single log in use.
Thanks in advance for any clarification provided.

Lew



Ian< ia ***** @ mobileaudio.com>在消息新闻中写道:< 41 ********** @ 127.0.0.1> ...
Ian <ia*****@mobileaudio.com> wrote in message news:<41**********@127.0.0.1>...
Lew写道:


我对我在系统上看到的内容感到有些困惑。我正在尝试开发一个脚本,用于确定正在使用的总日志空间的百分比。如果它太高(80%),则会呼叫DBA
。首先是一些系统信息:

获取db cfg for ip0
第一个活动日志文件= S0055850.LOG
日志文件大小(4KB)(LOGFILSIZ)= 8000
主日志文件数(LOGPRIMARY)= 59
辅助日志文件数(LOGSECOND)= 60
获取db ip0的快照

日志空间数据库使用(字节)= 5779868
ls -ltr log_dir

-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:12 S0055850.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055851.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055901.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055900.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:32 S0055852.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:42 S0055902.LOG
-rw ------- 1 db2ip0 dbip0adm 32776 192 Oct 08 20:46 S0055853.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055903.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055854.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055904.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055855.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:33 S0055905.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:47 S0055856.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:07 S0055906.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:11 S0055857.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:12 S0055907.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:13 S0055858.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055859.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055908.LOG
-rw ------- 1 db2ip0 dbip0adm 32776192 Oct 08 2 2:22 S0055860.LOG

现在问题:

1)从ls -ltr log_dir你可以看到日志文件55850和
55860之间所有这些其他文件已更新。我可以理解为55850-55860之间的文件但是其他的(例如
55907,55908等)
第一个活动日志文件是与您关联的最旧的日志文件
具有活动事务的数据库(即尚未提交或回滚的事务)。

虽然1个连接可能具有跨越这些旧日志文件的事务,但是/>其他连接工作会生成日志记录,填满更新的日志文件。

我很好奇,为什么没有日志文件55861-55899,除非
你只是不在你的列表中显示这些文件。
Hi,

I am a bit confused about what I''m seeing on my systems. I am
trying to develop a script that will determine what percentage of the
total log space is being used. If it is too high (80%) the on-call DBA
will be paged. First some system information:

get db cfg for ip0

First active log file = S0055850.LOG
Log file size (4KB) (LOGFILSIZ) = 8000
Number of primary log files (LOGPRIMARY) = 59
Number of secondary log files (LOGSECOND) = 60

get snapshot for db ip0

Log space used by the database (Bytes) = 5779868

ls -ltr log_dir

-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:12 S0055850.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055851.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055901.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:14 S0055900.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:32 S0055852.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:42 S0055902.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 20:46 S0055853.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055903.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:02 S0055854.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055904.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:32 S0055855.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:33 S0055905.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 21:47 S0055856.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:07 S0055906.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:11 S0055857.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:12 S0055907.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:13 S0055858.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055859.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:15 S0055908.LOG
-rw------- 1 db2ip0 dbip0adm 32776192 Oct 08 22:22 S0055860.LOG
Now the questions:

1) from the ls -ltr log_dir you can see that between log files 55850 and
55860 all these other files have been updated. I can understand it for
the files between 55850-55860 but what about the others (e.g.
55907,55908, etc.)
The first active log file is the oldest log file associated with your
database that has active transactions (i.e. a transaction that has not
been committed or rolled back).

While 1 connection may have transactions that span these old log files,
other connections doing work will generate log records that fill up
newer log files.

I''m curious, though, why there aren''t log files 55861-55899, unless
you just don''t show these files in your listing.




我包含的日志文件列表并非全包。我只是在
中列出了时间戳大于或等于

的日志文件第一个执行日志S0055850.LOG来显示情况。因此,您正在寻找55907,55908等的

日志文件具有比55850更低的文件

时间戳。这怎么可能? DB2是否在日志文件填满之后执行

更新?



The list of log files I included was not all inclusive. I just
listed the log files that had timestamps greater than or equal to the
the first actve log S0055850.LOG to show the situation. Therefore the
log files you were looking for 55907,55908, etc had lower file
timestamps than 55850. How is this possible? Does DB2 perform
updates to a log file even after it has filled up?

2)系统使用的日志空间是5779868,小于
单日志空间。如果是这样的话,为什么第一个活跃在55850并且之后的所有活动在55850之后有时间戳?它似乎只会使用一个日志。
使用的日志空间显示当前由活动事务分配的总日志空间有多少,这与多少不同
你有的可用日志空间。

总可用日志空间=(LOGPRIMARY + LOGSECOND)* LOGFILSIZ * 4096

在你的情况下,(59 + 60)* 8000 * 4096 = 3,899,392,000字节
2) the log space used by the system is 5779868 which is less than a
single logs worth of space. If that is so why is the first active at
55850 and all the ones after that have timestamps after 55850? It would
seem that there would be only a single log in use.
Log space used shows how much of the total log space is currently
allocated by active transactions, which is different from how much
available log space you have.

Total available log space = (LOGPRIMARY + LOGSECOND) * LOGFILSIZ * 4096

In your case, (59 + 60) * 8000 * 4096 = 3,899,392,000 bytes




我理解。然而根据使用的日志空间数量,

数据库使用57MB的空间,不到2个日志文件。那个

与正在更新的日志数量并不相符。

---- ==通过Newsfeeds.Com发布 - 无限制 - 未经审查 - 安全Usenet新闻= = ----
http://www.newsfeeds.com # 1个世界新闻组服务! > 100,000新闻组
--- =东/西海岸服务器场 - 通过加密的总隐私= ---



I understand that. Yet according to the log space used number the
database is using 57MB of space, less than 2 log files worth. That
doesn''t jive with the number of logs being updated.

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---



这篇关于db2快照数据库日志信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆