Message=Could not find server 'AAASQL' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.

Juliana Zhou 21 Reputation points
2023-02-02T23:17:20.83+00:00

I am in Power Query and I am given a custom function: to query from TWO different SQL servers - before they are different SQL servers but both on premise and right now I need change one server to Cloud version. 

 

After change, I was thrown this error message:  DataSource.Error: Microsoft SQL: Could not find server 'AAASQL' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
Details:
DataSourceKind=SQL
DataSourcePath=BBBSQL;CSA
Message=Could not find server 'AAASQL' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
ErrorCode=-2146232060
Number=7202
Class=11

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,694 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,436 Reputation points
    2023-02-03T05:59:34.28+00:00

    Hi Juliana Zhou,

    Please refer to this article: https://www.c-sharpcorner.com/blogs/could-not-find-server-server-name-in-sysservers-in-sql-server

    And this similar thread: https://learn.microsoft.com/en-us/answers/questions/817819/could-not-find-server-servernamehere-in-sys-server

    Best regards,

    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  2. Erland Sommarskog 100.9K Reputation points MVP
    2023-02-03T22:55:06.8533333+00:00

    Apparently, you are submitting a query like:

    SELECT ... FROM AAASQL.db.dbo.tbl

    But on the SQL Server instance, there is no linked server AAASQL defined.

    You need to talk with the DBA for the server you connect to, and ask that person to set up the linked server for you.

    0 comments No comments