The bcp utility fails to export the data:

Scenario

SQL Server 2000 bcp utility fails to export data with the below error message:

Operating-system error:

There is no OS level error

DB_LIBRARY error:

Specified server name attribute could not be found

Cause

You have a Sybase installation on the server which includes bcp.exe utility. The ‘Path’ environment variable contains the tools\binn path for both Sybase and SQL Server and the binn path of Sybase lies in front of the path of SQL Server. This ended up calling the bcp.exe of Sybase instead of SQL Server

Resolution:

Check the Path under the Environment variable

1. Edit the 'Path' under the Environment variable by putting the SQL Server 2000 tools\binn path ahead of Sybase.

or

2. A better option would to use the absolute path when invoking the SQL Server 2000 bcp.exe.

Note:

The customer must be aware that if we implement the first option this can cause the Sybase bcp.exe to fail as it did for SQL.

Regards,

Gurlen Singh Sodhi

SE,SQL Support

Rakesh Singh & Mukesh Nanda

TL,SQL support