Results 1 to 9 of 9

Thread: bcp

  1. #1
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322

    Unanswered: bcp

    OK, not my issue, but someone built a rocket ship with Replication on some very small tables that are out of play

    I suggested they do a dump and restore of a dev box, but because of replication, the impact will be larger than they wanted

    So now they want to bcp out sever multi million row tables

    So I said ok

    They were going to do it to their local drive, and I said no, use UNC file name to the server itself

    Now for the question

    I suggested to run this bcp bat file as a job from the server, but the guy doesn't have rights

    I found the dba for the box and he's agreed to schedule/run the job

    BUT

    What happens if a client runs the bcp from his local machine?

    Does it make a round tri[p or is it smart enough to take the network out of play?

    SQL 2k btw
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    BCP is installed with the instance so it is on the server. Unless the client has BCP installed locally then it is not possible to run it locally.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    i am pretty sure bcp is a client tool. let me check.

    this came up in a discussion about the differences between BULK INSERT and bcp.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    I think you are asking if the user runs the bcp script on his workstation, specifying the UNC location as the location of the data files, will the data travel from the SQL Instance to the workstation then to the UNC location? If so, I believe it will. SQL Server has BULK INSERT, but I do not think they have done BULK EXPORT, yet.

  5. #5
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    yep. its a client tool. I have a box with no server installed and only the client tools and bcp.exe is on my hard drive.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hang on, hang on. How is this being submitted? Via SSMS or a local dos window?

    EDIT - ok - this is a sort of rewording of MCrowley's post.

    Didn't know it was installed as past of the client side I must confess.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    I would hate to think that the user has access to xp_cmdshell on the server. Heck, I am leaving the restrictions on in my servers even for me!

  8. #8
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hmm. Yeah. We do 10s of BCPs in and out daily - multi million rows. As such, and now you say that, I think I have got to think that this is the norm. With the setup we have (no "users" actually get close to the database, no clients) we do all our bcp via xp_cmdshell wihtout even a second thought.

    My fault - I made some assumptions and then compounded it with some ignorance.

    I think there is a new sig in there somewhere....
    Testimonial:
    pootle flump
    ur codings are working excelent.

  9. #9
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    That's what I thought

    I couldn't live with out xp_cmdshell
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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