<p>I'm looking for a dummy SQL statement that will work from a C# SQL connection to check for connectivity.</p>

<p>Basically I need to send a request to the database, I don't care what it returns I just want it to be successful if the database is still there and throw an exception if the database isn't.</p>

<p>The scenario I'm testing for is a loss of connectivity to the database, where the SQLConnections State property seems to still be "Open" but there is no connectivity.</p>

Most SQL databases have a 'table' for this purpose.
In DB2, it's:
```
```
select * from sysibm.sysdummy1
```
```
while Oracle has, from memory,
```
```
select * from dual
```
```
It'll depend on the database at the back end.