Re: [firebird-support] Transaction in limbo

2016-07-19 Thread 'Mark Rotteveel' m...@lawinegevaar.nl [firebird-support]
Of course there is: just call isc_prepare and never commit or rollback.
Mark

- Bericht beantwoorden -
Van: "Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]" 

Aan: 
Onderwerp: [firebird-support] Transaction in limbo
Datum: di, jul. 19, 2016 12:16

19.07.2016 12:14, michael.vilhelm...@microcom.dk [firebird-support] wrote:
> As I read about 2 phase commits, its about 2 databases. We do not use more 
> than one

There is no other way to get transaction in limbo.


-- 
WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links



https://info.yahoo.com/legal/us/yahoo/utos/terms/

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
19.07.2016 12:14, michael.vilhelm...@microcom.dk [firebird-support] wrote:
> As I read about 2 phase commits, its about 2 databases. We do not use more 
> than one

   There is no other way to get transaction in limbo.


-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
No - here I cannot since we have one external access to this database.
And sinse this database is the only one doing this, I have a suspecion that 
this external access is doing something wrong.

But I will check my own programs first to be sure I do not do it wrong

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
19.07.2016 13:33, michael.vilhelm...@microcom.dk [firebird-support] wrote:
> I have total access to the code :)
> I wrote all of it.

   But you cannot be sure that they use only your software.


-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
I have total access to the code :)
I wrote all of it.

I only have one routine, where I do two connects to the database. 
Those do not interact in any way.
Or at least they shouldn't - i'll do a check.

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 19-7-2016 12:14, michael.vilhelm...@microcom.dk [firebird-support] wrote:
> As I read about 2 phase commits, its about 2 databases. We do not use
> more than one

Not really, two-phase commits can also be applied to a single database, 
single connection.

It just means that instead of doing an immediate commit/rollback, you 
first prepare the transaction (which puts it in 'limbo'), and then 
commit or rollback. Between the prepare and the commit/rollback you can 
do other things. For example when participating in a distributed 
transaction, you get a note from the distributed transaction manager to 
prepare a commit, you prepare, you then signal to the manager that you 
are ready to commit, and then wait for the manager to ask you to really 
commit (all other participating transactions prepared successfully) or 
rollback (one or more participating transactions failed to prepare).

The most common use case is distributed transactions, but nothing 
prevents you from performing a 2-phase commit without participating in one.

So without knowing your application etc, it is impossible to tell what 
might be causing transactions to go in limbo, except for the theoretical 
causes.

So, what kind of applications do you have, in what language, does it use 
isc_prepare anywhere, or (for example in Java) an XADataSource?

Mark
-- 
Mark Rotteveel


Re: [firebird-support] Transaction in limbo

2016-07-19 Thread Lester Caine les...@lsces.co.uk [firebird-support]
On 19/07/16 11:14, michael.vilhelm...@microcom.dk [firebird-support] wrote:
> As I read about 2 phase commits, its about 2 databases. We do not use
> more than one
Application with two connections to the same database? That may not be
so easy to spot if you don't have full access to the code.

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk


Re: [firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
As I read about 2 phase commits, its about 2 databases. We do not use more than 
one

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread michael.vilhelm...@microcom.dk [firebird-support]
We do not use either replication or more than one database.

Re: [firebird-support] Transaction in limbo

2016-07-19 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 19-7-2016 09:32, michael.vilhelm...@microcom.dk [firebird-support] wrote:
> I have a database, which have had to instances where there have been
> Transactions in limbo.
> I know how to fix this.
>
> I am on the other hand unsure why they appear.
> What can cause this?
> What should/could I check, so I can eliminate this from occuring.
>
> The database is a Firebird 2.5 running Classic Server.
>
> We have some 120+ database accross some 10+ servers. This is the only
> one, where this is happening.

Transactions in limbo are prepared but not committed / rolled back. This 
can happen when an application uses 2-phase commits but doesn't perform 
the second phase (eg because of bugs, failures or crashes). The primary 
use case for 2-phase commits is distributed transactions.

Mark
-- 
Mark Rotteveel


Re: [firebird-support] Transaction in limbo

2016-07-19 Thread 'Thomas Steinmaurer' t...@iblogmanager.com [firebird-support]
> Hi
> 
> I have a database, which have had to instances where there have been
> Transactions in limbo.
> I know how to fix this. 
> 
> I am on the other hand unsure why they appear.
> What can cause this?
> What should/could I check, so I can eliminate this from occuring. 

Something went wrong in a distributed transaction spanning multiple databases. 
Prominent examples are e.g. replication tools.



--
With regards,
Thomas Steinmaurer
http://www.upscene.com

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.