Monday, October 7, 2013

How to Configure SQL 2008 work with a Static IP Address


How to Configure SQL 2008 work with a Static IP


Most of the time you have seen SQL 2008 connection strings which we used to link a Database in a local server. The main disadvantage is we can access the SQL database server remotely. In this example codes show you that how we adjust the connection string to access a database which we have setup with a TCP/IP support.

1) Step - 1

Once you install the SQL server you need to setup the SQL server to access remotely.  





2) Open SQL Server configuration Manager >> Open TCP/IP


 3) Do the required setting to share the IP address globally.


4) Once you do this, your ID address accessible from anywhere. Hope you have a Static IP address assigned to the PC.If you have a static IP address replace it with 192.168.0.157

5.) Setting up the connection string in the application setting in App.config

<connectionStrings>
    <clear />
    <add name="DPLDataCon" connectionString="Data Source=127.0.0.1,2500;Network Library=DBMSSOCN; Initial Catalog=DPLDBMASTER;User ID=Sampath;Password = madhuni76;" />
    <add name="DPLLocal.My.MySettings.DPLDATARemoteConnectionString"
      connectionString="Data Source=127.0.0.1,2500;Initial Catalog=DPLDBMASTER;User ID=Sampath;Password=madhuni76;Network Library=dbmssocn"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
 if you have any further clarifcations, Please contact me here.

Hope you enjoyed the codes.