-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to switch dynamically between DB schemas
PostPosted: Wed Jul 18, 2007 10:14 am 
Newbie

Joined: Mon Apr 16, 2007 12:02 pm
Posts: 17
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.2

I would like to know how to switch dynamically from one DB schema to another.

I do not know the number of schemas i could have to manage as far as some additional schemas could be added dynamically while my application is still up and running.

I found a way which is based on the fully specific Oracle statement:
alter session set current_schema="my_user"
executed after each getCurrentSession()

but this solution has two main drawbacks:
-> it is tied to Oracle, on DB2 for example it should be something another statement...
-> this statement is executed to often; each time getCurrentSession() is called

So is there any other way to manage that more properly?

Thanks and regards

Samuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.