Powershell for SQL server essentials manage and monitor SQL Server administration and application deployment with Powershell

This book is written for SQL Server administrators and developers who want to leverage PowerShell to work with SQL Server. Some background with scripting will be helpful but not necessary.

Detalles Bibliográficos
Otros Autores: Santos, Donabel, author (author), Pedley, Rebecca, editor (editor), Rajani, Meeta, editor, Monteiro, Gladson, editor, Mukundan, Veena, editor, Paiva, Alfida, editor
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham, England ; Mumbai, [India] : Packt Publishing 2015.
Edición:1st edition
Colección:Community experience distilled.
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009628911106719
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Author; Acknowledgments; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Getting Started with PowerShell; A brief history of PowerShell; The PowerShell environment; The PowerShell console; The PowerShell ISE; Running PowerShell as an administrator; Execution policy; PowerShell versions; PowerShell cmdlets; Cmdlet naming convention; Cmdlet parameters; Cmdlet aliases; PowerShell providers; Snap-ins and modules; PowerShell Pipeline; Scripting basics; Running PowerShell scripts; Getting help; Getting help from other cmdlets
  • SummaryChapter 2: Using PowerShell with SQL Server; SQL Server via PowerShell; Mini-shell (or the sqlps utility); The SQLPS module; SQL Server snap-ins; SQL Server assemblies; SQL Server-specific cmdlets; SQL Server Management Objects; Creating SMO objects; Summary; Chapter 3: Profiling and Configuring SQL Server; Current server resources; Getting processor (CPU) information; Checking server memory; Checking disk space; Checking network settings; Hotfixes and service packs; Current SQL Server instances; Services and service accounts; SQL Server error logs; Current instance configuration
  • Changing configurationsStart or stop services; Changing a service account; Change instance settings; Summary; Chapter 4: Basic SQL Server Administration; Listing databases and tables; Listing database files and filegroups; Adding files and filegroups; Listing the processes; Checking enabled features; Scripting database objects; Attaching and detaching databases; Detaching databases; Backing up and restoring databases; Backing up; Restoring; Reorganizing or rebuilding indexes; Managing logins, users, and permissions; Permissions; Adding a login; Adding database users; Policies; Managing jobs
  • SummaryChapter 5: Querying SQL Server with PowerShell; To PowerShell or not to PowerShell; Sending queries to SQL Server; SQL Server Management Objects; The Invoke-Sqlcmd cmdlet; ADO.NET; The Invoke-Expression cmdlet; Sending simple queries to SQL Server - different variations; Fixing orphaned users; Getting fragmentation data; Backing up and restoring databases; Exporting data using bcp; Summary; Chapter 6: Monitoring and Automating the SQL Server; Getting to know helpful cmdlets; The Send-MailMessage cmdlet; The ConvertTo-Html cmdlet; The Export-Csv cmdlet; The Write-EventLog cmdlet
  • Additional cmdletsScheduling PowerShell scripts; Checking logs; Monitoring failed jobs; Alerting on disk space usage; Logging blocked processes; Getting performance metrics; Summary; Appendix: Implementing Reusability with Functions and Modules; Functions; Simple functions; Advanced functions; Best practices; Modules; Script modules; Summary; Index