Page 1 of 1

Uniconnection Firebird WAIT instead of NOWAIT

Posted: Sat 15 Oct 2016 17:22
by michaschumann
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!

Re: Uniconnection Firebird WAIT instead of NOWAIT

Posted: Sun 16 Oct 2016 14:49
by michaschumann
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?

Re: Uniconnection Firebird WAIT instead of NOWAIT

Posted: Tue 18 Oct 2016 08:35
by ViktorV
Yes, you have found the correct solution to your problem, you can use the latest version 6.4.14 of UniDAC.