Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Pausing a SQL thread?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-12-22 : 08:30:49
Andrew Brogan writes "We have users that sometimes run a process that consumes most of the server resources (cpu/disk i.o. etc...) . These are important processes, but they need to be run at off-peak hours. Is there any way to pause a process so that it stops using resources, but keep it so it is still active, then un-pause it later to resume where it left off? I know you can "kill" a process, but we don't want to lose the work that the user has done up to that point. We are using Windows 2000 and SQL Server 2000, sp 2 and 3."

nr
SQLTeam MVY

12543 Posts

Posted - 2003-12-22 : 10:04:15
You can lock a record that the spid needs and that will stop it until the lock is released. It will also stop anything else that needs that record and also hold any locks held by the spid. Not a recommeneded approach.

Usually you would put the request into a table and have a scheduled task kick it off at the required time.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -