locked
sql network interfaces error 26 RRS feed

  • Question

  • Hi,

    After installing Visual Studio 2008 on a Windows XP system, I:

    • Create a new project of Windows form;
    • Under Data Sources tab, click Add New Data Source...;
    • Select Database, then next;
    • Click New Connection... button;
    • Select Miscrosoft SQL Server Database File as data source;
    • Key in test as Database file name, then click OK and Yes for the create dabase question;
    • Then I get an error message saying, 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: SQL network Interfaces, error: 26 - Error Locating Server/instance Specified)

    I can't understand what does that meaning.  Could somebody advise.

    Thanks

    Sanping

     

    • Moved by Bob Beauchemin Tuesday, October 11, 2011 2:30 PM Moving to a more appropriate forum (From:.NET Framework inside SQL Server)
    • Moved by Andrew.Wu Thursday, October 13, 2011 6:33 AM (From:Visual Studio Database Development Tools (Formerly "Database Edition Forum"))
    Tuesday, October 11, 2011 4:51 AM

Answers

  • Hi Sanping,

    Creating a SQL Server database with Microsoft SQL Server Database File requires an instance of SQL Server Express instance installed. The error message indicates that it cannot find the instance.

    Do you have a SQL Server Express instance running on your machine? If yes, please check if the instance service is running.

    SQL Server Express is usually installed as a named instance. Please navigate to All Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager, expand SQL Server 2008 Services, see if the instance is running and check the SQL Server instance name, like "SQLEXPRESS".

    After that, please open Visual Studio, go to Tools -> Options, check Show all setting, click Database Tools -> Database Connections and see if “SQL Server Instance Name” is the same as the instance name in the previous step. If not, type the correct instance name we got and press OK to save the changes.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Get or Request Code Sample from Microsoft
    If you have any feedback, please tell us.
    • Marked as answer by Sanping Li Monday, October 17, 2011 3:14 AM
    Thursday, October 13, 2011 7:04 AM

All replies

  • Hi Sanping,

    For your concern, I'm going to help move your post to the SQL Server Express Forum for better support.

    Thanks for your understanding.

    Best Regards,


    Andrew Wu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, October 13, 2011 6:33 AM
  • Hi Sanping,

    Creating a SQL Server database with Microsoft SQL Server Database File requires an instance of SQL Server Express instance installed. The error message indicates that it cannot find the instance.

    Do you have a SQL Server Express instance running on your machine? If yes, please check if the instance service is running.

    SQL Server Express is usually installed as a named instance. Please navigate to All Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager, expand SQL Server 2008 Services, see if the instance is running and check the SQL Server instance name, like "SQLEXPRESS".

    After that, please open Visual Studio, go to Tools -> Options, check Show all setting, click Database Tools -> Database Connections and see if “SQL Server Instance Name” is the same as the instance name in the previous step. If not, type the correct instance name we got and press OK to save the changes.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Get or Request Code Sample from Microsoft
    If you have any feedback, please tell us.
    • Marked as answer by Sanping Li Monday, October 17, 2011 3:14 AM
    Thursday, October 13, 2011 7:04 AM
  • Thanks Jian, that's spot on!

    Sanping

    Monday, October 17, 2011 3:15 AM