Anyways I run bcp with my queryout string which is
bcp "SELECT * FROM edrdata.dbo.tblcomments WHERE siteid=-1" queryout "C:\DKD\" -c -U <username> -P <password> -S WELLDAQ\DBINFO
but I get an ODBC connection error, see below :
SQLState = 08001, NativeError = 17
Error = [Microsoft][ODBC SQL Server Driver][Shared Memory] SQL Server does not exist or access denied.
SQLState = 01000, NativeError = 2
Warning = [Microsoft][ODBC SQL Server Driver][Shared memory]ConnectionOpen (Connect()).
oh and SQL Server Service Manager shows the Server as WELLDAQ\DBINFO and it is running and I can connect to it through other means such as my visual basic applications I'm coding and through Visual Studio 2005 (remotely) so why can't bcp connect to it?
pls check your your surface area configuration if
|||1. the server is running in mixed mode
2. the server is configured to accept both local and remote connection
Make sure there are no spaces between the -U and the username. Same for -P and -S
Also, specify a filename as well as the directory path and put the -S parameter before the -U and -P
Hope this helps.
没有评论:
发表评论