![]() See sp_Cycle_ErrorLog for more information.ĭMVs return server state that can be used to monitor SQL Server Instance. Note: This method does not work if SQL Server Error Logs have been cycled. Īs we can see from the output that SQL Server Instance is listening on 61499. You can search for port number in SQL Server Error Logs by opening SQL Server Error Log in notepad or via T-SQL using extended stored procedure xp_ReadErrorLog as below:ĮXEC xp_ReadErrorLog 0, 1, N'Server is listening on', N'any', NULL, NULL, 'DESC' When SQL Server is started it also logs an message to SQL Server Error Logs. As we can see from below screenshot that SQL Server Instance is running on TCP Port 61499. Once the filter is applied, Locate message 'Server is listening on [ 'any' …'. You need to filter by both Event ID and SQL Server Instance if you have multiple instances installed, for a single instance you can filter by Event ID only. The event we are interested in has Event ID of 26022, and it’s source is SQL Server Instance. You can filter the events by Event ID and Event source. Right click on Application and select Filter Current Log… Since huge amount of event are logged, you need to use filtering to locate the required logs. Navigate to Event Viewer > Windows Logs > Application Note: If Administrative Tools are not available on Start menu, go to Start > Control Panel > System and Maintenance > Administrative Tools > View event logs Click Start > Administrative Tools > Event Viewer. Here will be actual port number on which SQL Server is listening. When SQL Server is started it logs an event message as 'Server is listening on [ 'any' ' in windows event logs. ![]() Here my instance is listening on port number 61499. If SQL Server if configured to run on a static port it will be available in TCP Port textbox, and if it is configured on dynamic port then current port will be available in TCP Dynamic Ports textbox. In TCP/IP Properties dialog box, go to IP Addresses tab and scroll down to IPAll group. Step 3.Right Click on TCP/IP and select Properties Go to SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for Click Start > All Programs > Microsoft SQL Server 2012 > Configuration Tools > SQL Server Configuration Manager Method 1: SQL Server Configuration Manager: Let's see how you can use each of these methods in detail: ![]() Method 5: Reading registry using xp_instance_regread Method 1: SQL Server Configuration Manager Here are a few methods which we can use to get this information. There are several options available to get the listening port for SQL Server Instance. By default SQL Server listens on TCP port number 1433, and for named instances TCP port is dynamically configured. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |