How to test the connection to a db2 database

后端 未结 3 884
旧巷少年郎
旧巷少年郎 2021-01-20 00:07

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 o

相关标签:
3条回答
  • 2021-01-20 00:51

    SELECT 1 FROM SYSIBM.SYSDUMMY1

    cheaper then

    SELECT CURRENT SQLID FROM SYSIBM.SYSDUMMY1

    0 讨论(0)
  • 2021-01-20 00:53
    LIST DB DIRECTORY
    

    or

    LIST TABLES
    
    0 讨论(0)
  • 2021-01-20 01:08

    I ended up using

    SELECT CURRENT SQLID FROM SYSIBM.SYSDUMMY1
    

    which seems to work nice.

    0 讨论(0)
提交回复
热议问题