BCP across systems

  • Hi,

    I would like to run a bcp job across systems - is this possible without having to install sql server on the client machine? - Secondly, do i specify the ip/servername or just servername in the -S option

    Thanks in advance

    Regards,

    Bert

  • No... all you need is to point BCP at the data on the other machine using a UNC... of course, BCP should be able to "see" it with the appropriate privs.

    And, all you need is the servername... no IP address required for this.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • thanks for the response - do i need sql server installed on the client machine or is there a way to run BCP without having installed sql server

  • Like I said... just run BCP from the server pointing at the client using UNCs.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff,

    Sorry - I might not be clear about what i am asking - I get the -S parameter - the other part of my question is - Is it possible to run the bcp.exe file from a station that doesn't have SQL server installed???

    I have a situation where i cannot have a copy of sql server installed on system A (Sql server is installed on System B) - Batch scripts aren't allowed on System B for security purposes

    Regards,

    Bert

  • Why not use BULK INSERT? It is essetially BCP but runs as T-SQL so you would not be running a script - just a 'normal' SQL statement.

     

    J

  • Then, you're kinda screwed so far as BCP goes unless you want to violate Microsoft Licensing (which I DON'T recommend).  Even with MSDE (which contains a copy of BCP), the license says you must install the full product... piece part installations are not allowed.

    Jeremy has the right idea... use BULK INSERT (not as robust but a bit faster than BCP) in a stored proc.  Then, schedule the run an a normal "SQL Job".

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Basicaly you can call bcp from dynamic SQL too so anything you do with BULK INSERT should be possible with BCP. Am I missing something ?


    * Noel

  • Color me confused as well.

    You can run bcp on the destination, pulling the data from any machine that it has access to, whether that machine has SQL Server installed or not.

    The ip/servername thing kind of threw me for a loop as well, as you can do either/or, but not both. The syntax makes me think that perhaps this is a named instance, in which case ip/instancename would work, as should server/instancename.

    Since bcp either puts data into or pulls it out of SQL server, there has to be a SQL Server box somewhere in this load process, and you should be able to run it from there.

  • This link http://support.microsoft.com/kb/248241 might be useful. You could possible then copy bcp across as well and it might run on your non SQL Server.

Viewing 10 posts - 1 through 9 (of 9 total)

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