• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to Specify SYSDBA Role for SYS Login

 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If my JDBC driver connect as SYS user, how can I specify the SYSDBA role? I encountered this exception when connecting from a DataSource:
Exception in thread "main" java.sql.SQLException: ORA-28009: connection to sys should be as sysdba or sysoper

I know that if I get connection from DriverManager, I can pass a property object with the internal_logonproperty set to sysdba. But similar option doesnt seem to exist for OracleDataSource. How could I do it if I want to go thru the datasource?
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alec,
If you are using Oracle 10g, then (and this is only a suggestion) perhaps "connection attributes" will help you. Here is a relevant article:

http://www.oracle.com/technology/oramag/oracle/04-jul/o44dev_jdbc.html

Good Luck,
Avi.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic