Monitoring and Managing SQL Server Flashcards
VIEW SERVER STATE
enables the ability to view current activity, including user activity and recent expensive queries
db_accessadmin
fixed database role. Members of this group can grant or remove access to a database for SQL Server Logins, Windows Logins and Windows Groups
db_securityadmin
fixed database role. Members of this role can manage role membership and permissions. Care should be exercised when assigning this role because it can inadvertently lead to privilege escalation for security principles added to the role
db_ddladmin
fixed database role. This role enables users assigned the role to run any DDL Statement in the database. This includes CREATE, ALTER, DROP, ENABLE TRIGGER, DISABLE TRIGGER, TRUNCATE TABLE, and UPDATE STATISTICS
serveradmin
fixed server role. Members of this role can change server-wide configuration options. Members also have the ability to shut down the server
sysadmin
fixed server role. Members of this role can perform any activity on the server
securityadmin
fixed server role. Members of this role manage logins and their properties including the ability to change passwords for SQL Server Logins
VIEW ANY DEFINITION
Grants the ability to view server-level definitions such as server level audit views
VIEW DEFINITION
grants the ability to view database-level definitions such as database level audit views for a specific database
Role required to run DBCC
User must either be sysadmin or db_owner
REBUILD option with ONLINE = ON will not work on any table with one or more of the following:
XML indexes
Spatial indexes
Columnstore indexes
Which is an online defragmentation method?
DBCC DBREINDEX or DBCC INDEXDEFRAG
Also, why should neither be used?
DBCC INDEXDEFRAG can be used for online defragmentation. Neither should be used due to the commands being scheduled for deprecation
In order for Auto Update Statistics Asynchronously to take effect, what must also be set?
Auto Update Statistics
What does AUTO_UPDATE_STATISTICS_ASYNC do?
When enabled, the query optimizer will not wait for the update of statistics but will run the query first and update the outdated statistics afterwards. The query will run with the current statistics and a background process will start to update the statistics in a different thread.
What is a synchronous statistic update?
The query optimizer will update the outdated statistics before compiling the query therefore possibly getting a better plan based on the most current statistics