November 27, 2008 at 6:21 am
Can you tell me how to deal with logins that are inherited together with database from other server? To the new server I restore databases that were used on other server. Now I have logins under those databases but not under server security.
I needed to have this login also under server so I created it however I cannot map this account to those databases. I got message that this database already has such an account. Can you help you, how I can link the login from server security with login from database security, it has access to that database from external server?
November 27, 2008 at 6:28 am
use the stored procedure: sp_change_users_login (see BOL for usage)
November 27, 2008 at 6:40 am
That was it! Thank you! 😀
December 9, 2008 at 3:44 am
Hi
Now I have opposite problem. I have overwritten the database on the production server with the one from development. The one from development environment had different login (for example login_dev). Now when I look at the new production database permission there is only the login from development visible (login_dev). However when I look at the servers security, there this database name is linked to the production login (login_prd).
First, how that is possible that people can connect to that database using the login_prd (as in the database properties it is not specified)?
Second, if I can correct it also using
USE AdventureWorks;
GO
EXEC sp_change_users_login 'Auto_Fix', 'Mary', NULL, 'B3r12-3x$098f6';
GO
December 9, 2008 at 6:24 am
exec sp_change_users_login 'Update_One', 'Current user in DB', 'SQL login to link to'
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply