Hi,
On a SQL 2000 SP2 box that pre-dates me, I have some databases that came
from who knows where, and in the sysusers table there are some orphaned
records (no master..syslogins records that match on sid) which are aliases
(isaliased = 1). I'd like to clean them up, but sp_dropalias won't work if
the corresponding login does not exist on the server. I imagine that I can
use "EXEC sp_configure 'allow updates', 1" and directly delete the sysusers
table. Is there a better way?

Signature
Thank you,
Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org
Erland Sommarskog - 25 Mar 2008 00:28 GMT
> On a SQL 2000 SP2 box that pre-dates me,
SQL 2000 SP2?
> I have some databases that came from who knows where, and in the
> sysusers table there are some orphaned records (no master..syslogins
[quoted text clipped - 3 lines]
> sp_configure 'allow updates', 1" and directly delete the sysusers table.
> Is there a better way?
sp_change_users_login and map the users to a login, if only temporarily?
Updating the system tables should be avoided at all cost, I think.

Signature
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx