begin work ,lock table, commit work error
Posted in 2003
Topics: Transactions, Locking & Isolation
SQL SCRIPT-->
BEGIN WORK;
LOCK TABLE payroll in exclusive mode;
delete from payroll where flag='DELETE';COMMIT WORK;
Error received-->
256:Transaction not available.
Table locked.
50 row(s) deleted.
256 Transaction not available.
I'm receiving that error on the BEGIN WORK and the COMMIT WORK. If the
table is being lock why the errors ?
Thanks for the help.
Ed
the database
has been created without logs.
----- Original Message -----
From: "Gonzalez, E...." <e.gonzal@radium.ncsc.mil>
To: <ids@iiug.org>
Sent: Wednesday, April 09, 2003 10:22
Subject: begin work ,lock table, commit work error [878]
>
> SQL SCRIPT-->
>
> BEGIN WORK;
> LOCK TABLE payroll in exclusive mode;
> delete from payroll where flag='DELETE';> COMMIT WORK;
>
> Error received-->
>
> 256:Transaction not available.
> Table locked.
> 50 row(s) deleted.
> 256 Transaction not available.
>
> I'm receiving that error on the BEGIN WORK and the COMMIT WORK. If the
> table is being lock why the errors ?
>
> Thanks for the help.
> Ed
>
>
Ed You can only use transactions on a logged database and yours would appear to be unlogged. Keith -> -----Original Message----- -> From: Gonzalez, E.... [mailto:e.gonzal@radium.ncsc.mil] -> Sent: Wednesday, April 09, 2003 3:22 PM -> To: ids@iiug.org -> Subject: begin work ,lock table, commit work error [878] -> -> -> -> SQL SCRIPT--> -> -> BEGIN WORK; -> LOCK TABLE payroll in exclusive mode; -> delete from payroll where flag='DELETE'; -> COMMIT WORK; -> -> Error received--> -> -> 256:Transaction not available. -> Table locked. -> 50 row(s) deleted. -> 256 Transaction not available. -> -> I'm receiving that error on the BEGIN WORK and the COMMIT -> WORK. If the -> table is being lock why the errors ? -> -> Thanks for the help. -> Ed -> ******************************************************************************** ** This message is sent in strict confidence for the addressee only. It may contain legally privileged information. The contents are not to be disclosed to anyone other than the addressee. Unauthorised recipients are requested to preserve this confidentiality and to advise the sender immediately of any error in transmission. This footnote also confirms that this email message has been swept for the presence of computer viruses, however we cannot guarantee that this message is free from such problems. ******************************************************************************** **
Ed;
The -256 errors are because you do not have logging enabled for the
database in question, so transactions aren't allowed.
You are obviously running this from a script, therefore you are getting
past the errors. If you were running this from interactive dbaccess, it
would fail on the first line (BEGIN WORK).
There are three choices:
1 - turn logging on for that database
2 - remove the BEGIN WORK and COMMIT WORK statements from the script
3 - ignore the errors (I would NEVER recommend this one, just on principle)
HTH...
Mike
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Mike Lowe
Certified Consulting Education Specialist
Data Management Solutions
IBM Software Group
Tel: 303-773-5216 Tie Line: 565-5216
e-Fax: 413-674-2415
mlowe0@us.ibm.com
WWW: ibm.com/software/data
SQL SCRIPT-->
BEGIN WORK;
LOCK TABLE payroll in exclusive mode;
delete from payroll where flag='DELETE';COMMIT WORK;
Error received-->
256:Transaction not available.
Table locked.
50 row(s) deleted.
256 Transaction not available.
I'm receiving that error on the BEGIN WORK and the COMMIT WORK. If the
table is being lock why the errors ?
Thanks for the help.
Ed
Is your
database a non-logging database?
> -----Original Message-----
> From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org]On
> Behalf Of Gonzalez, E....
> Sent: Wednesday, April 09, 2003 8:22 AM
> To: ids@iiug.org
> Subject: begin work ,lock table, commit work error [878]
>
>
>
> SQL SCRIPT-->
>
> BEGIN WORK;
> LOCK TABLE payroll in exclusive mode;
> delete from payroll where flag='DELETE';> COMMIT WORK;
>
> Error received-->
>
> 256:Transaction not available.
> Table locked.
> 50 row(s) deleted.
> 256 Transaction not available.
>
> I'm receiving that error on the BEGIN WORK and the COMMIT WORK. If the
> table is being lock why the errors ?
>
> Thanks for the help.
> Ed
>