Re: monitoring database

From: Val Mazur \(MVP\) (group51a_at_hotmail.com)
Date: 03/18/05


Date: Thu, 17 Mar 2005 20:59:12 -0500

Hi,

Unfortunately you would need to execute some sort of SQL statement to see if
connection is still alive or not. OLEDB does not reflect actual live state
of the connection and shows a state of the connection at the moment when it
was opened or closed.

-- 
Val Mazur
Microsoft MVP
http://xport.mvps.org
"scottrm" <scottrm@newsgroup.nospam> wrote in message 
news:23967AD4-041B-42C7-8032-5B4A16856113@microsoft.com...
>I have a C++  application running on a separate box from the database
> application (sql server). I want to know if there is any way I can tell if
> the database connection has been lost for any reason. I am not so much
> interested in the physical database box going down which I could do a ping
> test for but also to detect any internal problem within sql server.  I 
> guess
> I could write something to attempt to open a connection every couple of
> seconds but that seems a bit cumbersome, any other ideas?
> -- 
> Scott 


Relevant Pages

  • RE: Logging in in background
    ... wold take all kinds of modifictions as I'd need to be checking that each SQL ... my database and all have connection strings associated with them. ... I suspect that there is also an issue on the SQL Server side as I keep ...
    (microsoft.public.access.modulesdaovba)
  • Re: User not associated with trusted SQL Server connection
    ... > using the osql utility. ... > associated with a trusted SQL Server connection. ... > database or is it just for that instance. ...
    (microsoft.public.sqlserver.security)
  • Re: Is it just me or are there BIG problems with SQLCE 3.0?
    ... has been done with parameterised SQL, ... bit of code into my test which closes and reopens the database ... opening and closing the DB connection is not a good idea. ... // Display all error messages ...
    (microsoft.public.sqlserver.ce)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... What version of SQL CE are you using? ... Are you accessing the database from an app written in C++? ... then opens his work forms and it's in those ... It wouldn't seem to me that you'd need a new connection to ...
    (microsoft.public.sqlserver.ce)
  • Re: Perl ODBC complex query example needed
    ... newsgroup about SQL would be better for that. ... I am guessing that you probably want to access an ODBC database ... the connection string will be different). ... > sql connection is in scope for the query. ...
    (comp.lang.perl.misc)