Click here to Skip to main content
15,919,245 members
Home / Discussions / Database
   

Database

 
GeneralRe: DataSet Pin
Marc Soleda3-Aug-05 5:29
Marc Soleda3-Aug-05 5:29 
GeneralRe: DataSet Pin
Frank Kerrigan2-Aug-05 21:55
Frank Kerrigan2-Aug-05 21:55 
GeneralUPDATE cmd ASP.net Access 2k doesn't work Pin
xsoftdev21-Aug-05 9:17
xsoftdev21-Aug-05 9:17 
GeneralRe: UPDATE cmd ASP.net Access 2k doesn't work Pin
Frank Kerrigan3-Aug-05 1:21
Frank Kerrigan3-Aug-05 1:21 
GeneralRe: UPDATE cmd ASP.net Access 2k doesn't work Pin
Rob Graham4-Aug-05 5:08
Rob Graham4-Aug-05 5:08 
GeneralSQL Audit trail Pin
Alomgir Miah1-Aug-05 9:09
Alomgir Miah1-Aug-05 9:09 
GeneralRe: SQL Audit trail Pin
Colin Angus Mackay2-Aug-05 4:15
Colin Angus Mackay2-Aug-05 4:15 
GeneralRe: SQL Audit trail Pin
Alomgir Miah2-Aug-05 7:36
Alomgir Miah2-Aug-05 7:36 
Thanks a lot for your reply.

I think I was not very clear in my questions.

I am passing
(1) An insert query string
(2) UserName

to the stored procedure. As soon as the insert happens, the insert trigger is fired. In the insert trigger I am auditind the data by storing the changes(insert in this case) into an
audit trail table.

The answers to your questions are

(1) The trigger can access the database user only through user_name

INSERT INTO AuditTrail
SELECT user_name(),getdate(),'Fund','FamilyID',@rowid,'Insert',null,convert(varchar,FamilyID)
FROM inserted
But I need a way to access the parameter passed into SP.

(2) I know the constraint sucks. This is enforced for security reasons. More users means more activity tracking for all users. This means more work for the support groups and security holes in the application. ( Frankly, I dont agree to this at all like you said. ). But it does not means one user. It means many kerberos user and only one database user.


So the only solution I can think of is having a LastUpdatedBy column in the tables we are auditing. So the insert statement in the Trigger changes to

INSERT INTO AuditTrail
SELECT LastUpdatedBy,getdate(),'Fund','FamilyID',@rowid,'Insert',null,convert(varchar,FamilyID)
FROM inserted

and I wont need the stored procedure in discussion at all.

Is it the best way to go keeping in mind the constraints we have.


Live Life King Size
Alomgir Miah
GeneralRe: SQL Audit trail Pin
Colin Angus Mackay2-Aug-05 8:01
Colin Angus Mackay2-Aug-05 8:01 
GeneralRe: SQL Audit trail Pin
Alomgir Miah2-Aug-05 8:22
Alomgir Miah2-Aug-05 8:22 
GeneralDataRow Class and Insert command Pin
dwark1061-Aug-05 7:21
dwark1061-Aug-05 7:21 
GeneralComparing times (hh:mm:ss) in SQL Server Pin
Member 21613301-Aug-05 2:04
Member 21613301-Aug-05 2:04 
GeneralRe: Comparing times (hh:mm:ss) in SQL Server Pin
WoutL1-Aug-05 2:36
WoutL1-Aug-05 2:36 
GeneralRe: Comparing times (hh:mm:ss) in SQL Server Pin
andyharman1-Aug-05 5:25
professionalandyharman1-Aug-05 5:25 
GeneralRe: Comparing times (hh:mm:ss) in SQL Server Pin
Frank Kerrigan2-Aug-05 6:11
Frank Kerrigan2-Aug-05 6:11 
GeneralDataRow vs Business object Pin
WDI31-Jul-05 22:21
WDI31-Jul-05 22:21 
GeneralRe: DataRow vs Business object Pin
Colin Angus Mackay1-Aug-05 23:50
Colin Angus Mackay1-Aug-05 23:50 
GeneralRe: DataRow vs Business object Pin
WDI2-Aug-05 4:09
WDI2-Aug-05 4:09 
GeneralRe: DataRow vs Business object Pin
Colin Angus Mackay2-Aug-05 4:12
Colin Angus Mackay2-Aug-05 4:12 
GeneralRe: DataRow vs Business object Pin
Mohamad Al Husseiny2-Aug-05 16:16
Mohamad Al Husseiny2-Aug-05 16:16 
GeneralCorresponding .cs file is not added when I add a Crytal Report file in Solution Explorer VS.Net2003 Pin
Member 123075730-Jul-05 23:53
Member 123075730-Jul-05 23:53 
Questionhow to store document into sql Server from ASP.Net Pin
kpsetty30-Jul-05 20:20
kpsetty30-Jul-05 20:20 
GeneralComparing Database Snapshots Pin
Kathy Banks30-Jul-05 11:07
Kathy Banks30-Jul-05 11:07 
GeneralRe: Comparing Database Snapshots Pin
AJ Russ30-Jul-05 11:13
AJ Russ30-Jul-05 11:13 
GeneralLinked Server with DataAdapter Pin
ammarmujeeb30-Jul-05 4:08
ammarmujeeb30-Jul-05 4:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.