473,386 Members | 1,795 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,386 software developers and data experts.

DML Transaction List

Hello,
I was wondering if anyone can tell me if/how I can list the DML
transactions attempted against my DB2 database. I'm writing some code
for an application which uses DB2, and my code is producing a -407 ("An
update or insert value is null, but the object column cannot contain
null values").
The problem is I cannot make the application spit out the end
transaction it's trying to run, so I have no way to know what to correct
in my code.
So I thought if I could make DB2 log the transaction, then I could see
what's happening.
Thanks.

Ken

Nov 12 '05 #1
3 3184
Hey Ken,

Normally together with the SQL Code you should also be able to retrieve the
error text associated with it. This text will then show the statement it
failed on. It would always be good practice within the code to not only show
the SQL Code but also the associated text with it.

Otherwise, if this is a dynamic statement, and nothing else uses the
database then you might be able to find it using the dynamic SQL snapshot.
Or you can setup a statement event monitor which I believe would also give
it to you. The event monitor will be more easy to use since the snapshot
will give you all statements that were run.

I hope this helps.

"73blazer" <yo**@ma.com> wrote in message
news:C9********************@centurytel.net...
Hello,
I was wondering if anyone can tell me if/how I can list the DML
transactions attempted against my DB2 database. I'm writing some code
for an application which uses DB2, and my code is producing a -407 ("An
update or insert value is null, but the object column cannot contain
null values").
The problem is I cannot make the application spit out the end
transaction it's trying to run, so I have no way to know what to correct
in my code.
So I thought if I could make DB2 log the transaction, then I could see
what's happening.
Thanks.

Ken

Nov 12 '05 #2
Thanks Erik. I figured out how to enable the event monitor, and saw that
offending statment. The problem I had was I was using an API to a
commercial application, for which no source code is available, only the
API's, and everything I passed back to the app seemed correct, however
something later on down the line in the application, which was using
some data I passed back, was creating the bad insert statment. There was
no trace I knew of to get thier application to spit out the statments.
Believe me, any DML statments I make in my code I put in a debug loop to
be spit out if the debug varibale is set.
Thanks again for your help..

Ken

Erik Hendrix wrote:
Hey Ken,

Normally together with the SQL Code you should also be able to retrieve the
error text associated with it. This text will then show the statement it
failed on. It would always be good practice within the code to not only show
the SQL Code but also the associated text with it.

Otherwise, if this is a dynamic statement, and nothing else uses the
database then you might be able to find it using the dynamic SQL snapshot.
Or you can setup a statement event monitor which I believe would also give
it to you. The event monitor will be more easy to use since the snapshot
will give you all statements that were run.

I hope this helps.

"73blazer" <yo**@ma.com> wrote in message
news:C9********************@centurytel.net...
Hello,
I was wondering if anyone can tell me if/how I can list the DML
transactions attempted against my DB2 database. I'm writing some code
for an application which uses DB2, and my code is producing a -407 ("An
update or insert value is null, but the object column cannot contain
null values").
The problem is I cannot make the application spit out the end
transaction it's trying to run, so I have no way to know what to correct
in my code.
So I thought if I could make DB2 log the transaction, then I could see
what's happening.
Thanks.

Ken



Nov 12 '05 #3
73blazer <yo**@ma.com> wrote:
Hello,
I was wondering if anyone can tell me if/how I can list the DML
transactions attempted against my DB2 database. I'm writing some code
for an application which uses DB2, and my code is producing a -407 ("An
update or insert value is null, but the object column cannot contain
null values").
The problem is I cannot make the application spit out the end
transaction it's trying to run, so I have no way to know what to correct
in my code.
So I thought if I could make DB2 log the transaction, then I could see
what's happening.


Maybe a CLI trace is an option for you.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #4

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

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
1
by: Rittercorp | last post by:
I am debugging an app which blocks many processes in a SQL7 server DB. The app log writes every transaction "open" and "close". The weird thing is : when the app logfile says the transaction is...
3
by: Eitan | last post by:
Hello, I have run a long transaction on the DB (sql server) For some long transaction I have got the following message : What can I do in order to run it properly ? Error Type:
9
by: John Sidney-Woollett | last post by:
Is it possible to use the dblink and dblink_exec features from inside pl/pgsql functions to mimic the behaviour of nested transactions by calling another function or executing some SQL via the...
1
by: Thapliyal, Deepak | last post by:
Can I use a "set transaction" type mechanism within a function? thx Deep -----Original Message----- From: Joshua D. Drake Sent: Tuesday, January 13, 2004 10:17 AM To: Thapliyal, Deepak...
1
by: Hubert Fröhlich | last post by:
Hi list, when doing a large Insert I get in the logfile: 2004-08-03 07:23:46 LOG: recycled transaction log file "000001BA000000BD" 2004-08-03 07:34:00 LOG: recycled transaction log file...
2
by: Phil Endecott | last post by:
Dear All, Within a transaction, now() and current_timestamp are constant and give the time that the transaction started. This is normally what you want. But I have a case where I actually need...
4
by: yashgt | last post by:
Hi, We have created a SQL server 2000 database. We observe that the transaction log keeps growing over time. We are now about to run out of space. We have been periodically shrinking the...
1
by: Mana | last post by:
Hi, I want to implement nested transactions in C#. When I write BEGIN TRANSACTION inside another BEGIN TRANSACTION in an SQL Script it works fine. But when I call BeginTransaction() inside...
1
ADezii
by: ADezii | last post by:
Transaction Processing is a Database term that refers to the process of grouping changes to your data into a batch that is treated as a single, atomic unit. Either the entire batch of transactions...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.