Reputation: 11
I have a problem with the Anylogic 7.2 database object connecting to SQL Server. I am new to Anylogic, but as far as I can tell I have set it up correctly. To set up connectivity to SQL Server, I downloaded sqljdbc4-3.0.jar and set it as a model dependency in the top level model. In the 'imports' section of 'main', I call import com.microsoft.sqlserver.jdbc.SQLServerDriver;
The user login has the relevant privileges to the database in question, and the username/password combination work. The user can connect through SQL Server Management Studio.
In the Anylogic database connection wizard I have set host to (local), ., local, localhost, (localhost) - none appear to work. When I try to connect to return the list of tables, the result returned is null.
I am not knowledgeable of SQL Server, but I think it is set up properly. I am all out ideas and not sure how to resolve this one. If anybody has a clue I would be very grateful to hear.
Thanks.
Upvotes: 0
Views: 341
Reputation: 11
Thanks for your help Rachel. Eventually I got to the bottom of this one. After going through log files from Anylogic and SQL Server it became clear that Anylogic was failing to reach SQL Server, i.e. there was no attempt to login. So, I turned off my firewall and all worked as intended. It seemed that the firewall was blocking communication on port 1433. I set up explicit firewall rules to allow communication over ports 1433 and 1434 and now the issue appears to be resolved.
Upvotes: 1