简体   繁体   中英

How can I obtain a list of all existing databases in DB2 using the JDBC driver?

Through the DB2 command line I can obtain a list of all existing database through this command:

LIST DATABASE DIRECTORY

Is there away to do something similar from a JDBC app?

My goal is to delete a bunch of databases that start with a specific name. Example:

XYZ01
XYZ02
XYZ07
FOO01

I want to delete every database starts with XYZ.

Is there some kind of metadata database that contain such information?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM