-1

I'm working in postgresql database with jsp/servlets, I need to connect the external jdbc such as MySQL,MS SQL,PostgreSQL and migrate all the datas to my Postgresql database.

Can any one please point me in the right direction?

9
  • 1
    Talend DI might help (talend.com/products/open-studio-di.php) if you need a "one-shot" migration Commented Aug 16, 2012 at 5:04
  • this might be helpful Commented Aug 16, 2012 at 5:05
  • thanks for your valuable answer i need to migrate using java code...not using third party tool, please let me know if any Commented Aug 16, 2012 at 5:14
  • @Sathish Hmm, sorry, not really a duplicate. That question is about converting dumps, you want to move data around live using JDBC. I'm not aware of any canned tools to do what you want. Commented Aug 16, 2012 at 9:05
  • Do you need to convert the DDL using Java over JDBC too? The CREATE TABLE statements, etc? If so, you're going to have a huge job ahead of you. If all you need to do is copy data between one database and another where the schemas are basically the same, that's a very different and much simpler question. Commented Aug 16, 2012 at 9:06

3 Answers 3

0

I believe there is no simple solution for your task, unless its a fairly basic project. In real world sometimes we're forced to use db specific definitions like indices, transaction management, sequences, etc. I'm not telling about db specific queries or things like PL/SQL or Transact SQL that simply are not supported by all the data bases.

If you're using Hibernate/JPA, and in particular schema generation from your entities, you can try to connect to the old schema, fetch all the entities and serialize them on your hard drive, than configure datasource with the new db address and try to deploy the entities there but in general I wouldn't expect that all will be clear and work out of the box

Disclamer, I'm a Java guy, so I share my thoughts from the perspective of java developer and not a DBA :)

Hope this helps

Sign up to request clarification or add additional context in comments.

1 Comment

but i need migrate the external database table datas to my Postgresql database., please let me know if any
0

As RC said in the comments, try using Talend they have a open studio Here is the link. Free version is absolutely fine with your case. You can write (or design) a job and export it as a jar and use it part of your application or run it as cron scheduler based on your requirement.
They have some tutorials over the web and some on youtube also. They should be helpful.

Comments

0

This explains how to connect to PostgreSQL with JDBC. Does that help?

1 Comment

Its better you do the import and export process manually through java code. could you please modify the question with exact problem?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.