ex: I need to insert 10 rows in a table. If one of the insertions fail,
I would do a rollback (i.e. won't insert any row). That means, I will
do a commit only after inserting 10 rows.
It seems that by default, the locking mechanism in db2 is at the table
level which is preventing me from inserting the second row as I haven't
done a commit. Will row locking solve the problem? Also, if I restart
the database, will it still hold on to row locking (instead of table
I looked at other postings and it said that I can reduce the
locktimeout but that worries me specifically if there are concurrent
requests going on.
I'm just 2 days into db2 so please bear with my naiveness...
> I think you need to give a little more detail on EXACTLY what you're
> trying to do.
> Richard Mitch Mitchell
> Senior Database Administrator
> IBM Certified Solutions Expert - DB2 UDB v6.1 Database Administration
> for UNIX, Windows and OS/2
> Fracta Networks
> > I want to insert a few statements in a table and then do commit one
> > the db2 tables (from an application). Unfortunately, the default
> > locking mechanism won't allow me to do it. How do I change this lock
> > mode at:
> > 1. The table level
> > 2. The database level
> > I want to have basic locking though (while the insert statement is
> > being processed)
> > Any help is appreciated
> > Tanuj Chatterjee
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Sent via Deja.com http://www.deja.com/
Before you buy.