• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data exchange

 
jp kavita
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to read data from sqlserver2005 and write into another database using sample java code.please guide me how to read and write data from data base.

Thanks&Regards
kavita
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you aware that SQL Server contains a tool called DTS that will do this for you?
 
jp kavita
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

thank Q for your reply actually
I want to transfer data between sqlserver and other database.my sql server is running in one host using sqlsever jdbc driver,other server is running in other host using odbc dsn.how to transfer data between two data bases.

Thanks&Regards
kavita
 
Jan Cumps
Bartender
Posts: 2608
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jp kavita:
...how to transfer data between two data bases...
As Paul said. You can select the sqlserver as source, and your odbc datasource as target.
 
jp kavita
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
thank Q,
no i want to transfer using jdbc code.

thanks&Regards
kavita
 
jp kavita
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have on question to transfer data between two database we need to have same tables in two databases or same fileds is enough.
please clarify this question

Thanks&Regards
kavita
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on how you wan to go about transferring the data. Principally, the databases can have completely different schemas. You can open a ResultSet from one database, and then create INSERT statements for the other one from that data.
 
jp kavita
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
thank Q,Can i have some sample steps to write data into another database.

Thanksinadvacne
kavita
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you familiar with JDBC? If not, you should learn how to use it with a single DB first. If you do know it, what problem are you facing retrieving data from one DB and inserting it into another one?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic