473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

When does a DB2 database become inconsistent?

Hi All,

When could be the possible reasons that could make a database
inconsistent?

I was told by somebody that it could become inconsistent if you "
force all the applications to a close on that database and
transactions are not committed or rollbacked"

I infact, don't believe it, because i suppose when we do a "force
applications all", then the applications should be automatically
rollbacked. I mean this should be the case.

Can anybody explain it with the others reasons leading to a database
being inconsistent?

Thanks a lot

Rahul
Nov 30 '07 #1
3 6163
On Nov 30, 5:51 am, Rahul Babbar <rahul.babb...@gmail.comwrote:
Hi All,

When could be the possible reasons that could make a database
inconsistent?

I was told by somebody that it could become inconsistent if you "
force all the applications to a close on that database and
transactions are not committed or rollbacked"

I infact, don't believe it, because i suppose when we do a "force
applications all", then the applications should be automatically
rollbacked. I mean this should be the case.

Can anybody explain it with the others reasons leading to a database
being inconsistent?

Thanks a lot

Rahul
Hi Rahul,

Can you explain what exactly you mean by inconsistent as I'm not sure
if my response here is what you are looking for.

When a database is started, it is considered "consistent" (and you'll
see this in the database configuration output). What this really
means is that what is on disk for the database is consistent. Now,
the first piece of write/update type of work that happens flips the
database to inconsistent. The reason being that changes are usually
buffered in the bufferpool and what is on disk is not guaranteed to be
consistent. If an inconsistent database comes down abnormally (DB2
crashes, is killed, machine is shut down, etc) then it needs to go
through crash recovery (usually happens automatically as the part of
the first connect/activate that occurs afterwards). When a database
is shutdown normally (deactivated, last connection goes away, etc) all
of the in-memory changes are flushed to disk and the database is now
considered consistent again (and won't require any kind of crash
recovery the next time it's started).

In the case of "force applications all", it is my understanding that
the agents are being forced, but cleanup and the flushing of changes
should still occur when the last one is forced off, leaving the
database consistent afterwards.

Regards,
Kelly Schlamb
Nov 30 '07 #2
aj
"Inconsistent" was probably a poor choice of words on IBM's part,
although I can't think of a better one right now. When I first
began using DB2, I remember this concerning me also.
It makes it sound like there is something wrong w/ the database,
when in fact it just means that the database is being used.

I've always though of it as "there are in-flight transactions",
although strictly speaking Kelly is correct about there being
stuff in the bufferpool that is not yet on disk...

aj
ks******@ca.ibm.com wrote:
On Nov 30, 5:51 am, Rahul Babbar <rahul.babb...@gmail.comwrote:
>Hi All,

When could be the possible reasons that could make a database
inconsistent?

I was told by somebody that it could become inconsistent if you "
force all the applications to a close on that database and
transactions are not committed or rollbacked"

I infact, don't believe it, because i suppose when we do a "force
applications all", then the applications should be automatically
rollbacked. I mean this should be the case.

Can anybody explain it with the others reasons leading to a database
being inconsistent?

Thanks a lot

Rahul

Hi Rahul,

Can you explain what exactly you mean by inconsistent as I'm not sure
if my response here is what you are looking for.

When a database is started, it is considered "consistent" (and you'll
see this in the database configuration output). What this really
means is that what is on disk for the database is consistent. Now,
the first piece of write/update type of work that happens flips the
database to inconsistent. The reason being that changes are usually
buffered in the bufferpool and what is on disk is not guaranteed to be
consistent. If an inconsistent database comes down abnormally (DB2
crashes, is killed, machine is shut down, etc) then it needs to go
through crash recovery (usually happens automatically as the part of
the first connect/activate that occurs afterwards). When a database
is shutdown normally (deactivated, last connection goes away, etc) all
of the in-memory changes are flushed to disk and the database is now
considered consistent again (and won't require any kind of crash
recovery the next time it's started).

In the case of "force applications all", it is my understanding that
the agents are being forced, but cleanup and the flushing of changes
should still occur when the last one is forced off, leaving the
database consistent afterwards.

Regards,
Kelly Schlamb
Nov 30 '07 #3
Rahul Babbar wrote:
I infact, don't believe it, because i suppose when we do a "force
applications all", then the applications should be automatically
rollbacked. I mean this should be the case.
This is correct.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stephen McMahon | last post by:
Background: I am currently working on a mission critical web based application that is accessed 24 hours a day by users from just about every time zone. We use MS SQL Server as our database and...
2
by: gangulyarindam | last post by:
Hi, I am facing a peculiar problem while looking ahead in a live Database currently under operation in one of my client’s Project. An Application that is updating 3 - tables in the Database is...
3
by: mairhtin o'feannag | last post by:
I keep getting the following when I run DB2DART /LHWM to reset the HWM : Warning: The database state is not consistent. Warning: Errors reported about reorg rows may be due to the inconsistent...
3
by: Koen | last post by:
Hi, first of all, the machine setup server 1: - UDB2 7.2.5; COUNTRY=1, location = US, IBM1250 codepage - Locale: US English; Regional Settings: English; Keyboard: Dutch; decimal separator: ....
5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
7
by: Dan Bass | last post by:
In a somewhat complex application, I've developed plug-in architecture and am having a problem as to when to catch general exceptions for logging purposes. In each plug-in class library, for...
2
by: Dennis Breithaupt | last post by:
Hy all, I request your support for the following problem. (with "postmaster (PostgreSQL) 7.4.1") On a development-system I lost the pg_xlog-directory due to a system crash, where the physical...
17
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are...
0
by: johnthawk | last post by:
In the below code setting cell to inconsistent sets entire column inconsistent (renderer).However, I need a third state off | on | inconsistent . How can I change one path->cell? Any help...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.