如何使用SYSTEM_USER审计触发器,但仍使用连接池? [英] How to use system_user in audit trigger but still use connection pooling?

查看:112
本文介绍了如何使用SYSTEM_USER审计触发器,但仍使用连接池?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想两者都做下面的事情:

I would like to do both of the following things:


  1. 使用审计触发我的数据库表来确定哪些用户更新的东西;

  2. 使用连接池,以提高性能

有关#1,我用SYSTEM_USER数据库触发器来识别用户进行更改,但这个$ P $不做#2,需要一个通用的连接字符串pvent我。

For #1, I use 'system_user' in the database trigger to identify the user making the change, but this prevent me from doing #2 which requires a generic connection string.

有没有办法,我能得到最好的两个这些世界的?

Is there a way that I can get the best of both of these worlds?

ASP.NET/SQL Server 2005中

ASP.NET/SQL Server 2005

推荐答案

从存放在数据库中你的web应用程序的用户,让你的触发器熄灭存储的数据。它甚至可能会更好,让Web应用程序处理所有的写日志信息到数据库中。

Store the user from your web application in the database and let your triggers go off that stored data. It might even be better to let the web app handle writing all logging information to the database.

这篇关于如何使用SYSTEM_USER审计触发器,但仍使用连接池?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆