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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 sql server connect to database
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Constraint Violating Yak Guru

332 Posts

Posted - 02/12/2013 :  18:02:42  Show Profile  Reply with Quote
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.

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

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?

Almighty SQL Goddess

38200 Posts

Posted - 02/12/2013 :  19:17:40  Show Profile  Visit tkizer's Homepage  Reply with Quote
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

Subscribe to my blog
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000