• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1373
  • Last Modified:

MSDE cannot connect via telnet 1433 - query analyser works fine

Hi

MSDE installation with Entprise Manager and Query analyser from Eval copy.

DBs can be seen and edited on localhost.   Default port 1433 being used.  Query analyser works fine.

However asp application on host needs DSN-less access to SQL server via port.

I cannot even telnet into 1433 and see a response.

Yet there is no firewall and I know service is running?

Do you need to enable it somehow?  Maybe something odd with MSDE.

Any ideas?

Bendecko
0
bendecko
Asked:
bendecko
  • 2
  • 2
  • 2
  • +2
4 Solutions
 
arbertCommented:
What do you get when you telnet--you don't normally get a response--you can type a few keystrokes and then you're taken back to a dos prompt....

Is the host on the same network--is it the host that you tried query analyzer from?  Is the asp application connecting using the same user/password you connected with from Query Analyzer?

0
 
davee_jayCommented:
I imagine that due to the Dynamic Port allocation (a new 'feature' in SQL 2K) MSDE is not bound to the 1433 port.

You can check the version of the client libraries on the webserver as follows (W2K Prof - Your O/S may differ slightly):

Start -> Settings -> Control Panel -> Administrative Tools -> Data Sources (ODBC) -> Add

- Select the SQL Server Driver (Can you post the complete version number for our reference as well pls.) - Click Next

- Enter name, desc and Server - Click Next

- Client Configuration -> TCP/IP
  - Server name should be the name you entered
  - There should be a checkbox - Dynamically determine port - this should be checked - Click OK

- Click Next and Next again Then Finish

- Test Datasource

N.B. If there is no checkbox as noted above then install the SQL 2K client connectivity libraries on the webserver (not EM or QA though!)

Let me know how you get on.

DJ
0
 
Julian HansenCommented:
Telnet won't return anything.

When you say Query Analyser works fine do you mean it works fine when you type in an IP address as opposed to the server name.

Does the script work when you use a server name instead of an IP?

When you use Query analyser - is it from the same machine as the asp script is running on?
0
Independent Software Vendors: 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!

 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>>I cannot even telnet into 1433 and see a response.
if you run telnet IP_ADDRESS:1433 and do not get a response AND NO ERROR, this is fine, because this means that the port is open.
if you get an error, then there is a firewall or the line is not available.
to explain: MSDE SQL Service actually get's the telnet connection, but doesn't answer to it. Thus TELNET client get's no response, but no error neither, as it actually waits from the TELNET server (which MSDE is not) to return/request some data. That's the way async communication works...

As described above:
* Check if the MSDE indeed uses port 1433
* Check the client configuration of the ASP host is configured correctly
* check also that the ASP has the permissions on the SQL Server to connect!!!

CHeers
0
 
bendeckoAuthor Commented:
Thanks for all these great responses.

All the action is on one machine.  Website, MSDE, Query analyser all.....  No network or firewall or anything to worry about.

I know for a fact that if i telnet into my other machine (where all is working) I don't get refused entry on 1433 - this tells me that SQL is running fine.    I appreciate I get no response c.f. a mailserver response.

How can I determine which port SQL is running on if its dyanmic? Can I bind it manually.  What about a commandline command to see the binding services and ports?

I must have the connectivity libraries installed as EM and QA work - on the *same* machine.   No?

This is the ASP code that connects to the DB:

conn.Open "DRIVER=SQL Server;SERVER="&sysServer&";CATALOG="&sysCatalog&";UID="&sysUsername&";PWD="&sysPassword

No port is specficed in this string.  Does it need one?

Its worked hundreds of time on SQL servers running the full version of SQL Server 2000.  This is the first time I'm playing with MSDE and it doesn't appear to be playing the game the same way.

Thank you for your continued assistance.

Bendecko
0
 
Julian HansenCommented:
Goto your registry

check the following key

HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer\Client\ConnectTo

Under this Key either change the DSQUERY key to DBMSSOCN

Or create a server entry for your server

Create a new REG_SZ value with your server name as the value
Enter the following data for this value

DBMSSOCN,YOUR_SERVER_NAME

Try again

If this fails then try the following

Create a new ODBC connection to your database. On the second screen click the client confiruation button and change the connection type to TCP/IP. Proceed through the setup and at the end test the conection by pressing the test connection button - tell us what happens.
0
 
davee_jayCommented:
Ah, okay the issue is clearer now.  You are right you must have the client libraries installed.

Please take a look at the SQL Server Network Utility and look at the enabled protocols.  I imagine TCP/IP is not in the list.  If this is the case, then it needs to be.  You can specify the default port here.

Let me know how you get on.

Also, can you post the driver version information (can be found as per my instructions above)

DJ
0
 
arbertCommented:
Agree--since QA is on the same machine you can probably connect fine.  Like davee_jay said above, did you enable protocols when you installed MSDE?
0
 
bendeckoAuthor Commented:
Yeah good work.

The protocol were enabled, yes.     Security all etc, all OK.

I read on another board to set the port to 0!  This turned out to be a disaster cos EM couldn't then see the DB at all.  This was supposed to let the server choose its own port.  Which, thinking about it, it did because...

I rebooted and it fixed itself and ent manager was able to connect.  I checked the port then in Client utility and it was 3144.   I changed this to 1433 and restarted the services and now we all cool.   Telnet in and ASP can access the DB.

I suspect that an additional reboot ealier would have actually had the same effect.

However EXCELLENT help and very quick responses.  Thank you.  I can now get back to serious business of coding the thing.

Thanks

Bendecko

0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 2
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now