2017-01-23 8 views
1

내가 연결하려고에 연결할 수 없습니다, 나는 연결엔티티 프레임 워크가 먼저 DB를 사용하여 DB 인스턴스에 의해 서버

<add name="Entities" 
     connectionString="metadata=res://*/Models.ModelCmarket.csdl|res://*/Models.ModelCmarket.ssdl|res://*/Models.ModelCmarket.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(localdb)\v12.0;initial catalog=Cevaheer;integrated security=True;trustservercertificate=False;multisubnetfailover=True;MultipleActiveResultSets=True;multipleactiveresultsets=True;App=EntityFramework&quot;" 
     providerName="System.Data.EntityClient" /> 

을 만들어 그리고 난 항상 오류 얻을 -

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: 50 - Local Database Runtime error occurred. The specified LocalDB instance does not exist.) 

을 내가

<add name="CevhermarketEntities" 
    connectionString="Data source=(localdb)\v12.0;initial catalog=Cevaheer;integrated security=True;trustservercertificate=False;multisubnetfailover=True;MultipleActiveResultSets=True;user id=dbuser;[email protected]!;multipleactiveresultsets=True;" 
    providerName="System.Data.SqlClient" /> 

을하려고하면하지만 SQL 서버 탐색기와 SSMS VS에서 연결할 수 있습니다 또한 연결하고 있습니다.

답변

1

시작하기 - 당신이 당신에게 need to rename the v11 or v12 to (localdb)\mssqllocaldb

  • 를 시작하기 전에 일반적인 LocalDb SQLEXPRESS는 SQL 서버 연결 오류SQL Network Interfaces, error: 50 - Local Database Runtime error occurred 원인이 될 수 4 문제, 거기 당신은 services running
  • 을 해달라고 firelwall portshere 으로 설정했습니다.
  • 귀하의 설치 63,210
  • 은 가지고 문제/손상 (도움 아래 단계는 당신에게 좋은 깨끗한 출발을)
  • 당신은 내가 가장 간단한은 아래 수행하는 것을 발견하지 rename the V11 or 12 to mssqllocaldb

했다 - 나는 붙어있다 사진과 도움을위한 단계.

먼저 설치 한 예를 확인, 당신은 당신이 할 수있는,이 단계가 실패 할 경우에 cmd를

  1. cmd> Sqllocaldb.exe i
  2. cmd> Sqllocaldb.exe s "whicheverVersionYouWantFromListBefore" 을 실행하여 레지스트리를 확인 하여이 작업을 수행 할 수 있습니다 옵션으로 삭제 dcmd> Sqllocaldb.exe d "someDb"
  3. 만들- PIC는 오류
  4. cmd> Sqllocaldb.exe start "createSomeNewDbIfyouWantDb"

SqlLOCALDb_edited.png

입니다