---
title: "please help me i want to create a connection string that can be use with multiple sql server means it will accept the server name of the machine"  
description: "please help me i want to create a connection string that can be use with multiple sql server means it will accept the server name of the machine"  
author: "Anil Yadav"  
published: 2012-02-15  
updated: 2020-09-21  
canonical: https://www.mindstick.com/interview/1390/please-help-me-i-want-to-create-a-connection-string-that-can-be-use-with-multiple-sql-server-means-it-will-accept-the-server-name-of-the-machine  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# please help me i want to create a connection string that can be use with multiple sql server means it will accept the server name of the machine

Hi Anil,\
You can run multiple instances of SQL Server on the same host using the named instance feature. If your target database instance is a named instance, SqlClient will also need to know the instance name or instance port number. The instance name can be specified by appending a backslash and instance name to the Data Source value:\
\
Data Source=SQLSERVERNAME.MYDOMAIN.COM\MYINSTANCE;Integrated Security=SSPI;Initial Catalog=MyDatabase\
\
For more details check this link...\
http://weblogs.sqlteam.com/dang/archive/2011/07/10/sql-server-connection-strings.aspx\
\
\
\

## Answers

### Answer by Anonymous User

Hi Anil,\
You can run multiple instances of SQL Server on the same host using the named instance feature. If your target database instance is a named instance, SqlClient will also need to know the instance name or instance port number. The instance name can be specified by appending a backslash and instance name to the Data Source value:\
\
Data Source=SQLSERVERNAME.MYDOMAIN.COM\MYINSTANCE;Integrated Security=SSPI;Initial Catalog=MyDatabase\
\
For more details check this link...\
http://weblogs.sqlteam.com/dang/archive/2011/07/10/sql-server-connection-strings.aspx\
\
\
\


---

Original Source: https://www.mindstick.com/interview/1390/please-help-me-i-want-to-create-a-connection-string-that-can-be-use-with-multiple-sql-server-means-it-will-accept-the-server-name-of-the-machine

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
