Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging update queries 1

Status
Not open for further replies.

WMitchellCPQ

Programmer
Sep 28, 2001
54
US
I'm pretty new to SQL Server and was hoping for some help.

I have a web UI created using ASP and I am doing various operations on the Database add/update.... I'm using a DSN less connection.

Can someone tell me how to set up SQL Server 2000 so that a log is created everytime a record is updated. Is possible it would be nice to capture the UserName / domain but but I'll settle with some basic logging.

Thanks for your help
Will
 
Hi There


Check out "Triggers in Books online. You can create a table for log information and You can create an Insert Trigger to insert a record in this table every time a record is updated.

Select USER_NAME() - Returns the User name
Select HOST_NAME() - Returns the workstation name.

Hope This Helps. Bernadette
 
Remember, you are probably using an Anonomous connection to IIS, otherwise external people will not be able to connect to you website. This means that the connection credentials used by IIS to connect to SQL server will be it's own, and not the user of the web page.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top