The moose likes EJB and other Java EE Technologies and the fly likes How to migrate the database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to migrate the database" Watch "How to migrate the database" New topic
Author

How to migrate the database

Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
Suppose that I have an enterprise application hosted on a server (say evolutionhost). There, all the data records of my application, are being persisted to their (evolutionhost) own database server.

Lately, I need to migrate my application to another new hosting provider (say webappcabaret). I can easily migrate my application by uploading it as an EAR file. But how can I migrate the database (and data records) from the previous location (evolutionhost), to the new location (webappcabaret)?

What is the most-suitable solution that I can use here?

What is the method that Javaranch used to migrate their database to the evolutionhost!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You can use whatever database migration tool is supplied with your database. If you are migrating to a database of the same type just backup from one and restore to the other. If you are changing types you'll need to use your database creation scripts to recreate the schema then export from one and import int othe other.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
Paul Sturrock wrote:If you are migrating to a database of the same type just backup from one and restore to the other.


Thank Paul, but how can I do this backup and restore? I don't know anything about it.

And how JavaRanch did this migration?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Your database documentation will cover how to do this - it is a very common task.

Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
Thanks Paul, and still have a question about JavaRanch migration. I'm sure that they used a most-professional technology for the migration. I'm Interested to know about it.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
Actually, no. The old UBB software used files for storage with a very idiosyncratic file structure, so no ETL tool would help with that :-(
But we had a very competent developer write the JDBC code to insert that data into the database...


Ping & DNS - my free Android networking tools app
Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
Ulf Dittmer wrote:Actually, no. The old UBB software used files for storage with a very idiosyncratic file structure, so no ETL tool would help with that :-(
But we had a very competent developer write the JDBC code to insert that data into the database...


Oh! So he/she moved those files from the old host to the new host, and then used his JDBC codes to parse them to the database; am I right?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30972
    
159

Ulf Dittmer wrote:But we had a very competent developer write the JDBC code to insert that data into the database...

Where's a blushing icon when you need one?

Treimin Clark wrote:Oh! So he/she moved those files from the old host to the new host, and then used his JDBC codes to parse them to the database; am I right?

She. And yes, I used Java parsing and library routines to transform the data and JDBC (directly and indirectly) to store it. I wrote an article for the Journal that details it.

I don't actually believe Java is the best technology for the job though. I only used Java because I wanted to call JForum APIs for the upload and some validation/transformation. Easier than updating a bunch of tables by writing all the SQL. I only used raw SQL/JDBC when needed. If I wasn't calling the JForum (Java) code, I would have used a combination of Perl and UNIX awk/sed.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30972
    
159

Treimin Clark wrote: I'm sure that they used a most-professional technology for the migration.

Really? Remember JavaRanch is run by volunteers and has almost no money. For some things we do a tool could be faster. But a volunteer's time is "free." Which affects the balance of things.
Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
Jeanne Boyarsky wrote:She. And yes, I used Java parsing and library routines to transform the data and JDBC (directly and indirectly) to store it.

I wondered that is you.


Jeanne Boyarsky wrote:
I wrote an article for the Journal that details it.

Oh! This is really helpful to understand.
 
wood burning stoves
 
subject: How to migrate the database