Strange connection problem (TCP/IP vs. Named Pipes)

Strange connection problem (TCP/IP vs. Named Pipes)

Post by Bradley Ple » Tue, 22 Feb 2000 04:00:00



We are experiencing a strange connection problem.  We are using VB
with ADO to make our connections to SQL Server.  We are not specifying
the "network library", so I assume it is defaulting to using "named
pipes".  Occasionally after rebooting, the client cannot connect to
the SQL Server.  What we do in such a circumstance is temporarily
create an ODBC DSN, point it to the server in question, select
"TCP/IP" as the network library, and hit "Test Data Source".  We don't
keep or use the DSN, but it's as if we have to "punch through" the
connection the first time.  This seems to resolve the problem, and
from then on the application connects just fine using named pipes (at
least until the next reboot).

Has anyone else had this experience?  Is this a known problem?  Is
there a workaround?  Should I just modify the application to use
TCP/IP?

Any input would be appreciated.

Thanks!
Brad.

 
 
 

Strange connection problem (TCP/IP vs. Named Pipes)

Post by Neil Pik » Wed, 23 Feb 2000 04:00:00


Bradley - sounds like NT authentication.  Any errors in the target SQL/NT
errorlogs?  I think you'll need to do a network trace of the failure to see
what is going on.

Quote:> We are experiencing a strange connection problem.  We are using VB
> with ADO to make our connections to SQL Server.  We are not specifying
> the "network library", so I assume it is defaulting to using "named
> pipes".  Occasionally after rebooting, the client cannot connect to
> the SQL Server.  What we do in such a circumstance is temporarily
> create an ODBC DSN, point it to the server in question, select
> "TCP/IP" as the network library, and hit "Test Data Source".  We don't
> keep or use the DSN, but it's as if we have to "punch through" the
> connection the first time.  This seems to resolve the problem, and
> from then on the application connects just fine using named pipes (at
> least until the next reboot).

> Has anyone else had this experience?  Is this a known problem?  Is
> there a workaround?  Should I just modify the application to use
> TCP/IP?

> Any input would be appreciated.

> Thanks!
> Brad.

 Neil Pike MVP/MCSE.  Protech Computing Ltd
 (Please reply only to newsgroups)
 SQL FAQ (412 entries) see

http://forumsb.compuserve.com/vlforums/UK/default.asp?SRV=MSDevApps
 or www.ntfaq.com/sql.html (+ ntfaq download)
 or http://www.sql-server.co.uk

 
 
 

Strange connection problem (TCP/IP vs. Named Pipes)

Post by Tibor Karasz » Wed, 23 Feb 2000 04:00:00


Brad,

In addition to Neil's post:
Named Pipes need to be authenticated through NT's IPC$ before SQL Server
even knows about the attempt. When you do TCP/IP, SQL Server will be
notified and then calls NT (for NT authentication). This might explain why
the following NP attempts are successful (the IP stuff gave the client an
IPC$ authentication.... _somehow_...).

This sometimes happens over DUN, and if you come from some other domain (as
I recall it), especially over W9x. One way to handle it is to use a mapped
drive (which then ensures you that NT has performed some kind of
authentication first).

Above doesn't really offer any solution to your problem, but it might make
it more understandable :-).
--
Tibor Karaszi
MCDBA, MCSE, MCSD, MCT, SQL Server MVP
Cornerstone Sweden AB
Please reply to the newsgroup only, not by email.


Quote:> We are experiencing a strange connection problem.  We are using VB
> with ADO to make our connections to SQL Server.  We are not specifying
> the "network library", so I assume it is defaulting to using "named
> pipes".  Occasionally after rebooting, the client cannot connect to
> the SQL Server.  What we do in such a circumstance is temporarily
> create an ODBC DSN, point it to the server in question, select
> "TCP/IP" as the network library, and hit "Test Data Source".  We don't
> keep or use the DSN, but it's as if we have to "punch through" the
> connection the first time.  This seems to resolve the problem, and
> from then on the application connects just fine using named pipes (at
> least until the next reboot).

> Has anyone else had this experience?  Is this a known problem?  Is
> there a workaround?  Should I just modify the application to use
> TCP/IP?

> Any input would be appreciated.

> Thanks!
> Brad.

 
 
 

1. Name PIPE vs. TCP/IP connection

Hi,

I have a very strange issue. Sometimes the name pipe works
but sometime tcp/ip works. It is randemly occured. as soon
as connection failed, I switch to name pipe from tcp/ip or
to tcp/ip from name pipe. In coomand window, I can ping
both sql server name and the ip address. Anyone help ?

2. Caclulated cells

3. Named Pipes vs TCP/IP

4. CASE Statement usage

5. <<<PICK PROGRAMMERS WANTED>>>

6. Name Pipe vs TCP/IP

7. vb webbrowser control,how to know it is complete loading

8. Named Pipes vs TCP/IP (setting automatically during app install or within app)

9. Named Pipes vs. TCP/IP

10. TCP IP vs Named Pipes