Click here to Skip to main content
15,881,172 members
Home / Discussions / Database
   

Database

 
QuestionHow to audit user activities in ms access Pin
Mekong River7-Dec-05 15:40
Mekong River7-Dec-05 15:40 
AnswerRe: How to audit user activities in ms access Pin
S Douglas8-Dec-05 0:47
professionalS Douglas8-Dec-05 0:47 
GeneralRe: How to audit user activities in ms access Pin
Mekong River8-Dec-05 4:28
Mekong River8-Dec-05 4:28 
QuestionUsing SQLXML, Bulk Insert XML with IDENTITY Column ... Pin
cmacgowan7-Dec-05 8:53
cmacgowan7-Dec-05 8:53 
Questiontrace the computer name Pin
Goodway7-Dec-05 4:14
Goodway7-Dec-05 4:14 
AnswerRe: trace the computer name Pin
miah alom7-Dec-05 6:53
miah alom7-Dec-05 6:53 
GeneralRe: trace the computer name Pin
Goodway9-Dec-05 5:39
Goodway9-Dec-05 5:39 
GeneralRe: trace the computer name Pin
miah alom9-Dec-05 5:55
miah alom9-Dec-05 5:55 
I have solved this problem in a different way. When the user logs in to the application, I insert the kerberos user id and the hostname in a Activity table. But there is a limitation. One user cannot start two instances of the application from the same host.

So when there is a update or delete or insert, I pick up the value from this table.

Everytime the user logs in, I clear the Activity for that user in a host machine.

CREATE PROCEDURE ValidateUser (
@userid varchar(10) )
AS
DECLARE @cnt int
BEGIN

DELETE FROM Activity
WHERE Host = host_name()
INSERT INTO Activity VALUES(host_name(),@userid)

SELECT @cnt = count(*)
FROM Users
WHERE ID = @userid

IF @cnt = 1
SELECT 1
ELSE
SELECT 0

END

In the trigger I do something like

IF @@rowcount = 0
RETURN

SELECT @user = CurrentUser
FROM Activity
WHERE Host = host_name()

IF UPDATE(Column1)
INSERT INTO AuditTrail
SELECT @user,getdate(),'Table1','Column1' --blah blah
FROM deleted,inserted
WHERE -------------------

Does this help.
Questiondataset getchanges() question Pin
NikoTanghe7-Dec-05 0:58
NikoTanghe7-Dec-05 0:58 
AnswerRe: dataset getchanges() question Pin
jonathan157-Dec-05 3:55
jonathan157-Dec-05 3:55 
GeneralRe: dataset getchanges() question Pin
miah alom7-Dec-05 4:54
miah alom7-Dec-05 4:54 
Questionms sql server biggest data type Pin
kasko_6-Dec-05 15:05
kasko_6-Dec-05 15:05 
AnswerRe: ms sql server biggest data type Pin
toxcct6-Dec-05 22:43
toxcct6-Dec-05 22:43 
AnswerRe: ms sql server biggest data type Pin
Daniel Santillanes7-Dec-05 13:39
professionalDaniel Santillanes7-Dec-05 13:39 
QuestionHow to create a code parser? Pin
Lord Kixdemp6-Dec-05 12:35
Lord Kixdemp6-Dec-05 12:35 
AnswerRe: How to create a code parser? Pin
toxcct6-Dec-05 22:31
toxcct6-Dec-05 22:31 
GeneralRe: How to create a code parser? Pin
Lord Kixdemp10-Dec-05 9:25
Lord Kixdemp10-Dec-05 9:25 
QuestionExport public keys from certificate Pin
Russell Jones6-Dec-05 4:13
Russell Jones6-Dec-05 4:13 
QuestionToWords() Method within crystal Report Pin
achrafus6-Dec-05 2:07
achrafus6-Dec-05 2:07 
AnswerRe: ToWords() Method within crystal Report Pin
Russell Jones6-Dec-05 4:25
Russell Jones6-Dec-05 4:25 
AnswerRe: ToWords() Method within crystal Report Pin
Russell Jones6-Dec-05 5:23
Russell Jones6-Dec-05 5:23 
GeneralRe: ToWords() Method within crystal Report Pin
achrafus7-Dec-05 7:40
achrafus7-Dec-05 7:40 
GeneralRe: ToWords() Method within crystal Report Pin
Russell Jones7-Dec-05 22:35
Russell Jones7-Dec-05 22:35 
GeneralRe: ToWords() Method within crystal Report Pin
achrafus7-Dec-05 23:59
achrafus7-Dec-05 23:59 
QuestionWhat Isolation Level should I use Pin
The Liquidian6-Dec-05 1:30
The Liquidian6-Dec-05 1:30 

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.