Using 'bcp' sql server connection failed, Unable to invoke odbc.ini dns

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?

Replay

Category: sql server Time: 2016-07-29 Views: 6

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.107 (s). 12 q(s)