Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Dummy operation to check integrity  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author & internet detective
Marshal
Posts: 37714
579
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!