Results 1 to 5 of 5

Thread: SQL SERVER BCP Output File Problem

  1. #1
    Join Date
    Jan 2005
    Location
    Maryland,USA
    Posts
    3

    SQL SERVER BCP Output File Problem

    I am running the following BCP process in all SQL Servers at my client place.
    BCP "SELECT * from Northwind..Customers" queryout C:\Test.txt -c -U XX -P XXX -S XXX

    Everywhere it is putting records in the text file except one server. In that server it is always putting 0 records in the text file.It is not giving any error message.If i run the same query in the sql query analyser , it is returning the rows.

    The server has SQL Server Developer Edition with SP3. (Product version: 8.00.760(SP3) under Operating System Windows NT 5.0(2195).

    Could you please let me know why it is not putting records in the output file? Do I need to change any setup in the server or we have to add any more condition in the BCP.

    Thanks a lot.
    Last edited by premtg; 01-12-2005 at 10:08 AM.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Can you run the query in query analyzer and see if it returns anything?

    Many DBAs drop sample databases from their production server, you may have run into this.

  3. #3
    Join Date
    Jan 2005
    Location
    Maryland,USA
    Posts
    3
    It is returning rows in the query analyser. And i run the BCP in command prompt also, still i am getting same errors.
    Could you pls suggest me how to solve this problem.

    Thanks.

  4. #4
    Join Date
    Dec 2004
    Posts
    502
    Perhaps it is a connection or permissions problem. Can you BCP into a table? And is the BCP creating an empty text file, or no text file at all?

  5. #5
    Join Date
    Jan 2005
    Location
    Maryland,USA
    Posts
    3
    It is creating empty text file. it is not giving any errors.

Posting Permissions

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