Sql.Databases is a Power Query M function that returns a table of databases on a specified SQL server. The function returns a table of database information, with optional parameters to control connection settings and behavior.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Sql.Databases(
server as text,
optional options as nullable record,
) as table
Description
Returns a table of databases on the specified SQL server, server
. An optional record parameter, options
, may be specified to control the following options:
CreateNavigationProperties
: A logical (true/false) that sets whether to generate navigation properties on the returned values (default is true).NavigationPropertyNameGenerator
: A function that is used for the creation of names for navigation properties.MaxDegreeOfParallelism
: A number that sets the value of the "maxdop" query clause in the generated SQL query.CommandTimeout
: A duration that controls how long the server-side query is allowed to run before it is canceled. The default value is ten minutes.ConnectionTimeout
: A duration that controls how long to wait before abandoning an attempt to make a connection to the server. The default value is driver-dependent.HierarchicalNavigation
: A logical (true/false) that sets whether to view the tables grouped by their schema names (default is false).MultiSubnetFailover
: A logical (true/false) that sets the value of the "MultiSubnetFailover" property in the connection string (default is false).UnsafeTypeConversions
: A logical (true/false) that, if true, attempts to fold type conversions which could fail and cause the entire query to fail. Not recommended for general use.ContextInfo
: A binary value that is used to set the CONTEXT_INFO before running each command.OmitSRID
: A logical (true/false) that, if true, omits the SRID when producing Well-Known Text from geometry and geography types.EnableCrossDatabaseFolding
: A logical (true/false) value that, if true, allows query folding across databases on the same server. The default value is false.
Does not support setting a SQL query to run on the server.
Sql.Database
should be used instead to run a SQL query.
Related articles
Learn more about Sql.Databases in the following articles:
- Cross Database Query Folding For SQL Server Sources In Power Query In Power BI And Excel
Learn to combine data from multiple SQL Server databases in Power Query using EnableCrossDatabaseFolding. Boost query performance with practical examples. » Read more - Query Folding on Native Queries
This article delves into using Query Folding for Native Queries. It also provides a list of connectors that currently supports this. » Read more - SQL Server Connector
This article provides information on the SQL Server connector. » Read more
Related functions
Other functions related to Sql.Databases are:
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy