Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Unanswered: bcp hanging in SQL2000

    I am attempting a very simple bcp out to a text file in SQL 2000 for the first time. I've tried various syntax but the command consistently hangs no matter which i use. Nothing is being directed to the output log............

    "bcp rfsspd..bcp_product_view out product.out -T -c -b500 -r>>test.log"

    I have no problems with this command in SQL 6.5, could it be initial setup or config of 2000 or something really daft????

    Any help greatly appreciated

  2. #2
    Join Date
    Jan 2004
    Posts
    53
    Make sure your SQL server can find bcp.exe

    C:\Program Files\Microsoft SQL Server\80\Tools\Binn\


    Try using this command, see if it makes a difference

    DECLARE @command VARCHAR(255)

    SELECT @command = 'bcp dbName.dbo.tableName in c:\yourFolderName\.....\yourTextFile.txt -n -UyourUserName -PyourPassword -fc:\yourFolderName\........\yourFormatFile.fmt -ec:\yourFolderName\......\yourErrorFile.err'

    EXEC spCmdShell @command

    This uses a format file - which you'll have to creat and replace the in with out

Posting Permissions

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