Your commands have helped me greatly. I was looking for a way to test the current database connection in a shell script before doing any destructive actions ie.DELETE FROM.
I know I can do CONNECT RESET, TERMINATE etc, but due to a problem we experienced earlier this week we want to be certain we are connected to the right database.
I'm sure you know, but in case you don't; if you have a shell script that fails in connecting to a database, the script will continue (obviously only if you don't have error checking in it!) and use the underlying telnet database connection if you have one.