|
Let me start by describing the situation. We have 2 companies within the same organisation that need to share the schema and data for a small set of a DB. We have been trying to come up with a way of shaing this data using XML as the 2 SQL Servers cannot see each other and never will. We have generated the Schema XML and Data XML but when we use the XMLBulkLoad in .Net the tables are not created and therefore no data inserted but it throws no errors!! Here is the Schema XML
And here is the data XML
Any help would be greatly appreciated as it is driving us nuts now, or is there an easier/better way to do this, remember that the 2 SQL Servers cannot see each other and never will.
(comments are locked)
|
|
If a full backup/restore solution isnt applicable - you only want selected tables shipped to the other site - then I would recommend you review something like SQL Data Compare from Red Gate (14 day free trial here). It lets you script the database schema (or parts thereof) and the data in the objects selected into a folder on your system (network share/local HDD etc) and you could then zip + encrypt, email and then run SQL Data Compare at the other end to get the other location up to date. Its not an ideal (read 'recommended') solution, transporting data by email has obvious risks and something managed by the SQL engine would be preferred - FTP replication etc but if they are not connected then it could be a struggle and bring its own risks. Check out http://www.replicationanswers.com/default.asp to see if you can get something sorted. I would say bcp to import/export the data but you need to cope with schema changes too. Are they so frequent that the schema needs updating EVERY time? Thanks, I will have a look at the FTP replication. The schema should not change very often. It is so annoying that this is not a simple task using XML, we have tried with a simple set of xml that was gathered from an example on the net but we just can't seem to get ours to work.
Mar 02 '10 at 05:55 AM
Dave Moss
(comments are locked)
|
|
When you say they cannot see each other - how will the XML get from one to the other? Are you using a common network location to host the XML output? Are they on the same network/domain/subnet?? You could bcp, or use SSIS maybe? You may be able to get a third party application like SQL Compare/SQL Data Compare from RedGate to do this for you, it depends on how disconnected the servers are ... The servers are on different networks and although not the ideal solution at the moment the schema and data xml are emailed between the companies. I find it odd that SQL Server provides you with a solution to export the data and the schema in XML format but no easy way to import it.
Mar 01 '10 at 12:27 PM
Dave Moss
I'm adding a new answer so that you get it notified to you ...
Mar 01 '10 at 01:15 PM
Fatherjack ♦♦
(comments are locked)
|

