开发者

Fetching unix users from SQL Server

开发者 https://www.devze.com 2022-12-12 22:27 出处:网络
We have some tables where we store some sensitive information. These tables have one extra column \"ModifiedBy\". Currently we insert the value for this column programmatically.

We have some tables where we store some sensitive information. These tables have one extra column "ModifiedBy". Currently we insert the value for this column programmatically.

Is there a way to get the current unix user into SQL Server. The idea is to开发者_开发知识库 auto-populate the user name/id into that column with the use of triggers.


You don't mention the language or situation, so an answer is hard ...

presuming users are logged in and running a program, and that this program is a scripting language then you can execute whoami from the shell and use that value.

If you are using C, then see geteuid() and friends.

0

精彩评论

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