• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to migrate the database

 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your database documentation will cover how to do this - it is a very common task.

 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Treimin Clark
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34839
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 757
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic