Automation
Automation
PowerShell
Query Optimization
o A Query Plan (Query Execution plan) is an o Execution Plan
ordered set of steps used to access data in a SQL
relational database management system o Statistics time/io
o No Single solution is available for
o To read execution plan use
o Spooling Sample (Copying a data)
Fixed server-level role Description
sysadmin Members of the sysadmin fixed server role can perform any activity in the server.
serveradmin Members of the serveradmin fixed server role can change server-wide configuration
options and shut down the server.
securityadmin Members of the securityadmin fixed server role manage logins and their properties.
They can GRANT, DENY, and REVOKE server-level permissions. They can
also GRANT, DENY, and REVOKE database-level permissions if they have access to a
database. Additionally, they can reset passwords for SQL Server logins.
IMPORTANT: The ability to grant access to the Database Engine and to configure user
permissions allows the security admin to assign most server permissions.
The securityadmin role should be treated as equivalent to the sysadmin role. As an
alternative, starting with SQL Server 2022 (16.x), consider using the new fixed server
role ##MS_LoginManager##.
processadmin Members of the processadmin fixed server role can end processes that are running in
an instance of SQL Server.
setupadmin Members of the setupadmin fixed server role can add and remove linked servers by
using Transact-SQL statements. (sysadmin membership is needed when using
Management Studio.)
bulkadmin Members of the bulkadmin fixed server role can run the BULK INSERT statement.