I'm trying to make a connection to an already existing database in SQL Server 2012n with Netbeans 8.
我正在尝试使用Netbeans 8连接到SQL Server 2012n中已存在的数据库。
Using the connection wizard I select Sql Server 2012 and enter the credentials and fields.
使用连接向导我选择Sql Server 2012并输入凭据和字段。
However I get the message that a connection cannot be established.
但是我收到无法建立连接的消息。
You can see screenshots of the entered fields:
您可以看到输入字段的屏幕截图:
I also tried using "localhost" instead of "STIJN" this didn't work. I also tried with the default port "1433". Also didn't worked, however what port should this be? Where can I see what port I'm using? Maybe the error lies in the port, otherwise I wouldn't know where I made a mistake.
我也尝试使用“localhost”而不是“STIJN”这不起作用。我也尝试使用默认端口“1433”。也没用,但是这应该是什么端口?我在哪里可以看到我正在使用的端口?也许错误在于端口,否则我不知道我在哪里弄错了。
1 个解决方案
#1
13
Go to your SQL Server configuration manager -> SQL server network configuration -> protocols for SQLEXPRESS -> TCP/IP (double click on it for properties).
转到SQL Server配置管理器 - > SQL服务器网络配置 - > SQLEXPRESS的协议 - > TCP / IP(双击它以获取属性)。
On protocol page set enabled to Yes. On IP Addresses page, scroll to bottom. TCP Dynamic Ports: 54629 TCP Port: 1433 Apply and ok.
在协议页面设置启用为是。在“IP地址”页面上,滚动到底部。 TCP动态端口:54629 TCP端口:1433应用并确定。
Make a connection with: Host: localhost Port: 1433 Your credentials Instance field = blank.
建立连接:主机:localhost端口:1433您的凭据实例字段=空白。
This should work.
这应该工作。
#1
13
Go to your SQL Server configuration manager -> SQL server network configuration -> protocols for SQLEXPRESS -> TCP/IP (double click on it for properties).
转到SQL Server配置管理器 - > SQL服务器网络配置 - > SQLEXPRESS的协议 - > TCP / IP(双击它以获取属性)。
On protocol page set enabled to Yes. On IP Addresses page, scroll to bottom. TCP Dynamic Ports: 54629 TCP Port: 1433 Apply and ok.
在协议页面设置启用为是。在“IP地址”页面上,滚动到底部。 TCP动态端口:54629 TCP端口:1433应用并确定。
Make a connection with: Host: localhost Port: 1433 Your credentials Instance field = blank.
建立连接:主机:localhost端口:1433您的凭据实例字段=空白。
This should work.
这应该工作。