Connection String for MsSQL 2008 database Print

  • 2

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

Connection to a SQL Server instance 
------------------------------------
<add key="ConnectionString" value="Data Source=.\MSSQLSERVER2008;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: 1436
MSSQL22: 1433

 


Was this answer helpful?

« Back