[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 73
  • Last Modified:

SQL Server 2012 express

I did the install and enabled TCP in the SQL server manager,  The IP or port 1433 does not show up in netstat.  What am I missing??
0
asrvwiz
Asked:
asrvwiz
  • 12
  • 7
  • 3
  • +1
2 Solutions
 
Russ SuterCommented:
Have you opened port 1433 in your firewall?

Also, if you are using a named instance rather than the default instance it will be using a different port.
0
 
asrvwizAuthor Commented:
I did open 1433, that did not work so I shut off the firewall.

I am using the default instance so it is servername\sqlserverexpress.  correct?
0
 
Russ SuterCommented:
The default instance name is usually just "SQLEXPRESS". If your instance is "sqlserverexpress" you probably have a named instance. Go to the SQL Server Configuration Manager and right click on the TCP/IP protocol and select "Properties". If there's a custom port in use you can find it there. Disabling the firewall completely seems to rule out port issues. You may just need to refer to the server by its named instance. Just edit your connection to use the name. Even the default instance will work that way.
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
asrvwizAuthor Commented:
Yes that is it sqlexpress.  only sqlserver running in services.
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
seems like you have dynamic port enabled on your settings (i think by default it is dynamic ). Go to the sql server configuration manager -> SQL Server Network configuration .> Protocols for XXXX -> TCP/IP -> IP Addresses
scroll down to the bottom and put the port number 1433 on TCP port and remove the 0 from the Dynamic ports
0
 
asrvwizAuthor Commented:
Aneesh,

I have then set that way.  My concern is with IP1 and IP2
sql-2012-settings.docx
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
I would set all dynamic ports to blank , and you need to restart the services,
0
 
asrvwizAuthor Commented:
Aneesh,

Still the same, no 1433 in netstat.
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
can you check the port number in sql  configuration manager again.
Alternatively you can check the sql error log, or run the following statements

SELECT DISTINCT
    local_tcp_port
FROM sys.dm_exec_connections
WHERE local_tcp_port IS NOT NULL

or

USE master
GO
xp_readerrorlog 0, 1, N'Server is listening on'
GO
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
The IP or port 1433 does not show up in netstat.
Did you try to connect to the SQL Server instance or you're only worried with netstat?

I have then set that way.  My concern is with IP1 and IP2
You'll only need to set on the IPAll section. Btw, was port 1433 already configured or you changed it?
0
 
asrvwizAuthor Commented:
We can connect to the SQL instance with SQL server connection manager.  I believe it had 1433 and a 5 digit dynamic port.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Did you try to connect from a remote computer?
0
 
asrvwizAuthor Commented:
I am  trying to install an app and it is saying it can not connect on port 1433.  I used netstat to see if 1433 was listening.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
What's the app connection string?
0
 
asrvwizAuthor Commented:
Aneesh,

Here is the result.  It says it is listening, but there is nothing in netstat that lists 1433

2016-10-12 19:33:32.630      spid12s      Server is listening on [ 'any' <ipv6> 1433].
2016-10-12 19:33:32.630      spid12s      Server is listening on [ 'any' <ipv4> 1433].


The other query returned local_tcp_port
0
 
asrvwizAuthor Commented:
I have created a DB in the instance, changed the SA password, and created a new login, so SSMS does connect to the instance.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
but there is nothing in netstat that lists 1433
netstat will only return data if you have some remote connection to the database and that's why I asked if you tried to connect from a remote computer.
0
 
asrvwizAuthor Commented:
Should the command osql -L show the connection?

I will check when I get to work if I can see the DB from another SQL server.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Should the command osql -L show the connection?
No. -L parameter is for listing purpose only so it won't connect to your SQL Server instance.
You may try the following:
osql -E -q "select * from sysdatabases"  

Open in new window

0
 
asrvwizAuthor Commented:
But should it show a connection available?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
It should. The command will connect to sql server instance and run the query in parameter (-q).
You can also try to run it in a remote computer that has the OSQL installed but then you'll need to provide the SQL Server instance name (-s):
osql -S Servername\SQLEXPRESS -E -q "select * from sysdatabases"  

Open in new window

0
 
asrvwizAuthor Commented:
Vitor,

That worked.  I could connect and see the DB I created.  I tried osql - L from another SQL server and I could see the instance.  I hit next on the install for the application and it started to create the tables in the DB I created.  I tried the osql -L on the server locally, and the instance now shows up.

 I am not sure what fixed the issue.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
I am not sure what fixed the issue.
A service restart after you changed the Port to static, I guess.
0
 
asrvwizAuthor Commented:
Thank you all!  I appreciate everyone's input.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 12
  • 7
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now