none
Automated Data warehousing pausing RRS feed

  • Question

  • Hello Team,

    As a part of automated data warehouse pausing, I have used Azure automation wherein I am triggering a powershell command: suspend.

    But irrespective of any active queries being present,it kills all the activities and pauses the data warehouse.

    So is there any way/command in powershell wherein I can check the active queries (as the one we see when we manually click on the pause option of ADW)?

    Or is there any better way to automate the process other than azure automation based on REST API?

    Friday, April 5, 2019 11:27 AM

Answers

  • Hello Nandan,

    From your automation process (powershell/code), you will have to query the sys.dm_pdw_exec_requests DMV to check if there are any active queries and take action accordingly

    SELECT * 
    FROM sys.dm_pdw_exec_requests 
    WHERE status not in ('Completed','Failed','Cancelled')
      AND session_id <> session_id()
    ORDER BY submit_time DESC;

    Please let us know if there are any futher questions

    Friday, April 5, 2019 2:05 PM
    Moderator

All replies

  • Hello Nandan,

    From your automation process (powershell/code), you will have to query the sys.dm_pdw_exec_requests DMV to check if there are any active queries and take action accordingly

    SELECT * 
    FROM sys.dm_pdw_exec_requests 
    WHERE status not in ('Completed','Failed','Cancelled')
      AND session_id <> session_id()
    ORDER BY submit_time DESC;

    Please let us know if there are any futher questions

    Friday, April 5, 2019 2:05 PM
    Moderator
  • Just checking in to see if the above answer helped.
    If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Sunday, April 7, 2019 4:30 PM
    Moderator
  • Thank you Kalyan for your help. :)
    Monday, April 8, 2019 9:15 AM