This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cam i set catalog on connection with oracle

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

lets say i have a connection that i get from data source.

The connection is to user XXX.

can i change the user in run time?

In my sql i point the data source to localhost:3306 and set the schema (catalog) in run time, can i do something like this in oracle?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34681
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Avihai,
No. The connection is tied to a specific user. To change user, you need to get a new connection.

This is similar to how you have to reconnect to login with a different user id at the sql plus command line.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic