Re: Clean up Broken Aliases

From: John (Notme@yourmailbox.com)
Date: 02/26/03


From: "John" <Notme@yourmailbox.com>
Date: Tue, 25 Feb 2003 23:01:54 -0600


security <> securitytools. Pleas post to the right group.
"Dan Jameson" <djameson@childrensoncologygroup.org> wrote in message
news:e7r$H9R3CHA.1396@TK2MSFTNGP09.phx.gbl...
> Hi,
>
>
>
> I'm cleaning up excess logins on our SQL Server 2000 server. Several of
the
> databases started life as SQL Server 6.5 databases on a different server.
I
> have found several entries in the sysusers table of several databases that
> seem to be broken aliases. I have included some sample data from sysusers
> and sp_helpuser from one of these databases. As you can see, there are
two
> users in the sysusers data that have status = 16, a backslash in front of
> the name, and have isaliased = 1. You can also see that these two names
are
> not in the first record set from sp_helpuser and that there are two NULL
> aliases in the second record set from sp_helpuser. These two names cause
> sp_revokedbaccess and sp_dropalias to error-out on a bad name. Also, they
> do not match any server logins on name or SID.
>
> I see this pattern in several databases. Can I just give myself
permission
> to update system tables and delete these entries for these broken aliases?
> Or, is there a way to fix these aliases so they can be dropped with
> sp_dropalias?
>
>
> --
> Thank you,
> Daniel Jameson
> Children's Oncology Group
> http://www.childrensoncologygroup.org
>
>
>
>
>
> select
> uid, status, name, roles,
>
hasdbaccess,islogin,isntname,isntgroup,isntuser,issqluser,isaliased,issqlrol
> e,isapprole
> from sysusers
> where status > 0
> exec sp_helpuser
>
>
>
>
>
> uid status name roles hasdbaccess islogin isntname
> isntgroup isntuser issqluser isaliased issqlrole isapprole
>
> ------ ------ --------------- ------- ----------- -------- ----------- ---

--
> ------ ----------- ----------- ----------- ----------- -----------
>
> 2      2      guest           0x00    1           1        0           0
> 0           1           0           0           0
>
> 1      2      dbo             0x01    1           1        0           0
> 0           1           0           0           0
>
> 6      6      COG\GOC.IS      0xC0    1           1        1           1
> 0           0           0           0           0
>
> 12     16     \yNikiforova    0x00    0           1        0           0
> 0           0           1           0           0
>
> 9      16     \fPerez         0x00    0           1        0           0
> 0           0           1           0           0
>
> 46     2      webuser         0x00    1           1        0           0
> 0           1           0           0           0
>
>
>
> (6 row(s) affected)
>
>
>
> UserName       GroupName         LoginName     DefDBName    UserID SID
>
> -------------- ----------------- ------------- ------------ ------ -------
--
> ----------------------------------------------------
>
> COG\GOC.IS     db_datareader     COG\GOC.IS    master       6
> 0x01050000000000051500XXXXXXXXXXXXXXXXXXXXXXXX636B84060000
>
> COG\GOC.IS     db_datawriter     COG\GOC.IS    master       6
> 0x01050000000000051500XXXXXXXXXXXXXXXXXXXXXXXX636B84060000
>
> dbo            db_owner          sa            master       1      0x01
>
> guest          public            NULL          NULL         2      0x00
>
> webuser        public            webuser       master       46
> 0xEA2C00XXXXXXXXXXXXXXXXXXXXXXXX91BF
>
>
>
> LoginName        UserNameAliasedTo
>
> ---------------- -------------------
>
> NULL             dbo
>
> NULL             dbo
>
>
>
>


Relevant Pages

  • Re: Clean up Broken Aliases
    ... > I'm cleaning up excess logins on our SQL Server 2000 server. ... > databases started life as SQL Server 6.5 databases on a different server. ... I have included some sample data from sysusers ... > to update system tables and delete these entries for these broken aliases? ...
    (microsoft.public.sqlserver.security)
  • Re: AS2005 ... what is wrong with it?
    ... What I have seen is that the dev server is *faster* than the prod server ... And does your dev server also have all 6 databases with all these roles? ... When I restore the "PROV" i got approx 20 sec. ... Starting from an empty data folder should show if this theory is true ...
    (microsoft.public.sqlserver.olap)
  • 2nd Post - Trouble Getting VS.Net 2003 WalkThrough working
    ... the server. ... MSDE either from the Setup or from the SQL2KDeskSP3 execute. ... it does look like some of the sample databases have been ... >> and they directed me to install MSDE and they attached a ConfigSamples ...
    (microsoft.public.sqlserver.msde)
  • RE: Server Explorer & Databases
    ... As for the visual studio's database server explorer, ... oracle, visual studio generally use the OLD DB provider which is for Oracle ... and support of most general funcctionalitis in latest version of Oracle. ... #Server Explorer for Oracle Databases ...
    (microsoft.public.vsnet.ide)
  • Re: 2nd Post - Trouble Getting VS.Net 2003 WalkThrough working
    ... The fact that the other databases exists phyiscally doesn´t mean that they ... can try to connect to SQL Server using OSL or a GUI. ... The Command OSQL ist for the commandline under DOS. ... > this MSDE either from the Setup or from the SQL2KDeskSP3 execute. ...
    (microsoft.public.sqlserver.msde)

Quantcast