Excel - Microsoft Query - SQL Server Login - Use Trusted Connection Default Setting

Several years using this site are an invaluable resource, but for the first time published.

I am having small problems with external data connections in Excel, namely connecting to SQL Server through Microsoft Query.

Whenever I click

[Get External Data > 
     From Other Sources > 
          From Microsoft Query > 
               Choose Data Source: SQL Server]

It takes about 20 seconds before an error occurs:

Error 18452 Logon Invalid domain

After I click “OK”, the “Log in to SQL Server” dialog box will appear with a preliminary check “Use a reliable connection”. Each time I create a new data connection in Excel (I do this dozens of times for each project), I have to uncheck this box and enter the login ID / pw instead to make it work. Add all these 20 seconds, and this is actually quite a big annoyance for the type of work I'm doing.

My question is: how do I change the connection properties to where "Use trusted connection" is cleared by default, and the "User ID" and "Password" fields are pre-populated?

HTML, .odc [Documents > My Data Sources] "edit in notepad":

<odc:ConnectionString>Provider=SQLOLEDB.1;Persist Security Info=True;User ID=xx_xxxxxx;Password=xxxxxxxx;Data Source=XX.XX.XX.XX;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=XXXXXXX;Use Encryption for Data=False;Tag with column collation when possible=False;Initial Catalog=Data_Warehouse</odc:ConnectionString>

, . . , , , .

0
1

, , , ...

, , . , , " " . Excel 2 , , , "Use Trusted Connection" , , . , . . #smh

+1

Source: https://habr.com/ru/post/1648350/


All Articles