SQL SERVICES build problem

A, SQL SERVICES IP connection settings

  1. Setting the IP address to access the database SQL2008
  2.  

    Double-click the right window of the SQL Server service in SQL Server (SQLEXPRESS), the pop-up window, select Network service, confirmed for network services, remote clients can restart the SQL Server service, otherwise restart the service functionality is limited to the unit.

    Setting the IP address to access the database SQL2008
  3.  

    Configuration → SQLEXPRESS from the SQL Server network protocols, double-click to open the TCP / IP, select IP address, set the IP address (for example, 172.24.178.101) need to access, and then the dynamic TCP port is set to empty (blank to not enable dynamic ports, 0 indicates to use dynamic port), there is a lowermost end disposed IPall, the port needs to be set to 1433.

    Setting the IP address to access the database SQL2008
  4.  

    Configuration → Client protocol from SQL Native Client10.0, double-click to open TCP / IP, to confirm the default port 1433, to complete the set here.

    Setting the IP address to access the database SQL2008
  5. 5

    Finally, enter the IP address of the connection, just set into the use by SQL Server Management Studio, the successful landing SQL2008 database with IP addresses.

    Setting the IP address to access the database SQL2008
     
     
     

    Second, the error message (when establishing a connection to SQL Server network-related or instance-specific error):

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. Not found or can not access the server. 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)

    solution:

    First, first make sure that the database server to configure the connection parameters are correct

    (1) if it is directly through Microsoft SQL Server Management Studio connection, check the IP address (non-default ports but also to write the port number), user name and password are correct.

     

    (2) If the connection is through a program, make sure whether the connection string is correct Web.Config

    // string constr = "server=.;database=myschool;integrated security=SSPI"; 
    
    //string constr = "server=.;database=myschool;uid=sa;pwd=sa";   
    
    // strConnection = "data source=.;initial catalog=netdb;user id=sa;pwd=sa";

    Second, check the remote service is turned on and the remote server is configured correctly.

    (1) Check the MSSQLSERVER service is turned on

     (2) SQL Server Network Configuration 

    a. Enable TCP / IP protocol

    Start - >> SQLServer2005 - >> configuration tool - >> SQLServer Area Configuration - >>
    Configuration for Services and connections - >> Click "remote connection" - >> Local and remote connections - >> use both TCP / IP and named Pipes - >> click "OK" - >> restart the service SQLserver

    b. TCP / IP properties right on the right side, to enable the IP address and port for external connections.

    Third, to see whether the firewall allows you to set the database port 1433 or by

    If the firewall is not set. The firewall can be turned off directly (not recommended.) Or set by the following method.

    Open the Control Panel - System Security >> - >> Windows Firewall - >> Advanced settings (on the right) 
    (1) New Inbound Rule

     
     
     
     
     
     

Guess you like

Origin www.cnblogs.com/hairyhood/p/10942036.html