Sunday, June 17, 2018

Connect to a Microsoft Azure SQL Database (Power Query)

Connect to a Microsoft Azure SQL Database (Power Query)

Use Excel's Get & Transform (Power Query) experience to connect to Microsoft Azure SQL databases just like any other data source.

Click on the Data tab, then Get Data > From Azure > From Azure SQL Server Database. If you don't see the Get Data tab, click the New Query button, then From Azure > From Microsoft Azure SQL Server Database. Follow the additional steps listed below.

Important: Make sure you have downloaded and installed the Power Query Add-In.

In the Power Query ribbon tab, select From Azure > From Microsoft Azure SQL Database. Follow the additional steps listed below.

Power Query Import from Azure dialog

Next

  1. In the SQL Server Database dialog box, specify the Microsoft Azure SQL Database server to connect to in the Server Name box.

  2. If you want to import data using native database query, specify your query in the SQL Statement box. For more information, see Import Data from Database using Native Database Query.

  3. Click OK.

  4. In the Microsoft SQL Database dialog box, enter your username and password.

  5. By default, the Encrypt connection check box is selected to signify that Power Query connects to your Microsoft Azure database using an encrypted connection. If you do not want to connect using an encrypted connection, clear this check box, and then click Save.

    If a connection to your SQL Server is not established using an encrypted connection, Power Query prompts you to connect using an unencrypted connection. Click OK in the message to connect using an unencrypted connection.

    Note:  Before connecting to a Microsoft Azure SQL Database server, you need to allow your IP address to access the database though the Microsoft Azure firewall.

    To allow your IP address:

    • Log into your Microsoft Azure account.

    • In the Microsoft Azure SQL Databases page, click your database.

    • In the page for your database, in the quick glance pane, click Manage allowed IP addresses.

    • In the Allowed IP Addresses section, click Add to allowed IP addresses to allow your IP address to access the database though the firewall.

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

Power Query is known as Get & Transform in Excel 2016

Import data from external data sources

No comments:

Post a Comment