I'm new to MS SQL server, doing tryouts to connect to MS-SQL Server through Linux system. For this I had installed odbc driver & configured odbc.ini.
By using sqlcmd, I'm able to connect to SQL server. Following command used:
sqlcmd -D -U$DBUSER -P$DBPASSWD -S$SERVER
But I'm trying to use bcp for bulk copy which did not work. Command:
bcp $DBNAME.dbo.$TABLE1 out $FILE1 -c -m 100 -e $TABLE1.out.bcperr -U$DBUSER -P$DBPASSWD -S$SERVER
But this command gives error
CTLIB Message: - L6/O8/S5/N3/5/0: ct_connect(): directory service layer: internal directory control layer error: Requested server name not found
I had tried to add
-D option to bcp but it gives error, invalid option -D. How I can use bcp so that, it will work same as sqlcmd?