Transaction Isolation

IBEBlock is the powerful scripting language available in IBExpert with full compatibility to IB/FB Stored Procedure Language and additional features like multiple database connections in one script etc.

Transaction Isolation

Postby alanmcd » Wed Feb 03, 2010 12:04 pm

How do I specify that I want my connection and ibec_comparetables to use a ready-only read committed transaction?
Alan
alanmcd
 
Posts: 31
Joined: Tue Jun 10, 2008 3:08 am

Re: Transaction Isolation

Postby AVX » Thu Feb 04, 2010 3:28 pm

Code: Select all
...
dbc1 = ibec_CreateConnection(...);
ibec_SetConnectionProp(dbc1, 'TRPARAMS', 'isc_tpb_read, isc_tpb_consistency');

dbc2 = ibec_CreateConnection(...);
ibec_SetConnectionProp(dbc2, 'TRPARAMS', 'isc_tpb_read, isc_tpb_consistency');

ibec_CompareTables(...);
...
AVX
 
Posts: 81
Joined: Sat Jun 07, 2008 4:55 am

Re: Transaction Isolation

Postby alanmcd » Fri Feb 05, 2010 12:22 am

Thanks I couldn't find those functions in my book.
Alan
alanmcd
 
Posts: 31
Joined: Tue Jun 10, 2008 3:08 am

Re: Transaction Isolation

Postby alanmcd » Fri Feb 05, 2010 12:37 am

Actually - isn't isc_tpb_consistency table locking?
I want read commited so there's no locking and there's no garbage collection impact.
Alan
alanmcd
 
Posts: 31
Joined: Tue Jun 10, 2008 3:08 am

Re: Transaction Isolation

Postby AVX » Fri Feb 05, 2010 9:22 am

It was just an example, you can use your own parameters.
AVX
 
Posts: 81
Joined: Sat Jun 07, 2008 4:55 am

Re: Transaction Isolation

Postby alanmcd » Tue Feb 09, 2010 8:58 pm

What's the difference between
create connection MasterDB dbname 'localhost:alias' password 'pword' user 'myuser' names ISO8859_1;
and
ibec_CreateConnection( etc
?
Can the former (CREATE CONNECTION) then use ibec_SetConnectionProp command?
I've tried it and there's no error but setting props to 'isc_tpb_read, isc_tpb_committed'
shows up as a concurrency transaction in the monitor (MON$ tables).
Alan
alanmcd
 
Posts: 31
Joined: Tue Jun 10, 2008 3:08 am

Re: Transaction Isolation

Postby AVX » Wed Feb 10, 2010 3:20 pm

CREATE CONNECTION and ibec_CreateConnection do the same work, ibec_CreateConnection just is more handy.
You can use ibec_SetConnectionProp after any of them.

As of transaction parameters... Sorry, I forgot that ibec_CompareTables uses its own transactions inside so you cannot change their properties.
I should think on this.
AVX
 
Posts: 81
Joined: Sat Jun 07, 2008 4:55 am


Return to IBEBlock

Who is online

Users browsing this forum: No registered users and 1 guest

cron