change connection string info

  • In the connection string information to a sql server 2008 r2 database, I am currently setting the integrated security to true. This way I do not need to pass in user name and password. However there are times when the username and password is required.

    When this is the case, can I use a windows identity to pass in the user info? If not, do I need to pass in a sql server username and password?

    Can you tell me what the preferred method is?

  • It would depend on the application using the connection string. The SQL engine doesn't care what method of authentication is used, as long as the user is authenticated.

    You can pass a SQL login / password, but I think the question you mean to ask is 'why am I being asked for my credentials when I'm using integrated security in my connection string?'. I'd guess the login does not have rights to connect, check the SQL error log for failed logins.

  • wendy elizabeth (2/5/2013)


    However there are times when the username and password is required.

    Why?

    wendy elizabeth (2/5/2013)


    can I use a windows identity to pass in the user info?

    Yes, in the connection string set integrated security to true.

    wendy elizabeth (2/5/2013)


    Can you tell me what the preferred method is?

    It depends.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply