August 14, 2005 at 8:58 am
Hi,
I am having trouble with BCP.I am using following syntax for inserting rows from text file to one of the table say Yin x data base with filed terminator $ and row terminator tab.
bcp X.dbo.Y" in c:\temp\test.txt -c
-q -t "$" -r "" -T -S [servername\instancename] -U test -p test
I am getting following error
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist o
r access denied.
SQLState = 01000, NativeError = 2
Warning = [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()
).
could you please anybody let me know what is the problem here.Is I don't have acess to the server.Any help is appreciated.
Thanks,
Sree
Thanks,
SR
August 14, 2005 at 9:03 am
Try a capital -P for the password argument.
August 14, 2005 at 5:41 pm
Thanks for your response david.
I typed capital but that doen't make any difference.
getting same error.
Thanks,
Sree
Thanks,
SR
August 15, 2005 at 6:24 am
Hi,
try this with no use name and password.
bcp X.dbo.Y" in c:\temp\test.txt -c
-q -t "$" -r -"" -T -S [servername\instancename] -U -P
this may help u
from
killer
August 15, 2005 at 7:12 am
You either use trusted connection -T or SQL server login (-U and -P). So try either
bcp X.dbo.Y in c:\temp\test.txt -c -q -t "$" -r "" -T -S [servername\instancename]
or
bcp X.dbo.Y in c:\temp\test.txt -c -q -t "$" -r "" -S [servername\instancename] -U"test" -P"test"
For trusted connection, make sure the windows account you are using can access the SQL server.
August 15, 2005 at 9:39 am
Try removing the square brackets [] from the server/instance, these have a different meaning/usage in a DOS command shell than what SQL Server uses them for.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply