From: Kjell R. <kje...@ma...> - 2016-01-30 14:39:02
|
Hi, Using a framework that's "database agnostic", I am able to choose a value for transaction isolation level using the System.Data.IsolationLevel enum. I can't find a way to enter a FbTransationOptions struct or FbTransactionBehavior value. Using System.Data.IsolationLevel, it seems I get transactions with behavior ReadCommitted + NoRecVersion. I would like to have RecVersion instead of NoRecVersion. Any suggestions? Regards, Kjell Rilbe -- Marknadsinformation logotyp Kjell Rilbe Telefon: 08-761 06 55 Mobil: 0733-44 24 64 Marknadsinformation i Sverige AB Ulvsundavägen 106C 168 67 Bromma www.marknadsinformation.se <http://www.marknadsinformation.se> 08-514 905 90 Företagskontakt.se <http://xn--fretagskontakt-vpb.se> Personkontakt.se <http://personkontakt.se> |
From: Kjell R. <kje...@ma...> - 2016-01-30 08:46:39
|
Hi, Using a framework that's "database agnostic", I am able to choose a value for transaction isolation level using the System.Data.IsolationLevel enum. I can't find a way to enter a FbTransationOptions struct or FbTransactionBehavior value. Using System.Data.IsolationLevel, it seems I get transactions with behavior ReadCommitted + NoRecVersion. I would like to have RecVersion instead of NoRecVersion. Any suggestions? Regards, Kjell Rilbe -- Marknadsinformation logotyp Kjell Rilbe Telefon: 08-761 06 55 Mobil: 0733-44 24 64 Marknadsinformation i Sverige AB Ulvsundavägen 106C 168 67 Bromma www.marknadsinformation.se <http://www.marknadsinformation.se> 08-514 905 90 Företagskontakt.se <http://xn--fretagskontakt-vpb.se> Personkontakt.se <http://personkontakt.se> |
From: Kjell R. <kj...@ri...> - 2016-01-30 11:11:04
|
Hi, Using a framework that's "database agnostic", I am able to choose a value for transaction isolation level using the System.Data.IsolationLevel enum. I can't find a way to enter a FbTransationOptions struct or FbTransactionBehavior value. Using System.Data.IsolationLevel, it seems I get transactions with behavior ReadCommitted + NoRecVersion. I would like to have RecVersion instead of NoRecVersion. Any suggestions? Regards, Kjell Rilbe -- --------------------------------------------------------------------------- Kjell Rilbe <kj...@ri...> Telefon: 0733-44 24 64 (+46 733 442464) --------------------------------------------------------------------------- "If there's a price for bein' me, that's one I'll have to pay" Aaron Tippin --------------------------------------------------------------------------- |
From: Геннадий З. <zab...@gm...> - 2016-01-30 19:23:45
|
I'm using custom extension function, that takes DbContext and depending on Database.Connection type creates manually tuned transaction for FB case. On 30 January 2016 at 12:44, Kjell Rilbe <kj...@ri...> wrote: > Hi, > > Using a framework that's "database agnostic", I am able to choose a > value for transaction isolation level using the > System.Data.IsolationLevel enum. I can't find a way to enter a > FbTransationOptions struct or FbTransactionBehavior value. > > Using System.Data.IsolationLevel, it seems I get transactions with > behavior ReadCommitted + NoRecVersion. I would like to have RecVersion > instead of NoRecVersion. > > Any suggestions? > > Regards, > Kjell Rilbe > > -- > --------------------------------------------------------------------------- > Kjell Rilbe <kj...@ri...> > Telefon: 0733-44 24 64 (+46 733 442464) > --------------------------------------------------------------------------- > "If there's a price for bein' me, that's one I'll have to pay" > Aaron Tippin > --------------------------------------------------------------------------- > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |
From: Геннадий З. <zab...@gm...> - 2016-01-30 19:25:42
|
https://gist.github.com/zabulus/1e46010094e1b6678729 Here is snippet |
From: Kjell R. <kj...@ri...> - 2016-01-31 07:52:30
|
den 2016-01-30 20:23, skrev Геннадий Забула: > On 30 January 2016 at 12:44, Kjell Rilbe <kj...@ri...> wrote: >> Hi, >> >> Using a framework that's "database agnostic", I am able to choose a >> value for transaction isolation level using the >> System.Data.IsolationLevel enum. I can't find a way to enter a >> FbTransationOptions struct or FbTransactionBehavior value. >> >> Using System.Data.IsolationLevel, it seems I get transactions with >> behavior ReadCommitted + NoRecVersion. I would like to have RecVersion >> instead of NoRecVersion. >> >> Any suggestions? >> >> > I'm using custom extension function, that takes DbContext and > depending on Database.Connection type creates manually tuned > transaction for FB case. > https://gist.github.com/zabulus/1e46010094e1b6678729 > Here is snippet Nice, but I assume this is a function that you manually call in your own code, instead of the regular DbConnection.BeginTransaction? The problem is that the framework I'm using does it all under the hood: opens connection, starts and ends transactions and executes SQL. I add the DbConnection component I need to my form, in my case an FbConnection, and configure my framework's persistence handler to use that connection. The persistence handler has a lot of settings for the SQL connection, but for fetch and write transaction mode it uses the standard System.Data.IsolationLevel enum type, so there's no way to configure FireBird specific transaction options. What I need is some way to hook into the FbConnection's call to start a transaction, or "globally" configure it to a specific transaction option/mode/isolation level, either overriding the System.Data.IsolationLevel that the framework's persitence handler passes in, or map it in a different way than apparently is standard for the Firebird .Net provider. I.e. map ReadCommitted to ReadCommitted + RecVersion + NoWait rather than ReadCommitted + NoRecVersion + NoWait. Possible? Inherit from FbCOnnection and override BeginTransaction and use that (derived) component in place of FbConnection? Kjell -- --------------------------------------------------------------------------- Kjell Rilbe <kj...@ri...> Telefon: 0733-44 24 64 (+46 733 442464) --------------------------------------------------------------------------- "If there's a price for bein' me, that's one I'll have to pay" Aaron Tippin --------------------------------------------------------------------------- |
From: Геннадий З. <zab...@gm...> - 2016-01-31 09:47:16
|
I think it is not possible. Mapping IsolationLevel <-> DbTransactionBuffer is hardcoded in FB.NET library. I know that EF I can use IDbCommandInterceptor and DbInterception.Add(suppressor); This allows to override transactions. In your framework could be something similar. On 31 January 2016 at 09:20, Kjell Rilbe <kj...@ri...> wrote: > den 2016-01-30 20:23, skrev Геннадий Забула: >> On 30 January 2016 at 12:44, Kjell Rilbe <kj...@ri...> wrote: >>> Hi, >>> >>> Using a framework that's "database agnostic", I am able to choose a >>> value for transaction isolation level using the >>> System.Data.IsolationLevel enum. I can't find a way to enter a >>> FbTransationOptions struct or FbTransactionBehavior value. >>> >>> Using System.Data.IsolationLevel, it seems I get transactions with >>> behavior ReadCommitted + NoRecVersion. I would like to have RecVersion >>> instead of NoRecVersion. >>> >>> Any suggestions? >>> >>> >> I'm using custom extension function, that takes DbContext and >> depending on Database.Connection type creates manually tuned >> transaction for FB case. >> https://gist.github.com/zabulus/1e46010094e1b6678729 >> Here is snippet > > Nice, but I assume this is a function that you manually call in your own > code, instead of the regular DbConnection.BeginTransaction? > > The problem is that the framework I'm using does it all under the hood: > opens connection, starts and ends transactions and executes SQL. I add > the DbConnection component I need to my form, in my case an > FbConnection, and configure my framework's persistence handler to use > that connection. The persistence handler has a lot of settings for the > SQL connection, but for fetch and write transaction mode it uses the > standard System.Data.IsolationLevel enum type, so there's no way to > configure FireBird specific transaction options. > > What I need is some way to hook into the FbConnection's call to start a > transaction, or "globally" configure it to a specific transaction > option/mode/isolation level, either overriding the > System.Data.IsolationLevel that the framework's persitence handler > passes in, or map it in a different way than apparently is standard for > the Firebird .Net provider. I.e. map ReadCommitted to ReadCommitted + > RecVersion + NoWait rather than ReadCommitted + NoRecVersion + NoWait. > > Possible? Inherit from FbCOnnection and override BeginTransaction and > use that (derived) component in place of FbConnection? > > Kjell > > -- > --------------------------------------------------------------------------- > Kjell Rilbe <kj...@ri...> > Telefon: 0733-44 24 64 (+46 733 442464) > --------------------------------------------------------------------------- > "If there's a price for bein' me, that's one I'll have to pay" > Aaron Tippin > --------------------------------------------------------------------------- > > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |
From: Jiří Č. <ji...@ci...> - 2016-01-31 17:13:42
|
The ReadCommitted is RecVersion: case IsolationLevel.ReadCommitted: case IsolationLevel.ReadUncommitted: default: options.TransactionBehavior |= FbTransactionBehavior.ReadCommitted; options.TransactionBehavior |= FbTransactionBehavior.RecVersion; break; -- Mgr. Jiří Činčura Independent IT Specialist On Sat, Jan 30, 2016, at 11:44, Kjell Rilbe wrote: > Hi, > > Using a framework that's "database agnostic", I am able to choose a > value for transaction isolation level using the > System.Data.IsolationLevel enum. I can't find a way to enter a > FbTransationOptions struct or FbTransactionBehavior value. > > Using System.Data.IsolationLevel, it seems I get transactions with > behavior ReadCommitted + NoRecVersion. I would like to have RecVersion > instead of NoRecVersion. > > Any suggestions? > > Regards, > Kjell Rilbe > > -- > --------------------------------------------------------------------------- > Kjell Rilbe <kj...@ri...> > Telefon: 0733-44 24 64 (+46 733 442464) > --------------------------------------------------------------------------- > "If there's a price for bein' me, that's one I'll have to pay" > Aaron Tippin > --------------------------------------------------------------------------- > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider |
From: Kjell R. <kj...@ri...> - 2016-02-01 06:10:21
|
Jiří Činčura skrev: > The ReadCommitted is RecVersion: > > case IsolationLevel.ReadCommitted: > case IsolationLevel.ReadUncommitted: > default: > options.TransactionBehavior |= > FbTransactionBehavior.ReadCommitted; > options.TransactionBehavior |= > FbTransactionBehavior.RecVersion; > break; > Oh, that's interesting. I'll have to check again then. The thing is that I noticed NoRecVersion reported by Sinática Monitor for queries executed by the framework. Has the mapping from IsolationLevel.ReadCommitted to TransactionBehavior changed? I have neglected to update it for quite some time. I seem to be at version 2.6.5. Guess I should upgrade, huh? :-) Regards, Kjell -- ---------------------------------------------------------------------- Kjell Rilbe <kj...@ri...> Home: +46 8 7610734 Mobile: +46 733 442464 ---------------------------------------------------------------------- "If there's a price for bein' me, that's one I'll have to pay" Aaron Tippin ---------------------------------------------------------------------- |
From: Jiří Č. <ji...@ci...> - 2016-02-01 06:37:31
|
> I have neglected to update it for quite some time. I seem to be at > version 2.6.5. Guess I should upgrade, huh? :-) Yes. You should. -- Mgr. Jiří Činčura Independent IT Specialist |