DB2 Version 9.7 for Linux, UNIX, and Windows

DB2Administrator class

Instances of the com.ibm.db2.jcc.DB2Administrator class are used to retrieve DB2CataloguedDatabase objects. DB2Administrator applies to DB2® for Linux, UNIX, and Windows databases only.

DB2Administrator methods

getInstance
Format:
public static DB2Administrator getInstance()

Returns an instance of the DB2Administrator class.

getCataloguedDatabases
Format:
public DB2CataloguedDatabase[] getCataloguedDatabases()
 throws java.sql.SQLException

Retrieves an array that contains a DB2CataloguedDatabase object for each local database in the local database directory.

If a local DB2 system is available, and the catalog contains no databases, an array with length zero is returned. If no local DB2 system is available, null is returned. If the local system is not a DB2 for Linux, UNIX, and Windows system, an SQLException is thrown.