Microsoft Fabric Updates Blog

How to create a SQL database in Fabric using Fabric CLI

Step into the future of simplicity with Fabric CLI. The Fabric Command Line Interface (CLI) has arrived in preview, bringing with it a seamless way to create SQL databases for your projects. This guide will take you through the steps to get started, ensuring you can leverage the power of Fabric CLI with ease.

Prerequisites

Before you begin, ensure you have the following in place:

  • Make sure Python version 3.10,3.11 or 3.12 is installed on your machine as well as python is accessible from your terminal (path environment variable).
  • Install Fabric CLI on your machine with the command below.
    • pip install ms-fabric-cli
  • You have access to a Microsoft Fabric workspace.
  • A valid Microsoft account with permissions to create databases.

Steps

Step 1: Log in to Microsoft Fabric

Open command prompt and run the command below.

fab auth login

Note: for this article I chose “Interactive with a web browser” option.

Follow the prompts to authenticate using your Microsoft account.

Step 2: Create a New SQL database

Run the command below to create a SQL database:

fab create <workspacename>.Workspace/<databasename>.SQLDatabase

Note: replace <workspacename> with the name of the workspace where you want to create the SQL database and replace <databasename> with the name that you want to use for your SQL database workload

Step 3: Verify Database Creation

To ensure that SQL database is created successfully in your workspace run below command

fab ls <workspacename>.Workspace

This will display a list of all artifacts that are in the workspace including the one that just got created. Ensure that your newly created database is in the list.

Next Steps

Fabric CLI is currently available in preview, offering users an efficient means to interact with fabric as a file system. This tool enhances automation and streamlines processes such as CI/CD pipelines, thereby facilitating faster and more simplified workflows.

To learn more about fabric CLI on the Fabric CLI GitHub page

Gerelateerde blogberichten

How to create a SQL database in Fabric using Fabric CLI

november 10, 2025 door Arun Ulagaratchagan

SQL is having its moment. From on-premises data centers to Azure Cloud Services to Microsoft Fabric, SQL has evolved into something far more powerful than many realize and it deserves the focused attention of a big stage.  That’s why I’m thrilled to announce SQLCon, a dedicated conference for database developers, database administrators, and database engineers. Co-located with FabCon for an unprecedented week of deep technical content … Continue reading “It’s Time! Announcing The Microsoft SQL Community Conference”

oktober 29, 2025 door Adam Saxton

This month’s update delivers key advancements across Microsoft Fabric, including enhanced security with Outbound Access Protection and Workspace-Level Private Link, smarter data engineering features like Adaptive Target File Size, and new integrations such as Data Agent in Lakehouse. Together, these improvements streamline workflows and strengthen data governance for users. Contents Events & Announcements Fabric Data … Continue reading “Fabric October 2025 Feature Summary”