my dog learned polymorphism*
The moose likes JDBC and the fly likes Dummy operation to check integrity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Dummy operation to check integrity" Watch "Dummy operation to check integrity" New topic
Author

Dummy operation to check integrity

shri Sonparote
Ranch Hand

Joined: May 07, 2007
Posts: 30
Hi
All,
I want to know the any dummy operation which will check integrity.
I don't want execute query .I am using isReadOnly() and isclosed() but they can't check integrity of connection.
So any body please tellme any lightweight operation to check integrity.

Regards
Shrikant
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30085
    
149

Shrikant,
Why don't you want to run a query? It could be a "dummy" query. For example, in Oracle you could do a query on the dual table which doesn't result in a table scan.

I don't know of a way of checking a connection is good without actually connecting. You could do a query on table structure/metadata, but that is likely to take longer than running a tiny query.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dummy operation to check integrity
 
Similar Threads
Question on XML Signature
EJB Transaction Problem
CRC32 check for zip
ANT - modify file
Checking integrity of Connection