DBMS_SESSION.set_client_identifier equivalent in SQL Server

I am new to SQL Server and I am more familiar with the ORACLE database. I would like to know if there is a way to set the client identifier context, for example, in Oracle using DBMS_SESSION.set_client_identifier and capture the value using the function.

I am trying to track data changes, including who / which username, the changes made. My plan is to create triggers that capture the OLD value, NEW value and username.

The connection to the server uses a pool connection, so using a username that connects to the database is not a response.

Does anyone have an idea?

Thanks, -Y

+3
source share
1 answer

( ), . Open(). , .

, SQL- "SET CONTEXT_INFO", 128 / "CONTEXT_INFO()". . > <.

+2

Source: https://habr.com/ru/post/1763721/


All Articles