1

Set up a local development environment for Azure SQL Database

 1 year ago
source link: https://learn.microsoft.com/en-us/azure/azure-sql/database/local-dev-experience-set-up-dev-environment?view=azuresql&tabs=vscode
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Set up a local development environment for Azure SQL Database

  • Article
  • 08/30/2022

In this article

Applies to: yes-icon.svg?view=azuresql Azure SQL Database

This article teaches you to set up the local development experience for Azure SQL Database. The local development experience for Azure SQL Database enables developers and database professionals to design, edit, build/validate, publish, and run database schemas for databases in Azure SQL Database using a containerized environment.

Prerequisites

Before you configure the local development environment for Azure SQL Database, make sure you have met the following hardware and software requirements:

  • Software requirements:
    • Currently supported on Windows 10 or later release, macOS Mojave or later release, and Linux (preferably Ubuntu 18.04 or later release)
    • Azure Data Studio or VSCode
  • Minimum hardware requirements:
    • 8 GB RAM
    • 10 GB available disk space

Install Docker Desktop

The local development environment for Azure SQL Database uses the Azure SQL Database emulator, a containerized database with close fidelity to the Azure SQL Database public service. The Azure SQL Database emulator is implemented as a Docker container.

Install Docker Desktop. If you are using Windows, set up Docker Desktop for Windows with WSL 2.

Ensure that Docker Desktop is running before using your local development environment for Azure SQL Database.

Install extension

There are different extensions to install depending on your preferred development tool.

Extension Visual Studio Code Azure Data Studio
The mssql extension for Visual Studio Code Install the mssql extension. Installation is not necessary as the extension as the functionality is natively available.
SQL Database Projects extension (Preview) Installation as not necessary as the SQL Database Projects extension is bundled with the mssql extension and is automatically installed and updated when the mssql extension is installed or updated. Install the SQL Database Projects extension.

If you are using VSCode, install the mssql extension for Visual Studio Code.

The mssql extension enables you to connect and run queries and test scripts against a database. The database may be running in the Azure SQL Database emulator locally, or it may be a database in the global Azure SQL Database service.

To install the extension:

  1. In VSCode, select View > Command Palette, or press Ctrl+Shift+P, or press F1 to open the Command Palette.

  2. In the Command Palette, select Extensions: Install Extensions from the dropdown.

  3. In the Extensions pane, type mssql.

  4. Select the SQL Server (mssql) extension, and then select Install.

  5. After the installation completes, select Reload to enable the extension.

Begin using your local development environment

You have now set up your local development environment for Azure SQL Database. Next, Create a database project for a local Azure SQL Database development environment.

Next steps

Learn more about the local development experience for Azure SQL Database:


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK