0% found this document useful (0 votes)
115 views

Automation

This document discusses automating SQL Server tasks using PowerShell modules and provides information about query optimization and server-level security roles in SQL Server. It describes modules for automating database development, administration, cube processing, and report servers. It also covers topics like query execution plans, statistics, spooling, and fixed server roles and their descriptions.

Uploaded by

DaniTesfay
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views

Automation

This document discusses automating SQL Server tasks using PowerShell modules and provides information about query optimization and server-level security roles in SQL Server. It describes modules for automating database development, administration, cube processing, and report servers. It also covers topics like query execution plans, statistics, spooling, and fixed server roles and their descriptions.

Uploaded by

DaniTesfay
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Automation

PowerShell

o This module allows SQL Server developers, administrators and


business intelligence professionals to automate database
development and server administration, as well as both
multidimensional and tabular cube processing.
o https://www.powershellgallery.com/packages/SqlServer/22.2.0
o For automation with SSRS & Power BI Report Server, use the
ReportingServicesTools module available at
https://www.powershellgallery.com/packages/ReportingServicesT
ools
₋ Server Level Security
₋ Login
Query Optimization

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.

You might also like