I recently ran into some difficulty enabling SQL password saving for a data source which had password saving disabled when it was created in the Power Pivot Excel Add-in. After some trial and error, I discovered that the trick is to enable password saving in the Excel workbook connection before specifying a password and enabling password saving in the Power Pivot connection. This post provides a detailed walkthrough of the process.
To enable SQL password saving (aka “Persist Security Info”) for an existing Power Pivot connection, use the following process:
- Open the Excel file of interest. If already open, close then re-open the file to ensure the SQL password has not been cached.
- Click the Connections button in the Connections section of the Data tab.
(Note that this button is disabled when a Power View worksheet is active.
Switch to a non-Power View worksheet first, if necessary.)
- Select the connection for which you want to save the SQL password, then
click the Properties button.
- Check the “Save password” box on the Definition tab of Connection
Properties.
Click the “Yes” button if you are willing to save the SQL password in the workbook without encryption.
- Press the “OK” button to close the Connection Properties window, then “Close” to close Workbook Connections window.
- Click the “Manage Data Model” button the in Data Tools section of the Data
tab.
- Click the “Existing Connections” button in the “Get External Data” section
of the Home tab.
- Select the connection for which you want to save the SQL password, then
click the Edit button.
- Enter the password for SQL Server Authentication and check the “Save my
password” box, then click the “Save” button to close the Edit Connection
window.
- Important Click the Refresh button and enter the SQL password when
prompted. I do not know why this is required, but in my testing, saving
without refreshing the connection results in the password not being saved.
- Click the Close button to close the Existing Connections window then close the Power Pivot for Excel window.
- Save the Excel workbook.
- (Optional) Close the workbook, then re-open it and Refresh a Power View sheet to confirm the password has been saved.
Note: Excel caches the SQL password for workbook connections. During testing it is important to close and re-open the workbook before refreshing to test whether the password has been successfully saved.