Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sybase connections when transaction log gets full

Status
Not open for further replies.

agupta

Programmer
Dec 10, 2001
2
BE
I am using Embedded SQL using C to open Sybase connection. My application keep connecting/disconnecting from Sybase. But, when the transaction log in the current database is full, application couldn't able to connect to Sybase and shows the error : "Trnasaction Log is full". But, during this time when the application disconnects from the database, Sybase doesn't allow to close its connection. Since it creates its connections in the Masterand coudn't release it. With this, whenever the application trying to connect to Sybase and bcoz of full transaction log, it didn't release its connection which reaches to its maximum connections.
Could anyone suggest me how to close the sybase connection even when the transaction log is full????
 
Perhaps a more meaningful question would be, Why is your transaction log filling up with any frequency? If your system is set up properly (e.g. with a threshold procedure that dumps the trans log), you shouldn't ever have a full log to worry about.

That said, we had a similar problem with an application leaving around open connections a few years back. The first thing to verify is that you don't just need an EBF (patched) version of Sybase to solve the problem. These are available for download from their web site and you can review the "cover letter" to see if there's any mention of a fix for the problem you're having.

A sort of hokey, but workable way to do it (as you're writing your own app) would be to look periodically for users whose current DB is the master and if they stay there for a while, you know they're stuck so you kill the spid in question (this can just be a script that runs in its own session or a separate background process).

If it were me, I'd fix the log filling up problem....

Good luck,

J M Craig
nsjmcraig@netscape.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top