SQL Server Login error: Login failed for user 'NT AUTHORITY\SYSTEM'

前端 未结 5 705
野性不改
野性不改 2020-11-29 01:39

I have created an application pool called \"schoolPool\" and assigned it to my web application. Identity for this pool has been set to LocalSystem. When I try to access my

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-29 02:00

    There is another fix. You should open Command Prompt (cmd) and write the following:

    sqlcmd -S (server name)

    select name from sys.server_principals where name = 'NT AUTHORITY\SYSTEM'
    
    go
    
    SP_ADDSRVROLEMEMBER 'NT AUTHORITY\SYSTEM','SYSADMIN'
    
    go
    

    The first line will give you an access to the sql server on you machine, the second will take the following result NT AUTHORITY\SYSTEM an the stored procedure addsrvrolemember will add sysadmin to it. Be careful, because you have to type the following code the way it is.

提交回复
热议问题