[error] Unable to connect to SQL Server database.

  • When running the following commands:

    Setting environment for using Microsoft Visual Studio 2010 x86 tools.

    C:\Program Files\Microsoft Visual Studio 10.0\VC>aspnet_regsql

    I got the following error, after trying to set the wizard using Windows Authentication

    Setup failed.

    Exception:

    Unable to connect to SQL Server database.

    ----------------------------------------

    Details of failure

    ----------------------------------------

    System.Web.HttpException (0x80004005): Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException (0x80131904): 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)

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

    at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity)

    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject)

    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)

    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)

    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)

    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)

    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)

    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)

    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

    at System.Data.SqlClient.SqlConnection.Open()

    at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)

    at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)

    at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)

    at System.Web.Management.ConfirmPanel.Execute()

    Services running:

    SQL Server

    SQL Server Browser

    SQL Server VSS Writer

    Within SQL Server Configuration Manager

    SQL Server Network Configuration

    Shared memory Enabled

    TCP/IP Enabled

    I restarted and still aspnet_regsql cannot query SQL Server for the databases available. SQL Server 2008 cannot be installed, because I could not find the appropriate instructions or the navigation within the installation wizard.

    Any ideas?

  • have you checked the SQL errorlog for any login failure messages?

    ---------------------------------------------------------------------

  • on the third step of the wizard you are required to supply credentials for a sql server instance.

    Verify the instance name you are using and that the windows account. Also verify the sql server instance is configured correctly

    is this a local instance or remote?

    is this an express edition or full (standard, enterprise, etc)?

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Perry Whittle (6/20/2010)


    on the third step of the wizard you are required to supply credentials for a sql server instance.

    Verify the instance name you are using and that the windows account. Also verify the sql server instance is configured correctly

    is this a local instance or remote?

    local

    is this an express edition or full (standard, enterprise, etc)?

    express

  • Jon-538504 (6/20/2010)


    Perry Whittle (6/20/2010)


    on the third step of the wizard you are required to supply credentials for a sql server instance.

    Verify the instance name you are using and that the windows account. Also verify the sql server instance is configured correctly

    is this a local instance or remote?

    local

    is this an express edition or full (standard, enterprise, etc)?

    express

    Ok, so check the instance name you are supplying to the aspnet reg utility!

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Surprisingly no errors were logged at C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG, at the date/time of running this wizard.

    The problem still seems to be that the wizard is not recognizing the server name (in my case 'ARMANI'), and this is confirmed, because when running the wizard the list of databases cannot be queried by the wizard with this tool. This problem does not occur with Visual Studio 2010 which is installed on the same machine. Has anyone encountered similar issues with this tool?

    C:\Program Files\Microsoft Visual Studio 10.0\VC>aspnet_regsql

    ERRORLOG.3 - information

    2010-06-21 18:25:24.92 Server Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (Intel X86)

    Mar 29 2009 10:27:29

    Copyright (c) 1988-2008 Microsoft Corporation

    Express Edition on Windows NT 5.1 <X86> (Build 2600: Service Pack 3)

    2010-06-21 18:25:24.92 Server Error: 17054, Severity: 16, State: 1.

    2010-06-21 18:25:24.92 Server The current event was not reported to the Windows Events log. Operating system error = 1502(The event log file is full.). You may need to clear the Windows Events log if it is full.

    2010-06-21 18:25:24.92 Server (c) 2005 Microsoft Corporation.

    2010-06-21 18:25:24.92 Server All rights reserved.

    2010-06-21 18:25:24.92 Server Server process ID is 3708.

    2010-06-21 18:25:24.92 Server Authentication mode is WINDOWS-ONLY.

    2010-06-21 18:25:24.92 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.

    2010-06-21 18:25:24.92 Server This instance of SQL Server last reported using a process ID of 2500 at 6/21/2010 6:22:44 PM (local) 6/21/2010 4:22:44 PM (UTC). This is an informational message only; no user action is required.

    2010-06-21 18:25:24.92 Server Registry startup parameters:

    -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf

    -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

    -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

    2010-06-21 18:25:25.09 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

    2010-06-21 18:25:25.17 Server Detected 2 CPUs. This is an informational message; no user action is required.

    2010-06-21 18:25:25.65 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

    2010-06-21 18:25:25.81 Server Node configuration: node 0: CPU mask: 0x00000003 Active CPU mask: 0x00000003. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.

    2010-06-21 18:25:28.37 spid6s Starting up database 'master'.

    2010-06-21 18:25:29.99 spid6s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.

    2010-06-21 18:25:30.68 spid6s Recovery completed for database master (database ID 1) in 1 second(s) (analysis 148 ms, redo 42 ms, undo 63 ms.) This is an informational message only. No user action is required.

    2010-06-21 18:25:31.81 spid6s FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'SQLEXPRESS'.

    2010-06-21 18:25:32.68 spid6s SQL Trace ID 1 was started by login "sa". What is the default password?

    2010-06-21 18:25:32.85 spid6s Starting up database 'mssqlsystemresource'.

    2010-06-21 18:25:33.32 spid6s The resource database build version is 10.00.2531. This is an informational message only. No user action is required.

    2010-06-21 18:25:36.66 spid10s Starting up database 'model'.

    2010-06-21 18:25:36.69 spid6s Server name is 'ARMANI\SQLEXPRESS'. This is an informational message only. No user action is required.

  • so on the third step of the wizard where you select the server and database, what server name are you typing into the server name box?

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • ARMANI or armani

  • Jon-538504 (6/22/2010)


    Server name is 'ARMANI\SQLEXPRESS'.

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Thanks

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply