본문 바로가기
Preferences

SQL Server Express 2014 , ADO.NET TLS 1.2 지원 설정

by Hwoarang757 2018. 7. 11.

SQL Server Express 2014 , ADO.NET TLS 1.2 지원 설정

 

보안취약점 조치로 인해 SSL3.0 , TLS 1.0 , TLS 1.1을 모두 비활성 조치 하게 되었습니다

아래와 같이 레지스트리를 설정 하였습니다.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
"Enabled"=dword:00000000
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
"Enabled"=dword:00000000
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]
"Enabled"=dword:00000000
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server]
"Enabled"=dword:00000000
"DisabledByDefault"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"DisabledByDefault"=dword:00000000
"Enabled"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"Enabled"=dword:00000001
"DisabledByDefault"=dword:00000000

 

문제는 Microsoft SQL Server Express 2014 서비스가 시작 되지 않아 (EventLog TLS 관련 에러 발생 함 )

방법을 찾은 부분은 SQL Server Server Service Pack 2를 설치 하여 보았습니다.

https://www.microsoft.com/en-us/download/details.aspx?id=53168

Service Pack 2를 설치 하고 나서 , SQL Service 를 시작하여 보니 정상적으로 서비스가 시작 됩니다.

 

이 후에 문제가 발생한 건은 몇 가지의 테스트 프로그램에서 DB 접속 시에 SQLOLEDB Provider를 이용하여 접속을 진행하면 실패 합니다 -_-;;

방법을 찾은 부분은 인터넷을 찾다보니 SQL Server Native Client를 이용하란 얘기였습니다 ,

Provider를 SQLNCLI11 , DataTypeCompatibility=80; 키워드를 삽입 후 테스트 시에 마찬가지로 실패가 발생하였습니다.

 

해결 방안을 찾은 것은

https://support.microsoft.com/ko-kr/help/3135244/tls-1-2-support-for-microsoft-sql-server

위의 URL에서 SQL Server Native Client (예: SQL Server 2012와 SQL Server 2014) 구성요소를 설치 한 후에

Connection String을 수정 후에 정상적으로 접속 되었습니다.

Provider=SQLNCLI11;Password=xxxxx!;User ID=xxxxx;Initial Catalog=DB_NAME;Data Source=localhost,37457;DataTypeCompatibility=80;