Re: A script to capture Orphan userids

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Keith Kratochvil (sqlguy.back2u_at_comcast.net)
Date: 01/19/05


Date: Wed, 19 Jan 2005 11:06:49 -0600

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


Relevant Pages

  • Re: help :Deploying a preconfigured database
    ... Transfer Logins and Passwords Between Instances of SQL Server ... You will want to make sure that you create appropriate script files to set ... lets say that your config requires the SQL Server login 'user.' ...
    (microsoft.public.sqlserver.setup)
  • Re: Copy the Logins
    ... Have a look into the below link, This script will provide a easy method to ... > I have SQL Server 2000 in Machine 'Machine1'. ... In SQL1, some miscellaneous databases> and some logins are there. ...
    (microsoft.public.sqlserver.security)
  • Re: A script to capture Orphan userids
    ... You can use the stored procedure below to get a report ... 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. ...
    (microsoft.public.sqlserver.server)
  • Re: recovering logins
    ... It will generate a script for you where the script includes ... sp_addlogins and sp_grantlogin for your logins. ... The SQL Server logins will be created using the ... > I'm used to sybase where you can just bcp the syslogins table. ...
    (microsoft.public.sqlserver.server)
  • RE: A script to capture Orphan userids
    ... There is a script to do this at www.sqlservercentral.com in their script ... "Do Park via SQLMonster.com" wrote: ... 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. ...
    (microsoft.public.sqlserver.server)