Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Provided Answers: 1

    Unanswered: SQLCMD to export resultset to remote server

    Good day,

    I am using SQLCMD to export a resultset to my servers local drive and all is working fine in that regard.

    However I need the file to be created on a remote server, passing the login credentails for this server as well, not just created on the local server.

    Is this possible? Can anyone help me in this regard please.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    The easiest way to accomplish this would be to use PowerShell to run your SQL Query, post-process the results, and store them wherever you wish.

    Depending on just what you need to accomplish you can probably do it using CMD.EXE and running SQLCMD.EXE, but that will be both more difficult and it will perform less efficiently too.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts