-->
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.  [ 3 posts ] 
Author Message
 Post subject: Reloading a full DB without lossing data access
PostPosted: Tue Apr 05, 2005 4:25 pm 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
Hi all,

I have a small problem I would like to solve. I am pretty sure I am not the only one having this problem.

Hibernate will be connected to a quite big database (15Gigs) all day long in read only access. At midnight, I have to reload the database again with updated Data (let say : Account, Client, Product, Basket, etc). But I dont want my application to feel the down time when loading, reconstructing the index, the foreign key, etc. So I guess I have 2 scenarios to preserve the old data while loading the new one.

The first one is to load the new data in some Table B and make a Switch View (from Table A to Table B) when the load is complete. The only problem will be the management of the database exception when switching view if a JDBC Transaction need the data at the same time of the switch.

The second idea would be to load a Database B while the other application access the DataBase A, and then when the load is finish, we set the DataSource factory to give a dataConnection to B instead of A. The only problem is that if I need to explicitly name the database in Hibernate to make SQL JOIN between 2 databases, this solution will not work.

Any idea for solution 1 or 2?

Thanks for replying.

Etienne.
Montreal


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 05, 2005 4:41 pm 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
Hi,

a thing I forgot to say is that the reloading will be done with the BCPIn-Fast function on Sybase. We will not use JDBC because it would be too slow to reload the 15gig data. That is the reason we need to "stop" all new connection on the table because the table will be drop before each BCP-IN.

Thanks.

Etienne.
Montreal


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 06, 2005 9:35 am 
Senior
Senior

Joined: Tue Jan 11, 2005 5:03 pm
Posts: 137
Location: Montreal, Quebec
Hi all,

I didn't get much answer. To be more specific to Hibernate, in the scenario 2, can I set Hibernate to change the database name (without changing the domain model) in its query runtime?

Thanks.

Etienne.


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

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.