The below query has been running for several hours and is not completing.
SET ODF_NK_ALLOCCOST_CURVE = NUL
The query was initiated from the Update Earned Value Totals job which had been stuck in running status. This is because, the Prod DB was refreshed on to Test env and the processing job from Prod got carried over to TEST and got stuck.
Cancel the job and reschedule it.
Ideally, it is recommended to pause all jobs before a DB back up or validate the refreshed environment for any long running jobs. Cancel and reschedule them.