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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| 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. |
| |||
| 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 |