SSIS bcp command unable to open bcp host data file

  • I have a developer that created and SSIS package that uses bcp. the bcp command is on a process task the working directory is the tools\binn for sql server (2012). the executable is bcp and the arguments are out "business" -c -t~ -T -SXXXX

    There are expressions used in the command @[User::TableName] + " out " + "\"" + @[User::ExtractFile] + "\"" + @[User::ProgramArguments] + @[User::DatabaseServerName and it is all in a loop to output various tables

     

    Foreach Loop Container holds the tasks to generate each extract file per type of data

    If I take the output that the log says it is executing and execute the bcp command from the command prompt I do not get the error. I am logged in as the same person both when running the command line and when executing the SSIS package.

    Any ideas what I may be missing?

  • What error is being returned?

    Converting oxygen into carbon dioxide, since 1955.
  • What is the exact text of the error message?

    Is this something which used to work and has suddenly stopped, or has it never worked?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Error =  [Microsoft][Sql Server Native Client 11.0]Unable to open BCP host data-file

     

    I am able to run the same command from the command prompt without error

  • As you are using an expression to define the Execute Process command, I would suggest that you put a debug breakpoint on the EP task and then check the run-time value of your expression to verify that it exactly matches what you are running from the command prompt.

    I have had problems with the EP task in the past, where file paths contained one or more spaces, so keep an eye out for that.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 5 posts - 1 through 4 (of 4 total)

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