首页 > 解决方案 > 修改 master..sysprocesses [Sybase] 中的值

问题描述

有没有办法修改表master..sysprocesses中的列program_name

我找到了两种方法,但都在创建连接期间设置了名称:

  1. 执行isql命令时使用参数appname
  2. 打开 ODBC 连接时,在连接字符串中添加参数APP= 。

我正在寻找一种在创建后对其进行修改的方法。

我尝试了以下示例:

    sp_configure "allow updates",1
    go
    
    UPDATE master..sysprocesses
    SET program_name = 'test'
    where hostname = 'server'
    and hostprocess = '23240'
    go
    
    sp_configure "allow updates",0
    go

但失败了:

Could not execute statement.
Table 'sysprocesses' can't be modified.
Sybase error code=270
Severity Level=16, State=1, Transaction State=0
Line 4
You can continue executing or stop.

标签: sybasesap-ase

解决方案



推荐阅读