Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to write QUERY

Author  Topic 

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-04-09 : 03:31:18
Hi
i want to audit a tables
For That i created audit tables
In that table i want to store data as
all field related to old data table
and from which system user had changed the data

For this system id i used host_id() but the iam not getting the id



Malathi Rao

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-09 : 03:36:39
what system id ?

host name ? host_name()


KH

Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-09 : 04:39:51
Host_ID() returns workstation ID number. Are you getting any error? Can you show us the code which you use to insert this Audit information?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-04-09 : 05:44:12
I want the machine id frm where the data has been updated
(i.e) frm which system

quote:
Originally posted by harsh_athalye

Host_ID() returns workstation ID number. Are you getting any error? Can you show us the code which you use to insert this Audit information?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"



Malathi Rao
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-09 : 05:50:13
quote:
For this system id i used host_id() but the iam not getting the id

So what do you get ? and what is the value you are expecting from host_id() ?


KH

Go to Top of Page

SQLUSA
Starting Member

28 Posts

Posted - 2007-04-09 : 08:11:47
If you have a middle-tier, you are not going to get the host ID.

Kalman Toth, Database, DW & BI Architect
SQL Server 2005 Training - http://www.sqlusa.com
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-10 : 01:04:08
It is very simple for the front-end application to supply.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -