Thank you to all of you for your quick replies.  It seems that the
connection pool validation query is not specific to any database server
implementation unless the query statement itself is server-specific
(that is, it refers to a special server system database, table, or
function).  I like the idea of querying the server for the date, but I'm
not sure that the date function is standard SQL and portable across all
server implementations.  Does anyone know otherwise?

Derek

-----Original Message-----
From: Peter Lin [mailto:[EMAIL PROTECTED] 
Sent: January 8, 2004 10:35 AM
To: Tomcat Users List
Subject: RE: Microsoft SQL Server validation query


 
in the past I just select the date from sql server. unless you want to
test a specific table, but that has potential performance impact.
 
the safe simple query to see if sql server is alive is to just select
the date.
 
peter lin


Allistair Crossley <[EMAIL PROTECTED]> wrote:
I would not do that because that would return as many 1s as there are
rows in the table. Something like count(*) may not be the most efficient
but it returns just 1 row always. Also with using 1, you cannot
guarantee a row will come back.



Allistair Crossley
__________________________ 

Intranet Senior Developer
New Media Group, QAS Ltd
Telephone: 020 7819 5343
__________________________


-----Original Message-----
From: Michael Duffy [mailto:[EMAIL PROTECTED]
Sent: 08 January 2004 15:25
To: Tomcat Users List
Subject: RE: Microsoft SQL Server validation query



Or even "SELECT 1 FROM TABLE". No COUNT overhead, if
any. - MOD


--- Allistair Crossley 
wrote:
> i think you could use anything .. maybe
> 
> SELECT COUNT(*) FROM table
> 
> The dual table is an oracle dummy table and is quite
> handy, but I think the validation query can just be
> any old select statement that should return true a
> result always.
> 
> ADC
> 
> -----Original Message-----
> From: Derek Mahar [mailto:[EMAIL PROTECTED]
> Sent: 08 January 2004 15:15
> To: Tomcat Users List
> Subject: Microsoft SQL Server validation query
> 
> 
> Does anyone happen to know which validation query I
> should use for
> Microsoft SQL Server?
> 
> Derek
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> 
>
-------------------------------------------------------
> QAS Ltd.
> Developers of QuickAddress Software
> www.qas.com
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
>
-------------------------------------------------------
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to