PowerShell for SQL Server Essentials

Manage and monitor SQL Server administration and application deployment with PowerShell

PowerShell for SQL Server Essentials

Donabel Santos

2 customer reviews
Manage and monitor SQL Server administration and application deployment with PowerShell
Mapt Subscription
FREE
€29.98/m after trial
eBook
€12.60
RRP €17.98
Save 29%
Print + eBook
€23.99
RRP €23.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
€0.00
€12.60
€23.99
€29.98p/m after trial
RRP €17.98
RRP €23.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781784391492
Paperback186 pages

Book Description

PowerShell for SQL Server Essentials helps us to manage and monitor server administration and application deployment. Use PowerShell along with SQL Server to perform common DBA tasks.

Starting with a basic introduction to PowerShell, the initial chapters will provide the SQL Server professional PowerShell fundamentals, covering topics such as PowerShell notations and syntax, cmdlets, pipeline, and getting help. Succeeding chapters build upon these fundamentals, and illustrate how to administer and automate SQL Server. Tasks covered throughout include profiling the SQL Server instance, performing backup and restores, invoking T-SQL scripts using PowerShell, and monitoring jobs, security, and permissions.

Packed with practical examples and numerous ready-to-use snippets, this book gets you to an intermediate level in using PowerShell for SQL Server.

Table of Contents

Chapter 1: Getting Started with PowerShell
A brief history of PowerShell
The PowerShell environment
PowerShell versions
PowerShell cmdlets
PowerShell providers
Snap-ins and modules
PowerShell Pipeline
Scripting basics
Running PowerShell scripts
Getting help
Summary
Chapter 2: Using PowerShell with SQL Server
SQL Server via PowerShell
SQL Server-specific cmdlets
SQL Server Management Objects
Summary
Chapter 3: Profiling and Configuring SQL Server
Current server resources
Hotfixes and service packs
Current SQL Server instances
Services and service accounts
SQL Server error logs
Current instance configuration
Changing configurations
Summary
Chapter 4: Basic SQL Server Administration
Listing databases and tables
Adding files and filegroups
Checking enabled features
Scripting database objects
Attaching and detaching databases
Backing up and restoring databases
Reorganizing or rebuilding indexes
Managing logins, users, and permissions
Policies
Managing jobs
Summary
Chapter 5: Querying SQL Server with PowerShell
To PowerShell or not to PowerShell
Sending queries to SQL Server
Fixing orphaned users
Getting fragmentation data
Backing up and restoring databases
Exporting data using bcp
Summary
Chapter 6: Monitoring and Automating SQL Server
Getting to know helpful cmdlets
Scheduling PowerShell scripts
Checking logs
Monitoring failed jobs
Alerting on disk space usage
Logging blocked processes
Getting performance metrics
Summary

What You Will Learn

  • Create scripts using PowerShell to manage and monitor server administration and application deployment
  • Automate the creation of SQL Database objects through PowerShell with the help of the SQL Server module (SQLPS) and SQL Server snap-ins
  • Use PowerShell to work with SQL Server specific providers and cmdlets
  • Identify and manage SQL Server services, instances, settings, and confi gurations
  • Profile your SQL Server instances and export current configurations to a file
  • Monitor SQL Server jobs and alerts
  • Manage logins, database users, and instance security and permissions
  • Invoke T-SQL queries from PowerShell and export results
  • Accomplish tasks from your DBA daily/weekly/monthly/yearly checklists with PowerShell

Authors

Table of Contents

Chapter 1: Getting Started with PowerShell
A brief history of PowerShell
The PowerShell environment
PowerShell versions
PowerShell cmdlets
PowerShell providers
Snap-ins and modules
PowerShell Pipeline
Scripting basics
Running PowerShell scripts
Getting help
Summary
Chapter 2: Using PowerShell with SQL Server
SQL Server via PowerShell
SQL Server-specific cmdlets
SQL Server Management Objects
Summary
Chapter 3: Profiling and Configuring SQL Server
Current server resources
Hotfixes and service packs
Current SQL Server instances
Services and service accounts
SQL Server error logs
Current instance configuration
Changing configurations
Summary
Chapter 4: Basic SQL Server Administration
Listing databases and tables
Adding files and filegroups
Checking enabled features
Scripting database objects
Attaching and detaching databases
Backing up and restoring databases
Reorganizing or rebuilding indexes
Managing logins, users, and permissions
Policies
Managing jobs
Summary
Chapter 5: Querying SQL Server with PowerShell
To PowerShell or not to PowerShell
Sending queries to SQL Server
Fixing orphaned users
Getting fragmentation data
Backing up and restoring databases
Exporting data using bcp
Summary
Chapter 6: Monitoring and Automating SQL Server
Getting to know helpful cmdlets
Scheduling PowerShell scripts
Checking logs
Monitoring failed jobs
Alerting on disk space usage
Logging blocked processes
Getting performance metrics
Summary

Book Details

ISBN 139781784391492
Paperback186 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

SQL Server 2014 with PowerShell v5 Cookbook Book Cover
SQL Server 2014 with PowerShell v5 Cookbook
€ 51.58
€ 36.12
SQL Server 2012 with PowerShell V3 Cookbook Book Cover
SQL Server 2012 with PowerShell V3 Cookbook
€ 34.78
€ 24.36
Git: Version Control for Everyone Book Cover
Git: Version Control for Everyone
€ 22.78
€ 15.96
Learning Docker Book Cover
Learning Docker
€ 40.78
€ 8.16
Microsoft SQL Server 2012 Performance Tuning Cookbook Book Cover
Microsoft SQL Server 2012 Performance Tuning Cookbook
€ 34.78
€ 24.36
Mastering Windows PowerShell Scripting Book Cover
Mastering Windows PowerShell Scripting
€ 40.78
€ 28.56