Home » RDBMS Server » Security » Getting metadatas with a remote user (Oracle 10, AIX, Weblogic 9.2)
Getting metadatas with a remote user [message #360084] Wed, 19 November 2008 09:04
Messages: 1
Registered: November 2008
Location: Paris
Junior Member
with this programm :

private int getSqlType(Connection connection, String schema, String tablename, String COLUMN) 
	 				throws Throwable {
		 DatabaseMetaData databasemetadata = connection.getMetaData();
		 ResultSet resultset = NULL;
	            resultset = databasemetadata.getColumns(NULL, schema.toUpperCase(), tablename.toUpperCase(), COLUMN.toUpperCase());
	                int i = resultset.getInt(5);
	                RETURN i;
	            } else
	                throw new SQLException("Column not found table=" + tablename + " col=" + COLUMN);
	            IF(resultset != NULL)

I'm trying to get informations about the datatypes of my tables.
For this, I'm connected with a remote user which i promoted with the role ANALYSE ANY (plus select/update/delete of every table of my schema)
The problem is that my request returns any empty resultset.

It seems that my user cannot do this operation.
Do you know which role i have to add on my user to do this ? or if i forgot something ?

For information
- I can make a select and an update with this user;
- User the trigger-technique, my user has its default schema pointing to the good schema;
- The same program works fine with a user who is the administrator of my schema.

Thank you for your help.
Previous Topic: oracle vault
Next Topic: How to log program and module used by any session
Goto Forum:

Current Time: Sat Sep 23 18:36:46 CDT 2023