problem with record locked
Posted in 1999
Topics: General Discussion
hi all, Recently I 'm getting the following error. Sql statement error number -243 Could not position within a table xxx SYSTEM error number -107 This occurs even in programs which only read information from a certain table. More strange is that it happens not always. I'm using a Online 7.xx database. With me old database which was a SE I never had this kind of problem. Does anybody has an idea? Thanks. Claude Claude.Teughels@holvoet-chimie.com or Fidelity@fidelity-soft.be
Teughels Claude wrote:
>
> hi all,
>
> Recently I 'm getting the following error.
>
> Sql statement error number -243
> Could not position within a table xxx
> SYSTEM error number -107
>
> This occurs even in programs which only read information from a certain
> table. More strange is that it happens not always.
>
> I'm using a Online 7.xx database.
>
> With me old database which was a SE I never had this kind of problem.
> Does anybody has an idea?
>
> Thanks.
>
> Claude
> Claude.Teughels@holvoet-chimie.com
> or
> Fidelity@fidelity-soft.be
SE creates databases normally without transaction logging, whereas
You created Your database on OnLine with transaction logging.
According to transaction logging You have diffenrent so called
isolation levels to read a record from Your database. When using
repeatable read all read record are locked as long the database
is working on Your current select.
So the easiest way for You will be to do a
ontape -s -N databasenameto go back to non-logging database.
Maybe You want to change TAPEDEV in Your ONCONFIG-file
before starting ontape to do the backup to /dev/null.
Wolfgang
In this table try to have row level lock mode. Informix defaults to page level lock mode. Changing to row level migth degrade the performance but it is the easiest fix i found. In article <7vmeqn$391$1@news3.Belgium.EU.net>, "Teughels Claude" <info@holvoet-chimie.com> wrote: > hi all, > > Recently I 'm getting the following error. > > Sql statement error number -243 > Could not position within a table xxx > SYSTEM error number -107 > > This occurs even in programs which only read information from a certain > table. More strange is that it happens not always. > > I'm using a Online 7.xx database. > > With me old database which was a SE I never had this kind of problem. > Does anybody has an idea? > > Thanks. > > Claude > Claude.Teughels@holvoet-chimie.com > or > Fidelity@fidelity-soft.be > > Sent via Deja.com http://www.deja.com/ Before you buy.
OK, Wolfgang is correct your SE database was probably without logging so the default isolation level was DIRTY READ which does not check locks on SELECT. If your IDS database is a logged database, AND IT SHOULD BE (DO NOT DROP LOGGING JUST TO FIX THIS PROBLEM), then the default isolation level require a shared lock on the current row being fetched. This is clashing with update transactions which may have some rows locked. If you need consistent data then execute "SET LOCK MODE TO WAIT 10" in the application so that it waits for brief locks to clear before reporting any errors. In addition make sure that actively updated tables have their locking mode set to "ROW" the default for all tables is "PAGE" which causes several, perhaps unrelated, rows to be locked on the same page as the row being updated. If you do not care about consistency you can execute "SET ISOLATION DIRTY READ" in your application so that it does not try to acquire any locks for SELECTS which is the behavior it had under SE without logging, and you will still have the safety and data integrity provided by the logging. Art S. Kagel Teughels Claude wrote: > > hi all, > > Recently I 'm getting the following error. > > Sql statement error number -243 > Could not position within a table xxx > SYSTEM error number -107 > > This occurs even in programs which only read information from a certain > table. More strange is that it happens not always. > > I'm using a Online 7.xx database. > > With me old database which was a SE I never had this kind of problem. > Does anybody has an idea? > > Thanks. > > Claude > Claude.Teughels@holvoet-chimie.com > or > Fidelity@fidelity-soft.be
HI! You are reading a locked record. Use SET ISOLATION TO DIRTY READ; if you want to avoid this (with all consequences of reading a record being currently modified). HTH Michael Teughels Claude wrote: > hi all, > > Recently I 'm getting the following error. > > Sql statement error number -243 > Could not position within a table xxx > SYSTEM error number -107 > > This occurs even in programs which only read information from a certain > table. More strange is that it happens not always. > > I'm using a Online 7.xx database. > > With me old database which was a SE I never had this kind of problem. > Does anybody has an idea? > > Thanks. > > Claude > Claude.Teughels@holvoet-chimie.com > or > Fidelity@fidelity-soft.be