I want to run a query which takes a lot of temp space. However, I don't want the query to exhaust all the available temp space. How can this be achieved?
You can add a resource plan that limits it.