|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 6:17 AM
Points: 1,625,
Visits: 1,926
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, July 12, 2010 9:45 AM
Points: 2,
Visits: 7
|
|
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!
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Yesterday @ 2:03 AM
Points: 557,
Visits: 1,357
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, July 12, 2010 9:45 AM
Points: 2,
Visits: 7
|
|
Thanks for you reply I was used to use the SP_WHO function, but this does not show the ports Any way around possible?
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Wednesday, February 15, 2012 10:37 PM
Points: 62,
Visits: 50
|
|
| Thanks for sharing this info.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 6:17 AM
Points: 1,625,
Visits: 1,926
|
|
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.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Saturday, March 24, 2012 3:31 PM
Points: 4,238,
Visits: 207
|
|
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?
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Yesterday @ 10:25 AM
Points: 18,754,
Visits: 12,337
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Saturday, May 18, 2013 5:42 PM
Points: 15,
Visits: 78
|
|
| Too bad these views don't exist on SQL2K
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, March 14, 2013 4:15 AM
Points: 3,240,
Visits: 4,960
|
|
Nice script. Very useful information. Thanks.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sometimes, winning is not an issue but trying. You can check my BLOG here
|
|
|
|