Unix Technical Forum

Moving cursor in Command Editor results screen results in update of table

This is a discussion on Moving cursor in Command Editor results screen results in update of table within the DB2 forums, part of the Database Server Software category; --> In the DB2 Admin Client (8.2.4), when the results of a query are displayed in the grid that looks ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:53 AM
Mark A
 
Posts: n/a
Default Moving cursor in Command Editor results screen results in update of table

In the DB2 Admin Client (8.2.4), when the results of a query are displayed
in the grid that looks like a spreadsheet (using Command Editor or double
click on table name in Control Center). The data in this grid is updatable.

When a cursor is first placed on one of the columns, no update takes place.
When the cursor is then merely moved to another row (any column) the
previous row is updated, even if it was not changed. If the user does not
have authority to update the table, then a sqlcode -551 is displayed
indicating that they are authorized to update the table.

Is there any way let users query the data using these tools, and let them
move the cursor around without updating the data? This seems like a very
questionable design. There should be some way to let users just query the
data with tool without attempting updates just because they place the cursor
on a row in the grid.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:55 AM
Ian
 
Posts: n/a
Default Re: Moving cursor in Command Editor results screen results in updateof table

Mark A wrote:
> In the DB2 Admin Client (8.2.4), when the results of a query are displayed
> in the grid that looks like a spreadsheet (using Command Editor or double
> click on table name in Control Center). The data in this grid is updatable.
>
> When a cursor is first placed on one of the columns, no update takes place.
> When the cursor is then merely moved to another row (any column) the
> previous row is updated, even if it was not changed. If the user does not
> have authority to update the table, then a sqlcode -551 is displayed
> indicating that they are authorized to update the table.
>
> Is there any way let users query the data using these tools, and let them
> move the cursor around without updating the data? This seems like a very
> questionable design. There should be some way to let users just query the
> data with tool without attempting updates just because they place the cursor
> on a row in the grid.
>
>


To add to this, DB2 holds row locks -- so when the unsuspecting user
clicks on a row, they hold a lock on the row. Or, if a select query
returns more than the "page limit" of the output (i.e. Command Editor
defaults to fetching 100 rows at a time, I think), DB2 will hold a
row lock for the current position of the cursor.

My experience has been that these situations always happens just before
the user leaves for lunch or some other extended absence, which wreaks
havoc for other users.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:56 AM
Mehmet Baserdem
 
Posts: n/a
Default Re: Moving cursor in Command Editor results screen results in update of table

Mark A,

One option is to create a schema which only has read privilege on the
tables and ask users to use this schema when they are querying the DB.

FYI: TXNISOLATION = 1 (i.e. Uncommitted Read) in db2cli.ini didn't work

Regards,

Mehmet

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 07:56 AM
Mehmet Baserdem
 
Posts: n/a
Default Re: Moving cursor in Command Editor results screen results in update of table

read privilege => select privilege

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:11 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com