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

Anil Yadav

Total Post:1

Points:5
Posted by  Anil Yadav
 1769  View(s)
Ratings:
Rate this:
  1. Arun Singh

    Post:310

    Points:1550
    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



Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!