Connection String for MsSQL 2012 database Print

  • 3

You can use the following connection sting for connecting to MS SQL Server 2012 database

Connection to a SQL Server instance 
------------------------------------
<add key="ConnectionString" value="Data Source=.\MSSQLSERVER2012;Initial Catalog=database_name;User ID=db_user_name;Password=db_password;Persist Security Info=True;" />

 

Connect to SQL server via TCP/IP Protocol 
------------------------------------------ 
<add key="ConnectionString" value="Data Source=win1.mydnsweb.com,port no;Network Library=DBMSSOCN;Initial Catalog=database_name;User ID=db_user_name;Password=db_password;Persist Security Info=True;" />

 
Ports:

MSSQL14: 1435
MSSQL12: 1434
MSSQL08: 1433


Was this answer helpful?

« Back