title: "sys.pdw_database_mappings (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "10/17/2017" ms.prod: "sql" ms.prod_service: "pdw" ms.service: "" ms.component: "system-catalog-views" ms.reviewer: "" ms.suite: "sql" ms.technology:
- "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" dev_langs:
- "TSQL" ms.assetid: 4ae2c71e-dd56-41ea-a16b-64936175b459 caps.latest.revision: 9 author: "barbkess" ms.author: "barbkess" manager: "craigg" ms.workload: "Inactive" monikerRange: ">= aps-pdw-2016 || = sqlallproducts-allversions"
[!INCLUDEtsql-appliesto-xxxxxx-xxxx-xxxx-pdw-md]
Maps the database_ids of databases to the physical name used on Compute nodes, and provides the principal id of the database owner on the system. Join sys.pdw_database_mappings to sys.databases and sys.pdw_nodes_pdw_physical_databases.
| Column Name | Data Type | Description | Range |
|---|---|---|---|
| physical_name | nvarchar(36) | The physical name for the database on the Compute nodes. physical_name and database_id form the key for this view. |
|
| database_id | int | The object ID for the database. See sys.databases (Transact-SQL). physical_name and database_id form the key for this view. |
Examples: [!INCLUDEssPDW]
The following example joins sys.pdw_database_mappings to other system tables to show how databases are mapped.
SELECT DB.database_id, DB.name, Map.*, Phys.*
FROM sys.databases AS DB
JOIN sys.pdw_database_mappings AS Map
ON DB.database_id = Map.database_id
JOIN sys.pdw_nodes_pdw_physical_databases AS Phys
ON Map.physical_name = Phys.physical_name
ORDER BY DB.database_id, Phys.pdw_node_id;
SQL Data Warehouse and Parallel Data Warehouse Catalog Views
sys.pdw_index_mappings (Transact-SQL)
sys.pdw_table_mappings (Transact-SQL)
sys.pdw_nodes_pdw_physical_databases (Transact-SQL)