title: A network-related or instance-specific error occurred while establishing a connection to SQL Server
body: <p>I have two databases DB1 (used by my application) and DB2 (third party) under same SQL Server instance</p>
  
  <p>I get the following error </p>
  
  <blockquote>
    <p>SqlException ERROR: A network-related
    or instance-specific error occurred
    while establishing a connection to SQL
    Server. The server was not found or
    was not accessible. Verify that the
    instance name is correct and that SQL
    Server is configured to allow remote
    connections. (provider: Named Pipes
    Provider, error: 40 - Could not open a
    connection to SQL Server)</p>
  </blockquote>
  
  <p>connecting to my database (DB1) </p>
  
  <p>To fix this i used below  </p>
  
  <p>To assign a TCP/IP port number to the SQL Server Database Engine
  In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration, expand Protocols for , and then double-click TCP/IP.</p>
  
  <p>In the TCP/IP Properties dialog box, on the IP Addresses tab, several IP addresses appear in the format IP1, IP2, up to IPAll. One of these is for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. Right-click each address, and then click Properties to identify the IP address that you want to configure.</p>
  
  <p>If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports, delete the 0.”</p>
  
  <p>Once I deleted those zeros and put in 1433 for TCP ports on each IP address DB1 works fine, but cannot access DB2 (third party)</p>
  
  <p>So basically what is the default settings 0 or 1433?</p>
  
  <p>how do i get both work with default TCP/IP settings?</p>
  
  <p>Thanks 
  Gauls</p>