Chapter 2. SQL Server and PowerShell Basic Tasks

In this chapter, we will cover:

  • Listing SQL Server instances
  • Discovering SQL Server services
  • Starting/stopping SQL Server services
  • Listing SQL Server configuration settings
  • Changing SQL Server Instance configurations
  • Searching for database objects
  • Scripting SQL Server Stored Procedures
  • Creating a database
  • Altering database properties
  • Dropping a database
  • Changing a database owner
  • Creating a table
  • Creating a view
  • Creating a stored procedure
  • Creating a user defined function
  • Creating a trigger
  • Creating an index
  • Executing a query / SQL script
  • Performing bulk export using Invoke-SqlCmd
  • Performing bulk export using the bcp command-line utility
  • Performing bulk import using BULK INSERT
  • Performing bulk import using the bcp command-line ...

Get SQL Server 2014 with PowerShell v5 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.