May 27, 2007 at 8:37 am
Hi,
Due to security reasons I removed the group BUILTIN\Administrators from SQL Server 2005 .... (I removed the group, just just removed sysadmin role from the group). If someone really wants it back, is there a simple way to add it back? Appreciate your help ...
Thanks,
Del Piero
May 27, 2007 at 9:14 am
Heh... I'm thinking that those types of questions should be posed and answered BEFORE such action is taken.
I'm a bit confused by your statment of (I removed the group, just just removed sysadmin role from the group). Did you remove the group or just remove the SysAdmin role from the group?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 27, 2007 at 3:24 pm
Sorry I mean to say, I removed the group and NOT just removed sysadmin role from the group.....
Thanks,
Del Piero
May 27, 2007 at 4:55 pm
From everything I could find, you just add it back in as you would any other... the caveat may be that it might be case sensistive. It would also need "SA" privs to be "fully" restored.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 29, 2007 at 6:49 am
I saved this snippet for SQL2000, so i would assume it would still be valid in 2005; hope this helps:
USE master
go
EXEC sp_grantlogin 'BUILTIN\Administrators'
go
EXEC sp_defaultdb 'BUILTIN\Administrators', 'master'
go
EXEC sp_defaultlanguage 'BUILTIN\Administrators', 'us_english'
go
EXEC sp_addsrvrolemember 'BUILTIN\Administrators', 'sysadmin'
go
IF EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname='BUILTIN\Administrators')
PRINT '<<< CREATED LOGIN BUILTIN\Administrators >>>'
ELSE
PRINT '<<< FAILED CREATING LOGIN BUILTIN\Administrators >>>'
go
Lowell
May 29, 2007 at 9:34 am
Jeff's caveat is correct. We have a couple of Binary instances and case sensitivity is definitely something to watch out for.
RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."
May 30, 2007 at 12:25 am
Thanks much!
Del Piero
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply