RE: SQLOLEDB always uses Named Pipes



Thanks for the information Charles.

I'll be using the tcp: prefix and removing network library from my
connectionstrings.

Cheers

Doug

"Charles Wang[MSFT]" wrote:

Hi Doug,
Please refer to the following answers.

Is prefixing the server with tcp: the preferred means to request a tcp/ip
connection? Or should we be specifying a network library?
Yes, if a client use tcp:<servername\instancename> to connect to your SQL
Server instance. It means that it uses TCP/IP protocol to connect to the
server. The network library is DBNETLIB.

Also there's no mention of connection caching - how do you find out this
information?
I did not find any document talking about this issue. It is my guess.
I also guess that the cache may be the value in the registry key:
HKLM\SOFTWARE\Microsoft\MSSQLServer\Client\SuperSocketNetLib\LastConnect
Since SQL Native Client has been installed on my computer, I could not
perform simple test by using DBNETLIB; but you may test on your computer by
running "osql /Stcp:<servername\instancename> /E". After you run the
command, you should find that the value of <servername\instancename> in the
registry key should be changed to something like '0:tcp:Charles-03,1433';
then if you connect the server again without specifying tcp: prefix, check
if the registry value would change. If it is still something like
'0:tcp:Charles-03,1433' , it should be the "Cache". Of course, you can
verify that by using named pipes connections.

This article
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315159
recommends setting the network library to dbmssocn - what happens if that
dll
is not there as it's not shipped with later versions of MDAC? As I
understood it had been replaced with dbnetlib. Will this still be a valid
connection string?

If MDAC was installed on your computer, the DLL should be in the directory
%WINDIR%\system32. If it does not exist on your computer, the usage of
dbmssocn does not work. Actually SQL Server allows you to use the following
network libraries when establishing a connection. They are:
• dbnmpntw - Win32 Named Pipes
• dbmssocn - Win32 Winsock TCP/IP
• dbmsspxn - Win32 SPX/IPX
• dbmsvinn - Win32 Banyan Vines
• dbmsrpcn - Win32 Multi-Protocol (Windows RPC)
You can refer to:
How To Set the SQL Server Network Library in an ADO Connection String
http://support.microsoft.com/kb/238949

Yes, it is still a valid connection string; but I believe that the KB
article that you mentioned is just providing one way to use TCP/IP protocol
by specifying one specific network library, since by default DBNETLIB will
be prior used.

Hope this helps. If you have any other questions or concerns, please feel
free to let me know.
Have a good day!

Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications

If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.


Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================












.



Relevant Pages

  • Re: upgrading exchange 5.5 to 2003
    ... Microsoft Exchange Support ... > connection to the server. ... On the Connection menu, click Connect. ... >> Microsoft Exchange Support ...
    (microsoft.public.exchange2000.setup.installation)
  • RE: PPTP VPN connection problems
    ... Since you want to contact your local MS support for help, ... Additional, you can establish the VPN connection from internal client, that ... | A ping to the server would result in "Request timed out". ...
    (microsoft.public.windows.server.sbs)
  • RE: Cant execute SSIS package with Dtexec on cluster node
    ... "Olap" will not acquire a connection because the package OfflineMode ... Package Properties in the SQL Server Business Intelligence Development ... a dedicated Support Professional can assist you in resolving the issue in a ... Can't execute SSIS package with Dtexec on cluster node ...
    (microsoft.public.sqlserver.dts)
  • Re: webreq.getresponse exceptions
    ... Also I'm told the server I'm contacting has no set limit on it's connections. ... Based on the code snippet you have provided, I didn't see the code that you're closing the underlying connection. ... The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: SQLOLEDB always uses Named Pipes
    ... Server instance. ... connection string? ... network libraries when establishing a connection. ... Microsoft Online Community Support ...
    (microsoft.public.data.oledb)