I have been trying to understand what using trusted_connection=true
in a SQL Server connection string (from within C#) means. I understand that it uses the current Windows user credentials to connect to the database. But does it mean the database server and the current user can be in different domains, same domain or in different but trusted domains ?
Asked
Active
Viewed 736 times
0

Cygnus
- 3,222
- 9
- 35
- 65
1 Answers
0
trusted_connection=true
means Integrated Security=SSPI;
If this is not present in connection string then you need to specify userid and password in connection string as:
server=yourservername;database=yourdatabase;user id=YourUserID;password=password
If any of two (Trusted_Connection=true or Integrated Security=true/SSPI
) is present , then the Windows credentials
of the current user are used to authenticate against SQL Server
and any useriD=userid and password=password text will be ignored.
Whichever number of users may present and fromwhichever user you may have logged in, it will ignore the stuff if:
Trusted_Connection=true

C Sharper
- 8,284
- 26
- 88
- 151
-
I am sorry, but that does not directly answer my question. Could give more details regarding what I asked about the domains ? – Cygnus Oct 09 '13 at 05:41
-
when trusted_connection=true , domains and user login database thing is ignored – C Sharper Oct 09 '13 at 05:51