• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting Role

 
Shyam Sankar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When I try to set role in Oracle by executing the query:
set role USER_01 identified by P5428738,
I get the following exception:
java.sql.SQLException: ORA-01937: missing or invalid role name
But when I open an SQL prompt and execute the same, the role gets set.
What might be tbe reason??
Thanks in Advance
Shyam
 
Nagendra Prasad
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a couple of things u need to check here:
a. Is USER_01 and its password hardcoded or are they being received as parameters into this program?
If this is the case, then u could have a problem as dynamic sql for these operations do not take too kindly to bind variables. Try hardcoding and test it once.

b.What statement object are u using?
If you could check this and reply, maybe I could help u more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic