开发者

Fetching unix users from SQL Server

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜