Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By : Donabel Santos
Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By: Donabel Santos

Overview of this book

Table of Contents (21 chapters)
SQL Server 2014 with PowerShell v5 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a table in an Azure SQL database


In this recipe, we will create a table in your Azure SQL database.

Getting ready

The prerequisites for this recipe are similar to the previous recipe, Connecting to an Azure SQL database. You must have the following:

  • A Windows Azure account

  • Azure PowerShell modules installed

  • An existing Azure SQL database

  • Azure subscription set up in your workstation

  • Firewall rules to allow your workstation to connect to your Azure database

To follow along, you need to note your Azure server name, database name, your username, and your password. You will need these when connecting to your instance in the recipe.

If you are not sure you have the prerequisites, I recommend that you go back to the previous recipe, Connecting to an Azure SQL database, to ensure you can successfully connect to Azure using PowerShell.

How to do it...

Let's create a table in your Azure SQL database using PowerShell:

  1. Open PowerShell ISE as administrator.

  2. Use the following script to connect to your Azure...