Showing posts with label SQL SERVER 2005. Show all posts
Showing posts with label SQL SERVER 2005. Show all posts

Tuesday, March 10, 2009

error: 28 - Server doesn't support requested protocol

After trying to setup SQL Server 2005 /2008Express, We may face the 'Error: 28':

"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 28 - Server doesn't support requested protocol)"

Network protocols are disabled in SQL Server 2005 Express by default so we need to enable TCP/IP:

  • Launch the SQL Server Configuration Manager

  • Expand the "SQL Server 2005 Network Configuration" node

  • Left click the "Protocols for SQLEXPRESS" node to view the supported protocols

  • Right click the "TCP/IP" protocol and select "Enable"
  • SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

    Error when connecting to SQL server:

    Below are steps may try to help:
    1) Make sure your server name is correct, e.g., no typo on the name.
    2) Make sure your instance name is correct and there is actually such an instance on your target machine. [Update: Some application converts \\ to \. If you are not sure about your application, please try both Server\Instance and Server\\Instance in your connection string]
    3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
    4) Make sure SQL Browser service is running on the server.
    5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.

    Thank You,
    Happy Coding

    Thursday, March 5, 2009

    Error: 18452 Login failed for user ‘(null)’. The user is not associated with a trusted SQL Server connection.

    I had an error that I believe a lot of new user for SQL server may face during create a new Database.

    Below is the resolution:


    Change the Authentication Mode of the SQL server from “Windows Authentication Mode (Windows Authentication)”
    to “Mixed Mode (Windows Authentication and SQL Server Authentication)”.

    Run following script in SQL Analyzer to change the authentication

    LOGIN sa ENABLE
    GO
    ALTER LOGIN sa WITH PASSWORD =
    GO

    OR

    In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties. On the General page, you may have to create and confirm a password for the sa login. On the Status page, in the Login section, click Enabled, and then click OK.