开发者

How to test the connection to a db2 database

开发者 https://www.devze.com 2023-02-05 16:43 出处:网络
I need to test the connection to a db2 database. With oracle databases I\'d execute a \'select * from dual\' in order to do this.

I need to test the connection to a db2 database.

With oracle databases I'd execute a 'select * from dual' in order to do this.

But dual is specific for oracle. Is t开发者_开发知识库here a similar canonical test sql statement for db2?


SELECT 1 FROM SYSIBM.SYSDUMMY1

cheaper then

SELECT CURRENT SQLID FROM SYSIBM.SYSDUMMY1


I ended up using

SELECT CURRENT SQLID FROM SYSIBM.SYSDUMMY1

which seems to work nice.


LIST DB DIRECTORY

or

LIST TABLES
0

精彩评论

暂无评论...
验证码 换一张
取 消