Home > DeveloperSection > Interviews > 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

Posted on    February-15-2012 11:30 PM

 ASP.Net ASP.Net 
 1 Answer(s)
  1461  View(s)
Rate this:

Arun Singh

Total Post:310

Posted on    February-16-2012 1:00 AM

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...

Don't want to miss updates? Please click the below button!

Follow MindStick