Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 sql server connect to database

Author  Topic 

jassie
Constraint Violating Yak Guru

332 Posts

Posted - 2013-02-12 : 18:02:42
if the following is in the connection string in an app.config file, the following will use the sql server login and not the
windows user login correct?

The following is a connection string that points to a sql server 2008 r2 database.

<connectionStrings>
<add name="RPCSS_DEVConnectionString"
connectionString="Data Source=dev;Initial Catalog=DEV2;User Id=myUsername;Password=myPassword;"
providerName="System.Data.SqlClient" />
</connectionStrings>

Also can you tell me if there is any way for the windows user name and password to be used when connecting to the
sql server 2008 r2 database? If so, can you tell me what the connection sting would be so I know to avoid that connection string?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2013-02-12 : 19:17:40
That connection string is using SQL authentication, so yes a SQL login and not a Windows login.

You can't specify windows userid/password, you would specify trusted connection though.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -