PDA

View Full Version : SQL Logins and DB User associations


TechPG
06-11-2010, 10:35 AM
I created a SQL Login named "abcd" and my restored db has a user called "abcd". Normally once I do a restore from an external source, i have to run the following SQL to tie the SQL Login to the DB user.

sp_change_users_login 'Update_one', 'abdc', 'abcd'

I ran the query, but am getting a SQL message that "permission was denied" on the first select to the db. In the web.config file, the user and password are encrypted and work in other environments.

TechPG
06-11-2010, 12:50 PM
I solved it by just getting the encryped username and password for the default login user and put that in the web config file and didn't use the one that I had.