Uniconnection Firebird WAIT instead of NOWAIT

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
michaschumann
Posts: 44
Joined: Fri 14 Nov 2014 15:26

Uniconnection Firebird WAIT instead of NOWAIT

Post by michaschumann » Sat 15 Oct 2016 17:22

Hello,

I use an automatic update system that also changes DDL without disconnecting all users. Its running on Firebird 1.5.6. Recently I discovered a problem when altering a procedure that is not in use with some customers:

ERROR lock conflict on no wait transaction
unsuccessful metadata update
object <PROCEDURE NAME> is in use

There is no problem with VIews and Triggers!

I am sure that the object is not in use but it has been used before. In the Firebird forums I found the solution to use a WAIT transaction instead of NOWAIT because of some Caching that locks the procedures metadata. As I use an Uniconnection with the default settings and autocommit and have no Idea whre I can apply this setting.

I would be grateful if you could tell me how to change the connections transaction to "WAIT".

Thanks in Advance!

michaschumann
Posts: 44
Joined: Fri 14 Nov 2014 15:26

Re: Uniconnection Firebird WAIT instead of NOWAIT

Post by michaschumann » Sun 16 Oct 2016 14:49

After some more research in the forum I think I found the answer here:

viewtopic.php?f=28&t=25656

I do this to the connection after including unit CRAccess:

Code: Select all

DefaultTransaction.IsolationLevel := ilCustom;
slParams := TStringList.create;
slParams.Add('wait');
slParams.Add('read_committed');
slParams.Add('rec_version');
DefaultTransaction.SpecificOptions.Values['Params'] := slParams.Text;
FreeAndNil(slParams);
Is this still correct for the current UniDac version as of october 16?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Uniconnection Firebird WAIT instead of NOWAIT

Post by ViktorV » Tue 18 Oct 2016 08:35

Yes, you have found the correct solution to your problem, you can use the latest version 6.4.14 of UniDAC.

Post Reply