Prompt for new SQL Server credentials in Excel

w7t8yxp5  于 2023-03-22  发布在  SQL Server
关注(0)|答案(1)|浏览(148)

I was creating a SQL query in excel via Data > Get Data > From Database > From SQL Server Database button. During the creation, I accidently attempted to create the source using windows authentication which will not work as I need to use SQL authentication and of course resulted in the expected error. When I try recreating the same connection to the same server it will not prompt any more for credential after adding the DB and Command and must be using the old credentials.

I tried creating a new workbook and it still will not prompt for new credentials.

I was able to successfully link another server which prompted for credentials but no longer will for the server in question.

Is there a file or location in Excel that is storing these credentials that I can remove them from? The troubled server/connection does not appear under the query/connection list in the workbook.

Any help is appreciated!

This is the error I receive and knew would occur when using the wrong credentials: Details: "Microsoft SQL: The target principal name is incorrect. Cannot generate SSPI context."

4nkexdtk

4nkexdtk1#

I was able to find where I update these settings:

In Excel, go to Data > Queries and Connections

Hover over the specific query in questions and click "Edit" which will open in "Power Query Editor".

Click "Data Source Settings" in the menu bar. Click "Edit Permissions" on the specific connection and adjust the authentication details from there.

相关问题