Reputation: 5079
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?
Upvotes: 2
Views: 1035
Reputation: 159086
You can't. Not using JDBC. Check this thread: http://www.dbforums.com/showthread.php?1667811-get-a-list-of-all-databases-on-a-DB2-instance
Upvotes: 1