Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bulkcopy

Status
Not open for further replies.

tuzojazz

Programmer
Dec 26, 2005
58
MX
Hi guys:

I'm using SQL Server 2000

I'm trying to execute bcp in a DOS window with different syntax

bcp MyBase..dbo.MyTable out c:\Bulktest\test.txt -c -Uuser1 -Ppass1 -SMyServer

bcp MyBase..MyTable out "c:\Bulktest\test.txt" -c -Uuser1 -Ppass1 -SMyServer

bcp MyBase..MyTable out c:\Bulktest\test.txt -c -Uuser1 -Ppass1 -SMyServer


In all of the cases I get the same error :

CTLIB Message: - L6/O8/S5/N3/5/0:
ct_connect(): directory service layer: internal directory control layer error: R
equested server name not found.
Establishing connection failed.



If I ping MyServer it works

so

What is the correct syntax?

Thanks!
 
MyBase..dbo.MyTable

Is MyBase a linked server or is it the name of your database? I suspect it's the name of your database. If so, remove one of the 2 dots between MyBase and dbo.

[tt][blue]MyBase.dbo.MyTable[/blue][/tt]

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Thanks

Yes, MyBase is the name of my database.

I also tried

MyBase.dbo.MyTable

but it does not work, I get the same error.

when I want to try with my own computer using trusted connection (typing -T) it asks me for a password
 
From my limited googling.... I need to ask... Are you using a Sybase database? That error message appears to be sybase related.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
BCP is a utility. As such, it exists on your computer somewhere as bcp.exe

Can you find this file (search for it). Then, right click and tell me the version of the file that you are running.


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Try

bcp "MyBase.dbo.MyTable" out "c:\Bulktest\test.txt" -c -U"user1" -P"pass1" -SMyServer

And make sure the Directory c:\Bulktest exists on the server you are trying to run this on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top