• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Carey Brown
  • Frits Walraven

insertion of records from one database to another using xml

Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks!can anyone tell me how to insert records from one database (sql server) to another(oracle) using xml.
tell me what r needed to successfully do this operation.
thanks in advance
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not know how to retrieve data from SQL server.
But I know how you can do it if you want to retrieve data from Oracle and put it in sql server,
Using Jdeveloper I can create new xsql object to retrive the data, like
<xsql:query connection ="Connection1" xmlns:xsql="urn racle-xsql">
SELECT field1,field2,....
FROM table1
This will give me XML file in
then I write XSLT to convert this into another XML which will create the sciprt for inserting this data in new databse
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">;
<xsl utput method="text"/>
<!-- Root template -->
<xsl:template match="/">
INSERT INTO table2 values(
<xsl:for-each select="ROWSET/ROW">
<xsl:value-of select="FIELD1"/>,
<xsl:value-of select="FIELD2"/>,
Notice that I have written output method as "text" so this creates text file which i can save and use for inserting in anywhere!!!
I can pass o/p from the first one to this xslt either manually by the oraxml utility or directly with another xsql.
I know the xsql allows me to retrieve data from oracle so it is easy.
Dont know if there is anything similar that sqlserver supports.
Sorry about that.
DO let me know if it helped you or confused u
also if you find suitable thing in sqlserver just post it here so all of us will know too!!!

[This message has been edited by Ajith Kallambella (edited May 25, 2001).]
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to take a look at XML support by Oracle on the Oracle Technet site . They have some interesting and very cool tools!
You got style baby! More than this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
    Bookmark Topic Watch Topic
  • New Topic