unity connection with sql server 2012
unity connection with sql server 2012



There are four steps to connect unity with ms sql server 2012. First step is to open ms sql server 2012 and connect with sql authentication. Second step is to download asp.net library from here (connect unity with sql server 2012) and paste it on unity asset folder and rebuild your unity project. 
Third step is to download C# script from here and paste it unity asset folder script contain code to connect your unity project with sql server 2012. Here is the files to download

1. Library File of Asp.net for unity, download it from below link

Download Library File Here

2. Download C# code from below link

Download Code

Every person will have different code for their unity project because every person have different configuration (different database or different login to server). So it is important to discuss code so everyone can change according to their configuration.


unity connection with sql server 2012 code
unity connection with sql server 2012 code



There are four important things to consider in order to connect unity with sql server 2012

1. IP address (i am using local machine my ip address is "127.0.0.1" )
2. user id is your login user name
3. password is your login password
4. Initial Catalog is your database name


How to remove Socket exception 

To remove socket exception follow four step. Four and last step is to configure your ip address in sql server configuration manager, open sql server configuration manager and open sql server network configuration then enable or open tcp/ip by click on their property and you will see multiple ip addresses, enable everything. Below is the picture


unity connection with sql server 2012 socket configuration
unity connection with sql server 2012 socket configuration

unity connection with sql server 2012 ip configuration
unity connection with sql server 2012 ip configuration




Make sure unity listens for special port that is 1433 then no socket exception will occur after the build. Here are four simple steps to connect unity with sql server 2012


If you want to see video for guidance here is the link, it will help you

Video of Unity connection with sql server 2012 part 1

Video of Unity connection with sql server 2012 part 2




Previous Post Next Post