00198260-01_IM_SQL_Server_2016_EN.pdf - 第41页

SQL Server 2016 / I nstallation Manual 12/2016 Edition 41 ► Right - click the Microsoft SQL Server 2016 Managem ent Studio . Figure 5-17: Starting SQL Server 2016 Management Studio ► Select Run as administrator . ► Accep…

100%1 / 46
SQL Server 2016 / Installation Manual 12/2016 Edition
40
5.3 Missing Settings
5.3.1 Assigning SQL SysAdmin Role to the Administrators Group
If you have missed to assign SQL SysAdmin permissions to the administrators group during the
SQL installation, some ASM setups might have problems connecting to your SQL Server.
This section describes how to solve this problem.
Click the Start/Windows button.
Expand the All apps group.
Expand Microsoft SQL Server 2016
Select Microsoft SQL Server 2016 Management Studio.
Figure 5-16: Selecting SQL Server 2016 Management Studio
SQL Server 2016 / Installation Manual 12/2016 Edition
41
Right- click the Microsoft SQL Server 2016 Management Studio.
Figure 5-17: Starting SQL Server 2016 Management Studio
Select Run as administrator.
Accept any possibly appearing User Account Control message by clicking its Yes button.
SQL Server 2016 Management Studio starts and the Connect to Server window is displayed.
Figure 5-18: Connecting to the SQL instance using SQL Authentication
Ensure that the correct SQL instance is entered as Server name:.
The correct naming is <ComputerName>\<InstanceName> for user defined instances. If you
installed a default SQL instance (internal name MSSQLSERVER), you only have to enter the
computer name instead.
Ensure that SQL Server Authentication is selected (since the administrators group does not
have proper permissions).
Enter the Login and Password for the sa user (SysAdmin).
Click the Connect button to connect to the SQL instance.
SQL Server 2016 / Installation Manual 12/2016 Edition
42
SQL Server 2016 Management Studio connects to the SQL instance.
Figure 5-19: Starting New Query
Click the New Query button.
Paste the following text in the new query window:
CREATE LOGIN [BUILTIN\Administrators] FROM WINDOWS WITH
DEFAULT_DATABASE=[master]
GO
EXEC master..sp_addsrvrolemember @loginame = N'BUILTIN\Administrators',
@rolename = N'sysadmin'
GO
Figure 5-20: Executing the query
Click the ! Execute button.
You have now assigned the administrators group to the SQL SysAdmins role.