2012년 2월 12일 일요일

[MS SQL Server] Connection string for connecting to data sources




connection string to connect to sql server database


connectionString="Data Source=YUK-PC\SQLEXPRESS;Initial Catalog=NorthwindNET;Integrated Security=SSPI"


            providerName="System.Data.SqlClient

Data Source : Sql Server가 실행되고 있는 컴퓨터의 이름, 간단히 "(local)"  이라고 입력 가능


DataBase(Initial Catalog) : 연결할 DataBase 의 이름


Integrated Security
Sql Server에 연결 및 접근하기 위한 현재 윈도우 사용자의 인증 설정
- true(yes) : 현재 윈도우 계정 자격증명이 인증에 사용되는 경우
- false(no) : sql 연결 ID와 Password가 사용되는 경우
- sspi : true 설정과 같음.
*) User ID 및 Password 를 지정한 후 Integrated Security 값을 true 로 설정한다면 User ID 및 Password 설정을 무시하고 현재 윈도우 사용자의 인증 설정이 사용된다.




cf) connection string for connecting to data sources - VKInfotek
cf) SqlConnection.ConnectionString Property - MSDN

@

댓글 없음:

댓글 쓰기