SQL-Server-2014-with-PowerShell-v5-Cookbook.pdf

(26805 KB) Pobierz
SQL Server 2014 with PowerShell v5 Cookbook
Table of Contents
SQL Server 2014 with PowerShell v5 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Instant updates on new Packt books
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There’s more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with SQL Server and PowerShell
Introduction
Working with SQL Server and PowerShell
Running as an administrator
Execution Policy
Running scripts
Running different PowerShell versions
Line continuation
PowerShell modules
Working with the sample code
How to do it…
See also
Installing SQL Server using PowerShell
Getting ready
How to do it…
How it works…
There’s more…
Installing SQL Server Management Objects
Getting ready
How to do it…
There’s more…
Loading SMO assemblies
Getting ready
How to do it…
How it works…
There’s more…
See also
Exploring the SQL Server PowerShell hierarchy
Getting ready
How to do it…
How it works…
Discovering SQL-related cmdlets and modules
Getting ready
How to do it…
How it works…
There’s more…
Creating a SQL Server Instance Object
Getting ready
How to do it…
How it works…
See also
Exploring SMO Server Objects
Getting ready
How to do it…
How it works…
See also
2. SQL Server and PowerShell Basic Tasks
Introduction
Listing SQL Server instances
Getting ready
How to do it…
How it works…
There’s more…
Discovering SQL Server services
Getting ready
How to do it…
How it works…
There’s more…
See also
Starting/stopping SQL Server services
Getting ready
How to do it…
How it works…
There’s more…
See also
Listing SQL Server configuration settings
How to do it…
How it works…
There’s more…
Changing SQL Server Instance configurations
Getting ready
How to do it…
How it works…
There’s more…
See also
Searching for database objects
Getting ready
How to do it…
How it works…
There’s more…
See also
Scripting SQL Server Stored Procedures
Getting ready
How to do it…
How it works…
There’s more…
Creating a database
Getting ready
How to do it…
How it works…
Altering database properties
Getting ready
How to do it…
How it works…
See also
Dropping a database
Getting ready
How to do it…
How it works…
Changing database owner
Getting ready
How to do it…
Zgłoś jeśli naruszono regulamin