How to check db2 database connection

I need to check the connection to the db2 database.

With oracle databases, I would do "select * from dual" to do this.

But the dual is specific to the oracle. Is there a similar canonical sql test statement for db2?

+2
source share
3 answers

I ended up using

SELECT CURRENT SQLID FROM SYSIBM.SYSDUMMY1 

which seems to have worked.

+1
source

SELECT 1 FROM SYSIBM.SYSDUMMY1

cheaper than

SELECT CURRENT SQLID FROM SYSIBM.SYSDUMMY1

+4
source
 LIST DB DIRECTORY 

or

 LIST TABLES 
0
source

All Articles