U3D Connect SQL Server first System.Data.dll the Unity installation directory into the Asset/plugins directory of the project, and then write a script to connect to the database, in the above two steps without error, prompt this mistake, To consider whether the relevant services for SQL Server are turned on, and to enable the TCP/IP protocol in SQL Server Configuration Manager, proceed as followsOpen Start-Program-microsoft SQL Server 2005-configuration tools-sql Server configuration manager--SQL Server 2005 Network configurations C5>-mssqlserver protocol , and then the right-hand window has a TCP/IP protocol, right-click "Enable". The SQL Server (MSSQLSERVER) service is stopped and then started in the start-Program-administration tools-services. The problem is solved!
Reprinted from http://ge19881022ge.blog.163.com/blog/static/152818147201433085543772/
U3D connection to SQL Server database error: Unable to connect because the target computer was actively refused.