Home Forums SQL Server 7,2000 T-SQL BCP error -Unable to open BCP host data-file RE: BCP error -Unable to open BCP host data-file

  • bcp T1 out D:\Archive -S <Server_Name> -U <username> -P <pwd> -b 10000 -c -t |;

    .. is this the actual commandline? It looks a bit fishy in two places.

    Unless you want your file to be named 'Archive', you haven't supplied a filename, only the directory 'D:\Archive'

    ..is the delimiter a pipe + semicolon?

    In any case, a pipe on a commandline acts as a redirection operator, so try enlosing it in quotes.

    bcp T1 out D:\Archive -S <Server_Name> -U <username> -P <pwd> -b 10000 -c -t "|;"

    (if the semicolon is just some sort of 'statement-end', just remove it-)

    /Kenneth