Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

insertion of records from one database to another using xml  RSS feed

 
Greenhorn
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
</xsql:query>
This will give me XML file in
<ROW NUM>
<ROW>
.....
format.
then I write XSLT to convert this into another XML which will create the sciprt for inserting this data in new databse
say,
<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"/>,
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
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!!!
Thanks,

[This message has been edited by Ajith Kallambella (edited May 25, 2001).]
 
Sheriff
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!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!