SQL Server 데이터베이스에 연결할 수 없습니다.SQL Server 데이터베이스에 연결할 수 없습니다.
MSDN 자습서를 사용하여 웹 사이트에서 역할로 구성원 자격을 설정하려고합니다. 내 컴퓨터에서만 로컬로 작업했지만, 다른 포럼에서 제공 한 조언을 따르고 stackoverflow에서 상황이 악화되었습니다. 이제는 SQL Server 데이터베이스에도 연결할 수 없습니다.
"Setup failed.
Exception:
Unable to connect to SQL Server database.
----------------------------------------
Details of failure
----------------------------------------
System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: 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(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, 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)
--- End of inner exception stack trace ---
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.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()"
는 또한, 내가 ASP.NET 웹 사이트 Adimistration 도구를 사용할 수 없습니다입니다 :
나는 aspnet.regsql.exe 유틸리티를 실행
, 나는 다음과 같은 오류 메시지가 나타납니다. 나는 보안 탭을 클릭하면 나는 다음과 같은 오류가 나타날 수 있습니다"There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Unable to connect to SQL Server database."
그래서, 나를 바이더를 선택할 수 있습니다 지침에 따라 '선택 데이터 저장소'버튼을 클릭합니다. 공급자 이름은 'AspNetSqlProvider'이며, 옆에 Test 링크가 있습니다. 테스트를 클릭하고 다음 오류 메시지가 나타납니다.
"Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider."
이 페이지의 유일한 다른 옵션은 "뒤로"입니다.
누군가이 문제를 해결할 수 있습니까? 지금은 1 주일이 넘었고 답을 찾기 위해 높거나 낮게 검색했으며 아무런 도움이되지 않은 게시물에 너무 많은 링크가 주어졌습니다. 나는 어떤 도움을 주셔서 감사합니다.
구성 표피 도구를 실행하고 파이프, 로컬/원격 연결을 사용할 수있게 해 봤지만 아무런 효과가 없었습니다.
Visual Web Developer와 SQL Server 2005 및 2008을 완전히 제거하고 이러한 응용 프로그램의 모든 흔적을 삭제 한 다음 다시 다운로드 한 다음 다시 설치했습니다.
지금까지 행운이 없습니다.
는 감사Bael
편집 도와주세요 :
행운과 포트를 변경 내 방화벽을 해제하려 이후이 있습니다.
해결 :
예,이 조금 과감한 될 수있다. 그리고 나는이 솔루션이 다른 모든 것이 실패 할 때 최후의 수단이되어야한다고 생각합니다.SQL Server 2005 및 2008을 제거하면 문제가 무엇이든 해결할 수있었습니다. 그런 다음 등록하여 SQL Server Express Edition 2008 (관리 도구 포함)을 다운로드하고 설치하십시오. 설치가 완료
후, 나는
로컬 또는 원격으로 sqlcmd에 연결할 수 없습니다. Windows 인증을 사용하고 있습니다. 나는이 옵션을 변경할 수 없다. 왜냐하면 나는 관리자의 신빙성을 가지고 aspnet_regsql을 실행하고있다. 나는 단지 righr-clicked하고 admin으로 실행되도록 선택했다. (비록 내가 이미 admin으로 실행 중임에도 불구하고) 단계를 따라 가면서 똑같은 오류 메시지를 받았다. –
SQL Server Management Studio (관리자로 실행)를 사용하여 연결할 수 있습니까? 그렇다면 인스턴스 이름이 무엇인지 확인하십시오. YourServer입니까? 또는 YourServer \ SomeInstanceName입니까? 올바르게 지정했는지 확인해야합니다. –
SQL Server Management Studio를 지금 다운로드 중입니다. 고마워. –