Home » Developer & Programmer » JDeveloper, Java & XML » cannot get metadata infroamtion for non schema user
cannot get metadata infroamtion for non schema user [message #444114] Thu, 18 February 2010 14:06 Go to next message
miroconnect@yahoo.com
Messages: 202
Registered: April 2006
Senior Member
for executing procedure from java we need metadata to know about its parameters ,
If I get database connection using a non schema user i donot get any metadata information and if I get database connection using schema user I get metadata information , I would to know if this has anything to do with permissions ?
Re: cannot get metadata infroamtion for non schema user [message #444154 is a reply to message #444114] Thu, 18 February 2010 23:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can get metadata information only if you have a privilege on the object.
If you are not the owner of the object, you also have to give the owner.

Regards
Michel
Re: cannot get metadata infroamtion for non schema user [message #444219 is a reply to message #444114] Fri, 19 February 2010 07:21 Go to previous messageGo to next message
miroconnect@yahoo.com
Messages: 202
Registered: April 2006
Senior Member
Yes I am not the owner , but I did not understand what you mean by

" you also have to give the owner"
Re: cannot get metadata infroamtion for non schema user [message #444228 is a reply to message #444219] Fri, 19 February 2010 08:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have to provide the name of the object and the name of its owner to get its metadata.

Regards
Michel
Re: cannot get metadata infroamtion for non schema user [message #444232 is a reply to message #444228] Fri, 19 February 2010 09:08 Go to previous message
miroconnect@yahoo.com
Messages: 202
Registered: April 2006
Senior Member
please tell me how do this using spring simplejdbccall

here the code to call this function

this.funcGetUserInfo =new SimpleJdbcCall(jdbcTemplate).withFunctionName("getUserInfo").withCatalogName("SSI_INTEGRATION");
MapSqlParameterSource in = new MapSqlParameterSource()
.addValue("aSessionId", sessionId);
BigDecimal value= funcGetUserInfo.executeFunction(BigDecimal.class, in);

the logs from sprign jdbc

for user AUDT who is the owner of the function

2010-02-18 14:38:51,132 [qtp0-1] DEBUG org.springframework.jdbc.core.simple.SimpleJdbcCal l - JdbcCall call not compiled before execution - invoking compile
2010-02-18 14:38:51,147 [qtp0-1] DEBUG org.springframework.jdbc.datasource.DataSourceUtil s - Fetching JDBC Connection from DataSource
2010-02-18 14:38:51,147 [qtp0-1] DEBUG org.springframework.jdbc.core.metadata.CallMetaDat aProviderFactory - Using org.springframework.jdbc.core.metadata.OracleCallM etaDataProvider
2010-02-18 14:38:51,147 [qtp0-1] DEBUG org.springframework.jdbc.core.metadata.CallMetaDat aProvider - Retrieving metadata for SSI_INTEGRATION/AUDT/GETUSERINFO
2010-02-18 14:38:52,291 [qtp0-1] DEBUG org.springframework.jdbc.core.metadata.CallMetaDat aProvider - Retrieved metadata: null 5 3 NUMBER true
2010-02-18 14:38:52,291 [qtp0-1] DEBUG org.springframework.jdbc.core.metadata.CallMetaDat aProvider - Retrieved metadata: ASESSIONID 1 12 VARCHAR2 true
2010-02-18 14:38:52,291 [qtp0-1] DEBUG org.springframework.jdbc.datasource.DataSourceUtil s - Returning JDBC Connection to DataSource
2010-02-18 14:38:52,291 [qtp0-1] DEBUG org.springframework.jdbc.core.metadata.CallMetaDat aContext - Added metadata return parameter for: return
2010-02-18 14:38:52,291 [qtp0-1] DEBUG org.springframework.jdbc.core.metadata.CallMetaDat aContext - Added metadata in parameter for: ASESSIONID
2010-02-18 14:38:52,291 [qtp0-1] DEBUG org.springframework.jdbc.core.simple.SimpleJdbcCal l - Compiled stored procedure. Call string is [{? = call SSI_INTEGRATION.CHECKUSER(?)}]

and in case of audt_internal who is not the owner of function

2010-02-18 14:36:48,258 [qtp0-0] DEBUG org.springframework.jdbc.core.simple.SimpleJdbcCal l - JdbcCall call not compiled before execution - invoking compile
2010-02-18 14:36:48,258 [qtp0-0] DEBUG org.springframework.jdbc.datasource.DataSourceUtil s - Fetching JDBC Connection from DataSource
2010-02-18 14:36:48,273 [qtp0-0] DEBUG org.springframework.jdbc.core.metadata.CallMetaDat aProviderFactory - Using org.springframework.jdbc.core.metadata.OracleCallM etaDataProvider
2010-02-18 14:36:48,273 [qtp0-0] DEBUG org.springframework.jdbc.core.metadata.CallMetaDat aProvider - Retrieving metadata for SSI_INTEGRATION/AUDT_INTERNAL/GETUSERINFO
2010-02-18 14:36:49,401 [qtp0-0] DEBUG org.springframework.jdbc.datasource.DataSourceUtil s - Returning JDBC Connection to DataSource
2010-02-18 14:36:49,401 [qtp0-0] DEBUG org.springframework.jdbc.core.simple.SimpleJdbcCal l - Compiled stored procedure. Call string is [{? = call SSI_INTEGRATION.GETUSERINFO()}]


please tell me how can I tell spring to get the metadata for the function incase of audt_internal?










Previous Topic: user and metadata permissions
Next Topic: problem with OrdPlayMediaServlet
Goto Forum:
  


Current Time: Thu Mar 28 17:10:00 CDT 2024