Transfer data (views) between databases in offline scenario

  • werner.huysmans wrote:

    What's the use of creating that xsd in this environment if I can't create a table from it?

    I'm not particularly good at XSDs, but as I understand it there are more uses than creating tables from it. For instance, it can be used to validate an XML document. Or describe it.

    I like to point out that in a relational database a table is supposed to model a certain entity with a known set of attributes. From this perspective, having tables with dynamic definitions like you seem to have is dubious in the first place.

    The fact that they created a way to produce an XSD from a result set, does by no means call for that you should be able to create a table from the XSD. If you think that this is an important feature, you suggest this on SQL Server's Uservoice site. But for now it's hard work to create these tables.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • Jeff Moden wrote:

      <li style="list-style-type: none;">

    1. Set up a stored procedure to produce the output that you want to send to the the other machine in a file.
      <li style="list-style-type: none;">

    1. Execute xp_CmdShell to make a call to SQLCmd to run the proc using the switches for a trusted connection and the -o switch to write the output to a file.  You can find more details at the following link for SQLCmd.

    So first Werner should call some SQL, that calls xp_cmdshell that calls SQLCMD that calls this stored procedure? Wouldn't it be a lot easier to call SQLCMD directly?

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply