BUILTIN \ Administrators deleted - how to cancel it

SQL Server 2000 Standard, Windows 2003
My employee removed the "BUILTIN \ Administrators" group from SQL Server, which resulted in the SQL Server Agent not working. All my TSQLs for database synchronization have stopped working.

I have administrator rights on the server and my database user is in the sysadmin role.

Does anyone have any ideas how to get "BUILTIN \ Administrators" back without restoring the main database from backup?

Edit: When I try to add administrators or MACHINENAME \ Administrators using Enterprise Manager, I have this group in the list, but if I accept my choice, I have an error:

Error 15041: Windows NT user or group 'MACHINENAME\Administrators' not found. Check the name again

of course, instead of MACHINENAME I see the name of my server

Edit2: Found it

  • Login as sysadmin
  • Run the following TSQL
    EXEC sp_grantlogin 'BUILTIN\Administrators'
    and
    EXEC sp_addsrvrolemember 'BUILTIN\Administrators','sysadmin'
+3
source share
3 answers

You do not want to add "BUILTIN \ Administrators" again, as this is a SQL Server 2000 security error. All domain administrators will have full sysadmin rights on your SQL Server to reset databases, etc.

Locate the account on which the SQL agent is running (right-click the SQL Server agent in the enterprise manager and select properties). Then add this account as a login to SQL Server using Windows Authentication and add it to the sysadmin fixed server role.

+3
source

SQL Server "NT AUTHORITY\SYSTEM". , SQL Server Management Studio . reset sa.

+1

Using Enterprise Manager, you can not just log in and add "Administrators" as a Windows login to the server? Then add the login to the sysadmin role?

If you cannot use Administrators, try MACHINENAME \ Administrators (obviously replacing MACHINENAME with the actual name).

Sorry, I do not have a more definitive answer, I really do not want to try it :)

0
source

Source: https://habr.com/ru/post/1697559/


All Articles