473,729 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6196
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
"Inconsiste nt" 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
25434
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 we have lots of problems with time-outs. We used to have lots of problems with locks until my management decided that we would use the WITH (NOLOCK) hint on EVERY select statement and WITH (ROWLOCK) on EVERY update statement. I have argued since...
2
1642
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 missing to update a certain number of Fields in one of the Tables. The fact is not frequent and I have checked through the Server Performance Monitor that there is no performance slag of the Server during any point of time.
3
7457
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 state of the database. DB2DART Processing completed with warning(s)! Complete DB2DART report found in: /home/db2gen/sqllib/db2dump/DART0000/GEN.RPT
3
4240
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: . server 2: - UDB2 7.2.5 Client Tools - Websphere 4.0.5
5
4040
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 think - it might have been XP) to 2003. The database is impressive, both in what it does and the obtuse and inconsistent ways it works. There are several hundred queries, for example, with no indication of where they are used or if they are in fact...
7
1798
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 example, I'm assuming it's throw on errors, and that the core then catches them. I've got proxy classes handling some fiddly details of the plug-ins. Should I allow the exception to bubble to the top most point it can in a call stack, then catch...
2
2978
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 device on which the mountpoint pg_xlog was located got broken. LOG: could not open file
17
4531
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 selected into 2 different SP variables and compared for equal. They are both NULL, but do not compare as equal. When the Not NULL columns (SALARY) are compared, they do compare as equal.
0
1124
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 appreciated. Thanks john # get current value fixed = model.get_value(iter, MARK_FOR_COLUMN) icont = model.get_value(iter,MARK_FOR_INCONSISTENT) # clear for action
0
8761
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9200
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9142
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8144
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6016
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2162
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.