July 6, 2010 at 11:35 pm
Comments posted to this topic are about the item Find the Port a Connection is Using
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
July 7, 2010 at 1:43 am
Works great in SQL 2005!
However, i have several sites still running on SQL 2000, the script is not working in there (i think the table does not exist yet). Do you have a similar script for SQL 2000? Would be great!
July 7, 2010 at 1:47 am
It won't work in SQL 2000. The query uses Dynamic Management Views which were only introduced in SQL Server 2005.
Excellent article that I'm sure will come in handy at some point. Thanks for sharing.
July 7, 2010 at 1:56 am
Thanks for you reply
I was used to use the SP_WHO function, but this does not show the ports
Any way around possible?
July 7, 2010 at 4:50 am
Thanks for sharing this info.
July 7, 2010 at 6:57 am
fluppe_be,
sp_who in SQL 2008 uses a system view in the resource database so I think you will need to write your own version of sp_who or search for one that meets your needs. There are quite a few available that use the DMVs and you would be able to easily add the port to any of them.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
July 7, 2010 at 7:55 am
I think it would if useful to also add the client_tcp_port from the connections DMV, because your SQL Server should only be using 1 open port? :w00t:
July 7, 2010 at 2:49 pm
Nice article. Thanks for sharing.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
July 7, 2010 at 9:27 pm
Too bad these views don't exist on SQL2K
July 8, 2010 at 12:39 am
Nice script. Very useful information.
Thanks.
July 8, 2010 at 6:37 am
Twinsoft SME (7/7/2010)
SQL Server should only be using 1 open port? :w00t:
Actually - Microsoft recommends multiple ports to help balance the "listening" load on busy servers.
From http://support.microsoft.com/kb/294453 - "To increase the performance of the SQL Server server to simultaneously process more connection requests, additional TCP ports to listen on can be added".
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
July 9, 2010 at 2:43 am
Hi,
I tried it on several 2005 databases. All of them returned 0 rows.
Is it normal ?
Thanks.
July 9, 2010 at 5:57 am
BIG1362000 (7/9/2010)
Hi,I tried it on several 2005 databases. All of them returned 0 rows.
Is it normal ?
Thanks.
In the script, I exclude port 1433 (WHERE c.local_tcp_port <> 1433) which is the default listener for SQL Server. You will get 0 rows in the result if you haven't got connections using a port other than the default.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
July 9, 2010 at 7:29 pm
Its an advantage that it shows cpu_time and memory_usage of the connected sessions.
Its easy to narrow down few issues.
Cheers
John
July 12, 2010 at 4:37 am
thank you.
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply