开发者

Advantage database how to retieve connection name

I am using Sybase Advantage, I have 2 tables:

  • The first table has the data records
  • The second table stores a history of the first

The first table has triggers to populate records in the second table depending on which fields get changed.

I would like to s开发者_运维知识库tore the connection name (PC which made the request), the name that is displayed in the active queries page (Server Info dialog) and not the username. Does anyone know if this is possible?

Thanks


The following SQL statement can be used to retrieve the computer name instead of the user name.

SELECT * FROM ( EXECUTE PROCEDURE sp_mgGetConnectedUsers() ) ConnUsers WHERE ConnUsers.DictionaryUser = USER();

The stored procedure sp_mgGetConnectedUsers is documented here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜