I known that this can be set at SQL Server Network Utility, but I
wonder why my ASP.NET script can connect to SQL Server even I change
its running port.
Another thing I want to know... actually it doesn't concern with SQL
that is,
how can I watch all the enviroment variable in Windows XP, such as
%systemroot% and how can I set that one"=aKe=" <darkgod1987@.hotmail.com> wrote in message
news:36e545c4.0404140338.6b6e5440@.posting.google.c om...
> How can I determine which port MS SQL is running.
> I known that this can be set at SQL Server Network Utility, but I
> wonder why my ASP.NET script can connect to SQL Server even I change
> its running port.
> Another thing I want to know... actually it doesn't concern with SQL
> that is,
> how can I watch all the enviroment variable in Windows XP, such as
> %systemroot% and how can I set that one
You can look in the SQL Server Log for the port, in the registry, or use the
SQLDMO Registry2 object's TcpPort property.
SQL Server listens on two ports - 1433 and 1434 (by default). A client can
connect to port 1434 to get connection information about all the instances
on the server, inclluding their ports. See "Controlling Net-Libraries and
Communications Addresses" in Books Online.
As for environment variables, you can use SET in the Windows shell, or use
an interface such as WMI which returns all the current variables. WSH has a
built-in object for this, I believe, perhaps the Network object but I'm not
entirely sure.
Simon
No comments:
Post a Comment