如何更改连接到我的服务器的会话 ID 的优先级?

2021-09-10 00:00:00 sql tsql sql-server-2008 sql-server

我在 Windows 7 64 位机器上运行 sql server 2008.

I am running sql server 2008 on a windows 7 64 bit machine.

我正在与另一个会话 ID 同时运行查询,我想降低另一个会话 ID 的优先级,因为我的进程更关键.

I am running a query at the same time as another session ID, and I would like to lower the priority of the other session ID because my process is more critical.

另一个进程是一个正在运行的 SSIS 包.

The other process is an SSIS package that is running.

是否有可能在作业运行时更改进程的优先级?

Is it at all possible to change the priority of the processes while the jobs are running?

是否可以更改特定用户 ID 的优先级?

Is it possible to change the priority of a specific USER ID?

推荐答案

如果您使用的是具有企业版引擎(企业版、企业评估版或开发者版)的 SQL Server 版本,则可以使用 资源调控器,基于用户定义的函数,可以包括服务器登录.请查看链接以了解这是否是合适的解决方案.

If you're using an edition of SQL Server that has the Enterprise Edition engine (Enterprise Edition, Enterprise Evaluation Edition, or Developer Edition), you can use Resource Governor to manage resources based on a user-defined function that can include the server login. Please see the link to find out if this is an appropriate solution.

但是,无法更改正在运行的进程的优先级——必须在连接进入之前配置资源调控器.

It is not possible, however, to change a running process' priority -- Resource Governor has to be configured before the connection comes in.

相关文章