Hello
We've had problems about orphan userids in Development SQL server. Application DBAs restore databases from Production SQL server a lot of time. So I'd like to set up an automation using a script to catch orphan ids.
Is it possible to use a script to capture(or select) orphan ids?
Thanks in advance,
Do.
--
Message posted via http://www.sqlmonster.comHi do Park,
You can use the stored procedure below to get a report
exec sp_change_users_login 'Report'
Details in the following article:
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
Yih-Yoon Lee
Do Park via SQLMonster.com wrote:
> Hello
> We've had problems about orphan userids in Development SQL server. Application DBAs restore databases from Production SQL server a lot of time. So I'd like to set up an automation using a script to catch orphan ids.
> Is it possible to use a script to capture(or select) orphan ids?
> Thanks in advance,
> Do.
>|||There is a script to do this at www.sqlservercentral.com in their script
library...
Brad Feaker
Ex nihilo, nihil fit
"Do Park via SQLMonster.com" wrote:
> Hello
> We've had problems about orphan userids in Development SQL server. Application DBAs restore databases from Production SQL server a lot of time. So I'd like to set up an automation using a script to catch orphan ids.
> Is it possible to use a script to capture(or select) orphan ids?
> Thanks in advance,
> Do.
> --
> Message posted via http://www.sqlmonster.com
>|||As Yih-Yoon Lee has posted, the solution is to use sp_change_users_login
I have found this article helpful. It contains a couple of stored
procedures that allow you to script logins and their SID. You can use these
to create logins on "downstream" (non-production) servers. As long as users
are created somewhere and their SIDs are carried forward you should not end
up with orphaned users.
HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://www.support.microsoft.com/?id=246133
--
Keith
"Do Park via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:9ba509aa5f3a4496ba55516802843699@.SQLMonster.com...
> Hello
> We've had problems about orphan userids in Development SQL server.
Application DBAs restore databases from Production SQL server a lot of time.
So I'd like to set up an automation using a script to catch orphan ids.
> Is it possible to use a script to capture(or select) orphan ids?
> Thanks in advance,
> Do.
> --
> Message posted via http://www.sqlmonster.com
No comments:
Post a Comment