Results 1 to 6 of 6

Thread: MSSQL 2000 bcp

  1. #1
    Join Date
    Oct 2007
    Location
    Manila
    Posts
    2

    MSSQL 2000 bcp

    helo guys,
    can someone send me the script/procedure in performing bcp on ms sql 2000? pls help me, i badly need it.. thank u so much!

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    You can find sample code in books online.

  3. #3
    Join Date
    Dec 2004
    Posts
    502
    bcp YourDatabase..YourTargetTable in c:\YourDataFilePath -c -T -SYourServerName

    bcp YourDatabase..YourSourceTable out c:\YourOutputFilePath -c -T -SYourServerName

    These are just basic examples for importing/exporting a basic tab-delimited text file. Like rmaio said, look into Books Online for further explanation, or type bcp -? from the command line.

  4. #4
    Join Date
    Oct 2007
    Location
    Manila
    Posts
    2

    Smile Bcp Mssql

    What if I have another instance eg. Server\instance_name? because the reply was "ct_connect(): directory service layer: internal directory control layer error: Requested server name not found."

    What is the script for this?
    thanks

  5. #5
    Join Date
    Sep 2002
    Posts
    5,938
    You specify sql instance with -S option like -S Server\instance_name.

  6. #6
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    you could also use Ip address, port number if you know the port number of your named instance..

    bcp "Select top 10 * from sys.sysobjects" queryout c:\a123.txt -c -Stcp:1.1.1.2,7001 -T

Posting Permissions

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