BCP: how to determine success or failure

  • I have a script that BCP's a database's DTS packages to a flat file (in sql native format) and then imports the DTS packages to another server. How can I tell in the larger script file within which this runs if the BCP was successful or not? This will determine whether I go on further or rollback.

  • Is the controlling script a T-SQL script (running xp_cmdshell), a windows batch script, or something else?

    You can check for the "n rows copied." output from bcp.

    Cheers,

    - Mark


    Cheers,
    - Mark

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

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