Reputation: 1322
I am trying to connect to my local SQL DB through AnyLogic 7.3.6. I have SQL Server 2016 Developer installed and the DB is in mixed authentication (Windows & SQL). When adding the connection it gives the following error:
Network error IOException: Connection refused: connect
Connection refused: connect
My host is called localhost
. I have tried leaving Login and Password blank, hoping for Windows Authentication, and I've tried adding a SQL user (Test, test) to the server, both to the same result. I am using the com.microsoft.sqlserver.jdbc.SQL.ServerDriver
JDBC driver, but have also tried net.sourceforge.jtds.jdbc.Driver
(same result).
Can anyone explain how I can make a connection between AnyLogic 7 and SQL Server 2016 (Developer)?
Upvotes: 1
Views: 523
Reputation: 91
I don't think the Windows Authentication will work with AnyLogic. So make sure to have a correct configured SQL User to use.
Make sure that "Allow remote connections to this server" is enabled. Open SQL Server Management Studio -> Right click on your instance -> Properties -> Connections.
Check so TCP/IP connections are enabled. Open SQL Server Configuration Manager -> SQL Server Network Confinguration -> Select your instance -> Enable TCP/IP. It's also possible to change the default port here.
The TCP/IP connection is using port 1433 as default. Make sure to allow connections through this port in your firewall.
Upvotes: 5