Forum Discussion

mustafa_data's avatar
mustafa_data
Helper I
28 days ago
Solved

Fabric Warehouse Query Issue

Dear Community, 

 

I have Fabric Warehouse... It was working perfectly... but today when I am running the any query even Top 10 * from table.... it giving me error, I tested Select 1, GETDATE(), ITS WORKING... but my VIEWS and Tables giving me this error. 

 

Started executing on line 19
 Msg 8676, Level 16, State 17, Line 1
 Invalid plan.
 Msg 24528, Level 0, State 1, Line 1
 ----
9:11:29 AMQuery execution time: 00:00:00.006 | Time to process and render results: 00:00:00.622 | Total duration: 00:00:00.628
  • Hi mustafa_data​,

    Since SELECT 1 and GETDATE() work but queries that actually touch Warehouse tables/views return:

    Msg 8676, Invalid plan

    I would treat this more like a Warehouse execution/plan issue than a problem with the SQL itself.

    Microsoft’s Fabric Warehouse troubleshooting guidance recommends, for transient Warehouse issues, waiting 5 to 10 minutes, opening a fresh connection, and then retrying rather than repeatedly using the same session.

    A couple of things I would try:

    1. Close the current SQL session and reconnect to the Warehouse.
    2. Try a very small direct table query such as SELECT TOP 10 * FROM dbo.YourTable.
    3. Try the same query from another client, for example SSMS or a T-SQL notebook, to see whether the failure is limited to the Fabric query editor.
    4. Check the Warehouse Monitor / Query Insights for one of the failed executions. Microsoft exposes failed query history and the error code through queryinsights.exec_requests_history, which can be useful if this needs to go to Support.

    If every table query still returns 8676 after reconnecting, while scalar queries continue to work, I would raise a Microsoft Support case rather than rebuilding views or changing the SQL. I would include the Warehouse/workspace ID, timestamp of a failed query, the exact query text, and the corresponding operation/request ID from Query Insights if available.

    I would also check Fabric Service Health before changing anything in the Warehouse itself.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

4 Replies

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi mustafa_data 

    Since SELECT 1 and GETDATE() execute successfully while queries against tables and views return Msg 8676. Invalid plan, this appears to be related to query execution against the Warehouse objects rather than a general SQL endpoint connectivity issue.

    As a first step, please try the following:

    1. Refresh the Warehouse metadata/schema and retry the query.
    2. Test a simple query against a single table, for example:

      SELECT TOP 10 * FROM dbo.<table_name>;
      If the issue occurs for multiple tables and views, check whether the Warehouse is currently experiencing a service issue in the Microsoft Fabric Service Health / Fabric status.

    If this started suddenly without any changes to the Warehouse and affects multiple existing tables/views, I recommend raise  a microsoft support with the error code (8676), workspace/Warehouse details, and a reproducible query so the backend execution-plan issue can be investigated.

     

    Thanks,
    C Srikanth
    Community Support Team

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi mustafa_data​ 

    We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

    Thank you.

     

  • v-csrikanth's avatar
    v-csrikanth
    Community Support

    Hi mustafa_data​ 

    We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

    Thank you.

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Power Participant

    Hi mustafa_data​,

    Since SELECT 1 and GETDATE() work but queries that actually touch Warehouse tables/views return:

    Msg 8676, Invalid plan

    I would treat this more like a Warehouse execution/plan issue than a problem with the SQL itself.

    Microsoft’s Fabric Warehouse troubleshooting guidance recommends, for transient Warehouse issues, waiting 5 to 10 minutes, opening a fresh connection, and then retrying rather than repeatedly using the same session.

    A couple of things I would try:

    1. Close the current SQL session and reconnect to the Warehouse.
    2. Try a very small direct table query such as SELECT TOP 10 * FROM dbo.YourTable.
    3. Try the same query from another client, for example SSMS or a T-SQL notebook, to see whether the failure is limited to the Fabric query editor.
    4. Check the Warehouse Monitor / Query Insights for one of the failed executions. Microsoft exposes failed query history and the error code through queryinsights.exec_requests_history, which can be useful if this needs to go to Support.

    If every table query still returns 8676 after reconnecting, while scalar queries continue to work, I would raise a Microsoft Support case rather than rebuilding views or changing the SQL. I would include the Warehouse/workspace ID, timestamp of a failed query, the exact query text, and the corresponding operation/request ID from Query Insights if available.

    I would also check Fabric Service Health before changing anything in the Warehouse itself.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.