• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to migrate the database

 
Ranch Hand
Posts: 757
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic