December 2010
Intermediate to advanced
451 pages
11h 16m
English
You are interested in retrieving some metadata regarding the database from within your Java stored procedure. In this recipe, you want to list all the schemas within the database.
Create a Java stored procedure that utilizes the OracleDatabaseMetaData object to pull information from the connection. In the following example, a Java stored procedure is created that utilizes the OracleDatabaseMetaData object to retrieve schema names from the Oracle connection. This Java method will be added to the JavaUtils class.
public static void listDatabaseSchemas() {
Connection conn = null;
try {
conn = DriverManager.getConnection("jdbc:default:connection:"); OracleDatabaseMetaData ...Read now
Unlock full access