Thursday, February 16, 2012

BUILTIN\administrators translation

Hi,
I have a line of code in an application
"sp_revokelogin [BUILTIN\Administrators]"
which fails on installations on German XP but works OK for English.
Is there a translation for 'BUILTIN'? I have tried
[BUILTIN\Administratoren] but that doesn't help - always get the message
" Windows NT user or group 'BUILTIN\Administratoren' not
found. Check the name again"
Hope someone with a German server can help!
(I also need the corresponding names for French, Spanish etc.)BUILTIN\Administrators has a "well known" SID so you could use this
declare @.builtin nvarchar(128)
select @.builtin = suser_sname(0x01020000000000052000000020
020000)
exec sp_revokelogin @.builtin
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"quilkin" <quilkin@.discussions.microsoft.com> wrote in message
news:72599A0C-028D-47A1-B63E-120EDC4C1065@.microsoft.com...
> Hi,
> I have a line of code in an application
> "sp_revokelogin [BUILTIN\Administrators]"
> which fails on installations on German XP but works OK for English.
> Is there a translation for 'BUILTIN'? I have tried
> [BUILTIN\Administratoren] but that doesn't help - always get the messa
ge
> " Windows NT user or group 'BUILTIN\Administratoren' not
> found. Check the name again"
> Hope someone with a German server can help!
> (I also need the corresponding names for French, Spanish etc.)
>|||Jasper,
That works fine, thanks.
I knew there'd be a simple answer.
"Jasper Smith" wrote:

> BUILTIN\Administrators has a "well known" SID so you could use this
> declare @.builtin nvarchar(128)
> select @.builtin = suser_sname(0x01020000000000052000000020
020000)
> exec sp_revokelogin @.builtin
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "quilkin" <quilkin@.discussions.microsoft.com> wrote in message
> news:72599A0C-028D-47A1-B63E-120EDC4C1065@.microsoft.com...
>
>

No comments:

Post a Comment