Skip to content

Latest commit

 

History

History
161 lines (103 loc) · 11 KB

File metadata and controls

161 lines (103 loc) · 11 KB
title How to Connect
description Follow steps to connect SSMS to a warehouse item in your Microsoft Fabric workspace.
ms.reviewer fresantos, salilkanade
ms.date 03/03/2026
ms.topic how-to
ms.search.form Warehouse connectivity
ms.custom sfi-image-nochange

Connect to Fabric Data Warehouse

Applies to: [!INCLUDE fabric-se-dw]

This tutorial covers connecting tools and applications to your [!INCLUDE fabric-se] or [!INCLUDE fabric-dw], or to the snapshot of a [!INCLUDE fabric-dw].

To get started, you need access to a [[!INCLUDE fabric-se]](../data-engineering/lakehouse-overview.md) or a [[!INCLUDE fabric-dw]](../data-warehouse/data-warehousing.md) within a workspace with Contributor or higher permissions.

Find the warehouse connection string

To find the server name of your warehouse item:

  1. Open the Settings of your warehouse or SQL analytics endpoint.

  2. In the Settings window, select the SQL endpoint page.

  3. Copy the SQL connection string and use it to connect externally to the item from Power BI desktop, applications, or client tools. This is the server name of your warehouse.

  4. Always provide the warehouse item name as the Initial Catalog or Database name when you connect.

    :::image type="content" source="media/how-to-connect/connection-string.png" alt-text="Screenshot from the Fabric portal of the Settings window, SQL endpoint page.":::

Connect using SQL Server Management Studio (SSMS)

The following steps detail how to start at the [!INCLUDE product-name] workspace and connect a warehouse to SQL Server Management Studio (SSMS).

  1. When you open SSMS, the Connect to Server window appears. If already open, you can connect manually by selecting Object Explorer > Connect > Database Engine.

    :::image type="content" source="media/connectivity/object-explorer-connect-menu.png" alt-text="Screenshot showing where to select Database Engine on the Connect menu.":::

  2. Once the Connect to Server window is open, paste the connection string copied from the previous section of this article into the Server name box. Your server name looks something like <unique identifier>.datawarehouse.fabric.microsoft.com. Select Connect and proceed with the appropriate credentials for authentication.

    :::image type="content" source="media/connectivity/connect-server-window.png" alt-text="Screenshot showing the Connect to server window.":::

  3. Provide the warehouse name you intend to connect to. The valid warehouse name does not include the <unique identifier>.datawarehouse.fabric.microsoft.com needed for the Server name. If your warehouse name is NYC Taxi, your Initial Catalog is NYC Taxi.

  4. Once the connection is established, Object Explorer displays the connected warehouse from the workspace and its respective tables and views, all of which are ready to be queried.

    :::image type="content" source="media/connectivity/object-explorer-example.png" alt-text="Screenshot showing where the connected server name appears in the Object Explorer pane.":::

When connecting via SSMS (or ADS), you see both a [!INCLUDE fabric-se] and [!INCLUDE fabric-dw] listed as warehouses. Adopt a naming convention that allows you to easily distinguish between the two item types when you work in tools outside of the [!INCLUDE product-name] portal experience. Only SSMS 19 or higher is supported.

Connect using Power BI

A [!INCLUDE fabric-dw] or Lakehouse [!INCLUDE fabric-se] is a fully supported and native data source within Power BI, and there's no need to use the SQL Connection string. The Data pane exposes all of the warehouses you have access to directly. This allows you to easily find your warehouses by workspace, and:

  1. Select the [!INCLUDE fabric-dw].
  2. Choose entities.
  3. Load Data - choose a data connectivity mode: import or DirectQuery.

For more information, see Create reports on data warehousing in Microsoft Fabric.

Connect using OLE DB

We support connectivity to the [!INCLUDE fabric-dw] or [!INCLUDE fabric-se] using OLE DB. Make sure you're running the latest Microsoft OLE DB Driver for SQL Server.

Connect using ODBC

[!INCLUDE product-name] supports connectivity to the [!INCLUDE fabric-dw] or [!INCLUDE fabric-se] using ODBC. Make sure you're running the latest ODBC Driver for SQL Server. Use Microsoft Entra ID authentication. Only ODBC 18 or higher versions are supported.

Connect using Fabric Python Notebook

Fabric Python Notebooks (preview) offer the ability to run T-SQL code with the T-SQL magic command. In the following steps, connect to a warehouse item in Fabric using the %%tsql magic command:

  1. Create a notebook in your workspace with the language set to Python.

  2. In a cell, use the %%tsql magic command. The cell type automatically changes to T-SQL.

    In the following sample, replace <warehouse> with the name of your warehouse item. The -type parameter should be Warehouse.

    %%tsql -artifact <warehouse> -type Warehouse

    Then include your T-SQL command. For example, to run a query from a warehouse named Contoso:

    %%tsql -artifact Contoso -type Warehouse
    SELECT * FROM wh.DimDate;
  3. You can also bind the results to a dataframe with the -bind argument:

    %%tsql -artifact Contoso -type Warehouse -bind df2

For more possibilities to query your data with T-SQL inside Python Notebooks, see Run T-SQL code in Fabric Python notebooks. To see the full syntax, use the %tsql? command. This command displays the help information for the T-SQL magic command, including the available parameters and their descriptions.

Connect using JDBC

[!INCLUDE product-name] also supports connectivity to the [!INCLUDE fabric-dw] or [!INCLUDE fabric-se] using a Java database connectivity (JDBC) driver.

When establishing connectivity via JDBC, check for the following dependencies:

  1. Add artifacts. Choose Add Artifact and add the following four dependencies, then select Download/Update to load all dependencies. For example:

    :::image type="content" source="media/connectivity/download-update.png" alt-text="Screenshot showing where to select Download/Update.":::

  2. Select Test connection, and Finish.

    :::image type="content" source="media/connectivity/dependency-declaration.png" alt-text="Screenshot of the Dependency Declaration tab.":::

    <dependency>
       <groupId>com.microsoft.azure</groupId>
       <artifactId>msal4j</artifactId>
       <version>1.13.3</version>
    </dependency>
    
    <dependency>
       <groupId>com.microsoft.sqlserver</groupId>
       <artifactId>mssql-jdbc_auth</artifactId>
       <version>11.2.1.x86</version>
    </dependency>
    
     <dependency>
       <groupId>com.microsoft.sqlserver</groupId>
       <artifactId>mssql-jdbc</artifactId>
       <version>12.1.0.jre11-preview</version>
    </dependency>
    
     <dependency>
       <groupId>com.microsoft.aad</groupId>
       <artifactId>adal</artifactId>
       <version>4.2.2</version>
    </dependency>

Connect using dbt

The dbt adapter is a data transformation framework that uses software engineering best practices like testing and version control to reduce code, automate dependency management, and ship more reliable data—all with SQL.

The dbt data platform-specific adapter plugins allow users to connect to the data store of choice. To connect to a warehouse from dbt, use dbt-fabric adapter. Similarly, the Azure Synapse Analytics dedicated SQL pool data source has its own adapter, dbt-synapse.

Both adapters support Microsoft Entra ID authentication and allow developers to use az cli authentication. However, SQL authentication isn't supported for dbt-fabric.

The dbt Fabric DW Adapter uses the pyodbc library to establish connectivity with the [!INCLUDE fabric-dw]. The pyodbc library is an ODBC implementation in Python language that uses Python Database API Specification v2.0. The pyodbc library directly passes connection string to the database driver through SQLDriverConnect in the msodbc connection structure to [!INCLUDE product-name] using a TDS (Tabular Data Streaming) proxy service.

For more information, see the following resources:

Connectivity by other means

Any non-Microsoft tool can also use the SQL connection string via ODBC or OLE DB drivers to connect to a [!INCLUDE product-name] [!INCLUDE fabric-dw] or [!INCLUDE fabric-se], using Microsoft Entra ID authentication. For more information and sample connection strings, see Microsoft Entra authentication as an alternative to SQL authentication.

Custom applications

In [!INCLUDE product-name], a [!INCLUDE fabric-dw] and a Lakehouse [!INCLUDE fabric-se] provide a SQL connection string. Data is accessible from a vast ecosystem of SQL tooling, provided they can authenticate using Microsoft Entra ID. For more information, see Connection libraries for Microsoft SQL Database. For more information and sample connection strings, see Microsoft Entra authentication as an alternative to SQL authentication.

Related content