BuiltIN\Administrator Account burning issue

  • i have deleted Builtin\Administrator Account accidently & need to add again how i can do that, any help is appreicated & thanking in advance.

  • Add it the same way you would add any login to SQL Server.

     

     

  • 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

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply