isql does not work properly

Posted on 2003-03-12
Medium Priority
Last Modified: 2008-02-01
I have Win2K machine with SQL Server 2000, SP2
I'm trying to execute isql from the command line, passing correct SQL Server instance name, account and password

I'm getting the following error:
CT-LIBRARY error: ct_connect(): directory service layer;internal directory service control layer;Requested server name not found

osql and isqlw work completely fine
Question by:dessi

Expert Comment

ID: 8122792
Try to ping the server. i.e.

C:\> Ping MyServer

If you have problems or the IP is not correct, try creating an alias in the Client Configuration Utility.

If the server is on your local machine, use localhost as a server name.

Other than that:

What is your command string (you can exclude the username and password)?


Author Comment

ID: 8122893
The server is on the local machine, The instance name is diferent than the machine name

The command line is


Accepted Solution

Frostbyte_Zero earned 1000 total points
ID: 8123076
According to SQL Server 2000 Documentation:

All DB-Library applications, such as isql, work as SQL Server 6.5–level clients when connected to SQL Server 2000. They do not support some SQL Server 2000 features. DB-Library and Embedded SQL for C do not support multiple instances. The osql utility is based on ODBC and does support all SQL Server 2000 features. Use osql instead.

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 8126516
Unless i'm much mistaken you've also got the sybase client or server installed on this machine. e.g. for the sybase odbc drivers. When you install sybase it puts its 'bin' at the start of the PATH so you are actually running the sybase isql! - which doesn't work with sql2000 hence you get this error.

2 ways to fix it, use the full path to isql.exe or, my preference, change the path to put the sybase directories at the end.

Expert Comment

ID: 9275950
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
LVL 12

Expert Comment

ID: 11093055
No comment has been added to this question in more than 257 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: Frostbyte_Zero http:#8123076

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question