We all know that SQL Server by default listens to the port number 1433. But, due to security reasons, the default port number will/can be changed to a different port in order to minimize hacks on SQL Server.
There are many ways using which you can find the port number of the SQL server which it is listening to.
Click Start >> Run
For SQL Server 2005 Type "SQLServerManager.msc" and click OK
For SQL Server 2008 Type "SQLServerManager10.msc" and click OK
This will Open the SQL Server Configuration Manager for you.
Now in the Left Pane, expand "SQL Server Network Configuration" and click on "Protocols for <InstanceName>"
Now In the right pane, right-click on the "TCP/IP" protocol and go to properties

In the TCP/IP properties, go to the "IPAddresses" Tab and scroll down and locate the section "IPAll"
In the "IPAll" Section, the "TCP Port" represents the Port Number SQL Server is listening to.

Note: <InstanceName> is your SQL Server Instance Name
Using Registry:
To find the SQL Server Port number using registry, execute the below query.
You can download the scripts from here.
There are many ways using which you can find the port number of the SQL server which it is listening to.
- Using the SQL Server Configuration Manager
- Using Registry
- Using Error Log
- etc...
Click Start >> Run
For SQL Server 2005 Type "SQLServerManager.msc" and click OK
For SQL Server 2008 Type "SQLServerManager10.msc" and click OK
This will Open the SQL Server Configuration Manager for you.
Now in the Left Pane, expand "SQL Server Network Configuration" and click on "Protocols for <InstanceName>"
Now In the right pane, right-click on the "TCP/IP" protocol and go to properties

In the TCP/IP properties, go to the "IPAddresses" Tab and scroll down and locate the section "IPAll"
In the "IPAll" Section, the "TCP Port" represents the Port Number SQL Server is listening to.

Note: <InstanceName> is your SQL Server Instance Name
Using Registry:
To find the SQL Server Port number using registry, execute the below query.
DECLARE @InstanceName nvarchar(50) DECLARE @value VARCHAR(100) DECLARE @RegKey_InstanceName nvarchar(500) DECLARE @RegKey nvarchar(500) SET @InstanceName=CONVERT(nVARCHAR,isnull(SERVERPROPERTY('INSTANCENAME'),'MSSQLSERVER')) --For SQL Server 2000 if(SELECT Convert(varchar(1),(SERVERPROPERTY('ProductVersion'))))=8 BEGIN if @InstanceName='MSSQLSERVER' Begin SET @RegKey='SOFTWARE\Microsoft\'+@InstanceName+'\MSSQLServer\SuperSocketNetLib\TCP\' END ELSE BEGIN SET @RegKey='SOFTWARE\Microsoft\Microsoft SQL Server\'+@InstanceName+'\MSSQLServer\SuperSocketNetLib\TCP\' END EXECUTE xp_regread @rootkey = 'HKEY_LOCAL_MACHINE', @key = @RegKey, @value_name = 'TcpPort', @value = @value OUTPUT Select @@SERVERNAME as ServerName,@value as PortNumber END --For SQL Server 2005 and up if(SELECT Convert(varchar(1),(SERVERPROPERTY('ProductVersion'))))<>8 BEGIN SET @RegKey_InstanceName='SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL' EXECUTE xp_regread @rootkey = 'HKEY_LOCAL_MACHINE', @key = @RegKey_InstanceName, @value_name = @InstanceName, @value = @value OUTPUT SET @RegKey='SOFTWARE\Microsoft\Microsoft SQL Server\'+@value+'\MSSQLServer\SuperSocketNetLib\TCP\IPAll' EXECUTE xp_regread @rootkey = 'HKEY_LOCAL_MACHINE', @key = @RegKey, @value_name = 'TcpPort', @value = @value OUTPUT Select @@SERVERNAME as ServerName,@value as PortNumber END |
Using Error Log:
To find the SQL Server Port number using error Log, execute the below query.
SET NOCOUNT ON if(SELECT Convert(varchar(1),(SERVERPROPERTY('ProductVersion'))))=8 BEGIN Create Table ##ErrorLog_2K (ErrorLog nvarchar(1000), ContinuationRow int ) INSERT INTO ##ErrorLog_2K Exec master..xp_readerrorlog SELECT DISTINCT @@SERVERNAME as[ServerName] , SUBSTRING(RIGHT(ErrorLog,5),1,4) as [PortNumber] FROM ##ErrorLog_2K where ErrorLog like '%SQL Server listening on 1%' DROP TABLE ##ErrorLog_2K END if(SELECT Convert(varchar(1),(SERVERPROPERTY('ProductVersion'))))<>8 BEGIN Create Table ##ErrorLog (Logdate datetime, ProcessInfo nvarchar(100), [Text] nvarchar(1000)) INSERT INTO ##ErrorLog exec master..xp_readerrorlog SELECT DISTINCT @@SERVERNAME as[ServerName] , SUBSTRING(RIGHT(text,6),1,4) as [PortNumber] FROM ##ErrorLog where text like 'Server is listening on % ''any'' %' DROP TABLE ##ErrorLog END SET NOCOUNT OFF |
You can download the scripts from here.
459 comments:
«Oldest ‹Older 401 – 459 of 459This is excellent information. It is amazing and wonderful to visit your site.Thanks for
sharing this information, this is useful to me…
Best Advanced .Net training
Institute in chennai
Such a great blog.Thanks for sharing.........
Ethical Hacking Course in Chennai
Ethical hacking course in bangalore
Ethical hacking course in coimbatore
Ethical Hacking Training in Bangalore
Ethical hacking Training institute in bangalore
Ethical Hacking in Bangalore
Hacking Course in Bangalore
Ethical Hacking institute in Bangalore
Selenium Training in Bangalore
Software Testing course in Bangalore
Wow Very Nice Information Thanks For Sharing It. Best Adobe Photoshop Training in Kanchipuram|
This Blog is very Nice and very useful to us...
Best Oracle Training Institute in Chennai
| Oracle Training in velachery
| Best Oracle Training Institute in Chromepet
| Oracle Training in Perungudi
This Blog is very Nice and very useful to us...
Best CEH Training Institute in Chennai
| CEH Training in velachery
| Best CEH Training Institute in Chromepet
| Oracle Training in Perungudi
Interesting post. This is really helpful for me. I like it. Thanks for sharing.
Nice and informative article. Thanks for sharing such nice article, keep on updating.
Best Computer Service in Chennai | Best Computer Service in Kovilambakkam
This sites are Done with the Great works...The Blogs are useful find a lots of information's,Thanks for all your work
python training in chennai | python training in annanagar | python training in omr | python training in porur | python training in tambaram | python training in velachery
It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me... devops training in chennai | devops training in anna nagar | devops training in omr | devops training in porur | devops training in tambaram | devops training in velachery
Thanks for the useful information of software testing courses, give more updates on software testing development, First time I visit your blog really nice, I bookmark your blog here after a daily visit. share more.
Ai & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
I did not know the entire benefits of Garmin Nuvi Update. But since I have read this blog on map update, I have installed all available updates for my garmin device. I must say that this piece of blog has helped me improve navigation experience. I am not suggesting all my friends to read this blog and get Garmin.com/Express with this team. For detailed information, you can contact us at toll-free number +1 888-309-0939. Our Garmin GPS professionals will provide instant help.
Hi it's really informative,
Thanks to share with us and keep more updates,
https://www.porurtraining.in/hardware-and-networking-training-in-porur-chennai
https://www.porurtraining.in/xamarin-training-in-porur-chennai
https://www.porurtraining.in/ios-training-in-porur-chennai
https://www.traininginvelachery.org/iot-training-in-velachery-chennai
USeful information and thanks for this blog.
java training in chennai
java training in annanagar
aws training in chennai
aws training in annanagar
python training in chennai
python training in annanagar
selenium training in chennai
selenium training in annanagar
We will tell you about the simple troubleshooting tips to fix the WiFi not showing up error and let your computer connect hp deskjet 3755 printer to wifi setup.when still many HP deskjet printers need WiFi setup to begin printing.
Python offers a number of features that make it an attractive programming platform including stability, portability, object-oriented development, a powerful standard library and a wealth of third-party modules or packages. unindent does not match any outer indentation level
Really i enjoyed very much. And this may helpful for lot of peoples. So you are provided such a nice and great article within this.
ISTQB Certification Course in Chennai | ISTQB Certification Course in Velachery
Dialing the secret number of KBC is no matter now. https://kbcofficialwinner.com/kbc-head-office-number-mumbai-kbc-helpline/ provides you easiness to dial it instantly.
There are many reasons as to why the Garmin devices must be believed and relied on. You would be informed about the updates and system prerequisites through garmin.com/express whenever wanted. Keep checking the website and get notifications considering it.
Your blog post is really good and informative keep it up and share more.
home network security device
Hi,
Thank for sharing such a nice post on your blog keep it up and share more.
Free Crack Software Download
Excellent post tn text books
It's very great post...Thanks for sharing such an informative post.
Peoplesoft Technical Training
Thank you for sharing the post. coupon codes
Great and unique information for Database Administrator.
Locksmith Albany NY
Very amazing blog, Thanks for giving me new useful information.
selenium architecture diagram
uses of angularjs
aws certification types
oreo features android
aws interview questions and answers for experienced
devops interview questions and answers for experienced
Amazing..! I was impressed by your great post and Keep doing well...
Microsoft Dynamics CRM Training in Chennai
Node JS Training in Chennai
Node JS Course in Chennai
Mua vé máy bay tại Aivivu, tham khảo
vé máy bay hàn quốc hà nội
vé bay hà nội hồ chí minh
đặt vé máy bay phú quốc đi hà nội
vé máy bay đi đà lạt khứ hồi
giá vé máy bay mỹ về việt nam
taxi sân bay nội bài
It's very great post...Thanks for sharing such an informative post..
Python Training Institute in Chennai | Python Training Institute in Velachery
For Best and Affordable SEO Services visit here:
click here
Thanks its Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us.
Python Training Institute in Chennai | Python Training Institute in Velachery
It's really amazing to have many lists of will help to make thanks a lot for sharing
vé máy bay từ việt nam sang nga bao nhiêu
vé máy bay từ anh về việt nam vietnam airlines
chuyến bay từ pháp về việt nam hôm nay
vé máy bay từ đức về việt nam giá rẻ
dat ve may bay tu han quoc ve viet nam
vé máy bay giá rẻ tu Nhat Ban ve Viet Nam
Amazing product thanks for sharing with us It is very informative. If you need any type of boxes you can visit the link.
custom CBD boxes suppliers
custom Cigarette boxes companies
Great post. Thanks for sharing.....
Full stack developer course in bangalore
full stack developer course in pune
full stack developer course in Gurgaon
full stack developer course in hyderabad
full stack developer course in delhi
I appreciate your post thanks for sharing the information.
small Hair Extension Boxes
Handover gift Boxes
An awesome blog thanks a lot for giving me this great opportunity to write on this.
giá vé máy bay từ anh về hà nội
vé máy bay từ pháp về việt nam giá rẻ
dat ve may bay gia re tu italia ve Viet Nam
Gia ve may bay Vietnam Airline tu ha lan ve Viet Nam
dat ve may bay gia re tu new zealand ve Viet Nam
Mua vé máy bay đi ngày tu Dubai ve Viet Nam
This site recommended one of the best blogs I have ever read. Truly relevant to what I was looking for. Also, all the content has been researched really well. digital marketing company
Online marketing solutions have been really been efficient in providing the services overall. This blog has been proficient enough in providing the details in a very creative manner. Kudos to the writer amazing blog.
An amusing blog with lot of good points highlighted up here. Couldn't have found any other amazing blog than this. Great work with this one.
digital marketing services company
online marketing websites
seo digital agency
digital advertising agency
online marketing expert
If you didn't get it while searching for the app, you can open your mobile or PC and look for the FUBO TV app. Please select it and once you have downloaded it from a site, Now connect that particular device to your Smart TV. fubo.tv/connect
fubotv connect sign in with code
I really appreciate your valuable efforts and it was very helpful for me. Thank you so much...!
Uncontested Divorce Process in Virginia
Cheap Uncontested Divorce in VA
Outstanding piece of work! Great analyse. Thanks for sharing and some new good ideas
python online training in toronto
I like the helpful information provide in the articles.
Abogado Trafico Culpeper Va
Abogado Transito Culpeper VA
This article is very informative
virginia bankruptcy means test
bankrupty lawyer near me
Nice Blog!! Thanks for sharing this content, RH Soft Tech is India’s best sap online training and online professional IT courses training provider. python online training in mumbai
Họa tiết giấy dán tường phòng ngủ
Mẫu nhà mái ngói 1 tầng đẹp giản dị mà tinh tế
Cách hóa giải phong thủy nhà nằm ngay ngã ba
Mẫu tủ quần áo kèm bàn trang điểm bằng gỗ tự nhiên
Mẫu nhà cấp 4 120m2 3 phòng ngủ 1 thờ có nhà tắm đẹp hiện đại
Kiểu dáng của các loại mẫu kệ tivi treo tường phòng khách
Very nice information.
Digital marketing course in Chandigarh
thanks for sharing wonderful information , keep posting Salesforce Training In Pune
Great post,
SQL Training in Pune
Great blog! love to read keep sharing more.
Waistcoat for Men
Best B arch College in Gurgaon
B tech CSE
Best B arch College in Gurgaon
I Just finished reading the article and I must say, it was incredibly informative! I found everything to be explained in a clear and concise manner, which made the content easy to understand. I really enjoyed reading it and I think it will be very effective in helping me with my research. Thank you so much for sharing this with us and I'm looking forward to your upcoming articles. Good luck! custom erp software development
The blog you shared is very good. I expect more information from you like this blog. Thank you. Ziyyara Edutech’s online English language classes in Kuwait are designed to provide a comprehensive and immersive learning experience, with a strong emphasis on spoken English proficiency.
For more info visit Spoken english language Class in Kuwait
Enroll in ICSS's cybersecurity courses today and take the first step towards becoming a cybersecurity champion!
Ready to secure the future? Visit our website for more information and enrollment details:
🌐 Machine Learning Training
Ethical Hacking Training
CEH Training
Bug Bounty Training
Great post.Thanks for the article.
SQL Classes in Pune
Thank you so much for taking the time to share this wonderful article. Join Ziyyara's online English tuition classes for a personalized learning experience. Master the language, improve fluency, and boost your confidence in English communication with expert guidance and interactive sessions.
For more info visit Tuition for english
For detailed product specifications, visit https://pluvima.com/products/magic-degreaser-cleaner-spray.
SQL Classes in Pune
nice article
it training institute
Nice post..Keep blogging..
click here for more information
Post a Comment