bcp inside a transaction (issue)

  • Hello,

    I have a problem:

    I use some bcp into transaction inside a procedure,

    running the procedure the bcp remains open and the procedure stucks and does not complete.

    How to solve it

  • Hi,

    BCP is a seperate standalone utiltiy that needs to be executed from command prompt. You can't run it directly from Query Analyser or SSMS, if you want to execute it from QA or SSMS you can use xp_cmdshell proc as below.

    Exec master..xp_cmdshell 'bcp your parameter'

  • Try using the "BULK INSERT" statement instead, which does support transaction. Be sure the login has the server level role bulkadmin.

    SQL = Scarcely Qualifies as a Language

  • I used several time bcp so I know that it must be run in cmd shell with xp_cmdshell,

    I tried also Bulk insert it runs on 32 bit but has problem with 64 bit.

    So I have to use bcp, let me know

    Thank

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

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