显示标签为“named”的博文。显示所有博文
显示标签为“named”的博文。显示所有博文

2012年2月25日星期六

Disabling Named Pipes

In the process of doing some routine monitoring/clean-up we've
discovered that several (many?) users are apparently set to access our
SQL Server 2000 database instances via the Named Pipes protocol. In
readings and recommendations we've decided that our WAN would be best
served if we use the less "chatty" TCP/IP.

As such we've also decided to try to enforce this decision to use
TCP/IP exclusively using the domain login script used by all of our
end-users.

Question: does anyone know what registry entries are created/used to
indicate that TCP/IP is enabled and is the default protocol for SQL
Server 2000? Our environment is: XP Pro SP2 and SQL Server 2000
(typically SP3).

TIA
Glenn - newbie DBA(glenn.owens@.gmail.com) writes:
> In the process of doing some routine monitoring/clean-up we've
> discovered that several (many?) users are apparently set to access our
> SQL Server 2000 database instances via the Named Pipes protocol. In
> readings and recommendations we've decided that our WAN would be best
> served if we use the less "chatty" TCP/IP.
> As such we've also decided to try to enforce this decision to use
> TCP/IP exclusively using the domain login script used by all of our
> end-users.
> Question: does anyone know what registry entries are created/used to
> indicate that TCP/IP is enabled and is the default protocol for SQL
> Server 2000? Our environment is: XP Pro SP2 and SQL Server 2000
> (typically SP3).

The brutal variant would be to open the Server Network Utility on
the server box, and disable Named Pipes (server restart needed, as I
recall.)

On the clients it could be a good thing to use the Client Network
Utility to disable Named Pipes, or put it lower in priority than
TCP/IP.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland, I appreciate the input but we're not looking at wiping out the
use of named pipes all-together (there may be background processes and
legacy applications which use/require the protocol). We're hoping only
to disable Named Pipes for End-Users who login via the default domain.
So, the question still stands...

Question: does anyone know what registry entries are created/used to
indicate that TCP/IP is enabled and is the default protocol for SQL
Server 2000? Our environment is: XP Pro SP2 and SQL Server 2000
(typically SP3).

Erland Sommarskog wrote:
> (glenn.owens@.gmail.com) writes:
> > In the process of doing some routine monitoring/clean-up we've
> > discovered that several (many?) users are apparently set to access
our
> > SQL Server 2000 database instances via the Named Pipes protocol. In
> > readings and recommendations we've decided that our WAN would be
best
> > served if we use the less "chatty" TCP/IP.
> > As such we've also decided to try to enforce this decision to use
> > TCP/IP exclusively using the domain login script used by all of our
> > end-users.
> > Question: does anyone know what registry entries are created/used
to
> > indicate that TCP/IP is enabled and is the default protocol for SQL
> > Server 2000? Our environment is: XP Pro SP2 and SQL Server 2000
> > (typically SP3).
> The brutal variant would be to open the Server Network Utility on
> the server box, and disable Named Pipes (server restart needed, as I
> recall.)
> On the clients it could be a good thing to use the Client Network
> Utility to disable Named Pipes, or put it lower in priority than
> TCP/IP.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||(gowens@.nixonpeabody.com) writes:
> Erland, I appreciate the input but we're not looking at wiping out the
> use of named pipes all-together (there may be background processes and
> legacy applications which use/require the protocol). We're hoping only
> to disable Named Pipes for End-Users who login via the default domain.
> So, the question still stands...
> Question: does anyone know what registry entries are created/used to
> indicate that TCP/IP is enabled and is the default protocol for SQL
> Server 2000? Our environment is: XP Pro SP2 and SQL Server 2000
> (typically SP3).

I'm still not sure what you are asking for. Your question make it
seem like you want to do this on the server level, but this appears
to be impossible, since you want to keep Named Pipes for some clients.

Thus, your only option is to change this at the clients. The supported
way to do this, is to use the Client Network Utility.

If you want to hack the registry yourself, it appeats that the relevant
values and keys are under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Client\SuperSocketNetLib
The value Protocol Order appears to be the priority order, and should
thus have "tcp" in the beginning. Under the subkey Tcp, there should
be a REG_DWORD value DefaulPort with the value of 0x00000599 (1433.)

I recommend you to play around from the Client Network Utility a little
more, before you start any remote registry hacking or whatever you are
planning to do.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland, what I'm suggesting is that we do NOT do this at the server
level but rather on a per user basis using our standard login script.

We have several hundred end-users in geographically different
locations. Virtually none of the users have access to, or have
knowledge of, the SQL Client Utility. So, the idea is that when they
logon to their PCs a scriptlet will be run which will disable Named
Pipes and/or insure that TCP/IP is the default protocol.

I was hoping that someone could suggest/provide such a script or
specify the WIN XP registry key/values that define the protocol, etc.

I hope that this clears thing up.

Thanks

Erland Sommarskog wrote:
> (gowens@.nixonpeabody.com) writes:
> > Erland, I appreciate the input but we're not looking at wiping out
the
> > use of named pipes all-together (there may be background processes
and
> > legacy applications which use/require the protocol). We're hoping
only
> > to disable Named Pipes for End-Users who login via the default
domain.
> > So, the question still stands...
> > Question: does anyone know what registry entries are created/used
to
> > indicate that TCP/IP is enabled and is the default protocol for SQL
> > Server 2000? Our environment is: XP Pro SP2 and SQL Server 2000
> > (typically SP3).
> I'm still not sure what you are asking for. Your question make it
> seem like you want to do this on the server level, but this appears
> to be impossible, since you want to keep Named Pipes for some
clients.
> Thus, your only option is to change this at the clients. The
supported
> way to do this, is to use the Client Network Utility.
> If you want to hack the registry yourself, it appeats that the
relevant
> values and keys are under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Client\SuperSocketNetLib
> The value Protocol Order appears to be the priority order, and should
> thus have "tcp" in the beginning. Under the subkey Tcp, there should
> be a REG_DWORD value DefaulPort with the value of 0x00000599 (1433.)
> I recommend you to play around from the Client Network Utility a
little
> more, before you start any remote registry hacking or whatever you
are
> planning to do.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||(gowens@.nixonpeabody.com) writes:
> I was hoping that someone could suggest/provide such a script or
> specify the WIN XP registry key/values that define the protocol, etc.

My post contained some hints in this direction, and my hope was that
you could work from this suggestion. If you want something ready of
the shelf, I'm afraid that I don't have any thing in store.

A quick search lead me to:
http://msdn.microsoft.com/library/d...dbnetlib_22.asp

There you find some more information about the registrty entries.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

2012年2月24日星期五

DISABLENETWORKPROTOCOLS and named instance

Is it true that I need to enable network protocols to communicate with a
named instance of MSDE SP4 locally?
Installing a named instance with DISABLENETWORKPROTOCOLS=0 seems to prevent
osql connecting to it. I don't want remote access - only local access (so
it would be nice not to load the network protocols). Or have I missed
something?
hi Graham,
Graham Morris wrote:
> Is it true that I need to enable network protocols to communicate
> with a named instance of MSDE SP4 locally?
> Installing a named instance with DISABLENETWORKPROTOCOLS=0 seems to
> prevent osql connecting to it. I don't want remote access - only
> local access (so it would be nice not to load the network protocols).
> Or have I missed something?
you do not need to enable network protocols to connect to local named
instances as all local instances are available to reach via shared memory..
what kind of problem are you experiencing? what is the exception you are
reported with?
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||I start with a Windows XP SP2 system in a workgroup, with nothing installed
except Tweakui (I use VirtualPC to start with the same system each time).
I log in with local administrator privileges.
I make sure all the latest updates are installed from Windows Update.
I navigate to the MSDE SP4 directory and enter 'Setup INSTANCENAME=MYINST
BLANKSAPWD=1'
I reboot so that service MSSQL$MYINST autostarts.
On reboot the service manager shows an empty circle (no 'play' nor 'stop'
symbol). The dropdown does not show my server and instance.
I open a command prompt and enter "osql -S .\MYINST -E" and I get:
[DBNETLIB]SQL Server does not exist or access denied.
[DBNETLIB]ConnectionOpen (Connect()).
I now run C:\Program Files\Microsoft SQL Server\80\Tools\Binn\Svrnetcn.exe,
and add 'Named Pipes'.
The osql command now correctly displays the 1> prompt.
I restart the service manager and it know shows the state of the service.
I find that if I install a blank instance I don't need to and network
libraries. What could be happening?
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:3ovjn4F7r0d5U1@.individual.net...
> hi Graham,
> Graham Morris wrote:
> you do not need to enable network protocols to connect to local named
> instances as all local instances are available to reach via shared
> memory..
> what kind of problem are you experiencing? what is the exception you are
> reported with?
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||hi,
Graham Morris wrote:
> I start with a Windows XP SP2 system in a workgroup, with nothing
> installed except Tweakui (I use VirtualPC to start with the same
> system each time).
> I log in with local administrator privileges.
> I make sure all the latest updates are installed from Windows Update.
> I navigate to the MSDE SP4 directory and enter 'Setup
> INSTANCENAME=MYINST BLANKSAPWD=1'
> I reboot so that service MSSQL$MYINST autostarts.
> On reboot the service manager shows an empty circle (no 'play' nor
> 'stop' symbol). The dropdown does not show my server and instance.
disabling network protocols can cause this as the SQL Server Service Manager
can fail to enlist instances of the like, as reported in
http://support.microsoft.com/default...b;EN-US;814132

> I open a command prompt and enter "osql -S .\MYINST -E" and I get:
> [DBNETLIB]SQL Server does not exist or access denied.
> [DBNETLIB]ConnectionOpen (Connect()).
> I now run C:\Program Files\Microsoft SQL
> Server\80\Tools\Binn\Svrnetcn.exe, and add 'Named Pipes'.
> The osql command now correctly displays the 1> prompt.
> I restart the service manager and it know shows the state of the
> service.
> I find that if I install a blank instance I don't need to and network
> libraries. What could be happening?
the reported exception, as indicated in
http://support.microsoft.com/default...6&Product=sql,
is a general MDAC related problem, probably caused by
http://support.microsoft.com/kb/328383/en-us
I'll try installing a virtual machine may self ...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||hi,
Andrea Montanari wrote:
> hi,
> Graham Morris wrote:
>

> I'll try installing a virtual machine may self ...
just tried... with the same scenario you reported... after installation +
reboot I logged in as local WinXP admin, the SQL Server Service Manager is
"empty", but I can log in via osql with no problem at all...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||I think I've solved this: without network protocols the osql -S parameter
doesn't like the syntax ".\MYINST". Put in the full host name (e. g.
MYHOST\MYINST) and it works!
While you're listening though: this is part of a larger problem: I can't
connect to MSDE SP4 on some domain machines (same problem with osql) until I
remove then replace the network libraries with svrnetcn.exe. This sounds as
though it might be a group policy problem, but I've no idea what. Ring any
bells?
Anyway thanks for the help on the first problem.
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:3p0d08F7tp8aU1@.individual.net...
> hi,
> Andrea Montanari wrote:
>
> just tried... with the same scenario you reported... after installation +
> reboot I logged in as local WinXP admin, the SQL Server Service Manager is
> "empty", but I can log in via osql with no problem at all...
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
|||hi Graham
Graham Morris wrote:
> While you're listening though: this is part of a larger problem: I
> can't connect to MSDE SP4 on some domain machines (same problem with
> osql) until I remove then replace the network libraries with
> svrnetcn.exe. This sounds as though it might be a group policy
> problem, but I've no idea what. Ring any bells?
actually not... never heard of such a constraint.. you can have "problems"
connecting if you are not listed in the granted logins list, or if you have
network troubles, but as long as MDAC stack is quiet consistent on remote
clients I never heard of such a problem... I'll keep investigating
thought...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

2012年2月17日星期五

Disable named pipes on W2k/SQL2k cluster?

I have a cluster running on Windows 2000 with SQL 2000. In SQL Server Network Utility I can highlight named pipes but I cannot disable it. Does anyone know why and better yet should this not be done?You can no longer disable Named Pipes on SQL clusters as of SQL SP3. MS PSS has acknowledged this change although they have yet to document it anywhere.



The reasons given for this change:



1) If other protocols failed, they wanted at least one protocol to be available. For example if TCP/IP is enabled yet SQL Server fails to bind on 1433, Named Pipes should still be able to respond.

2) Prior to SQL SP3, if you disabled Named Pipes and re-enabled it you would an encounter an issue where the local machine name would be populated rather than the virtual server name. For example: \\.\pipe\$$\local machine name\sql\query instead of \\.\pipe\$$\virtual server name\sql\query