[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Complete User Tracking Solution Needed

Posted on 2005-04-18
5
Medium Priority
?
228 Views
Last Modified: 2010-03-19
I am implementing a user tracking system on our database tables that run a website. I need to track IP addresses, Host Names, User Name, times, transaction types, and any other things your experts can think of. Please proved function names and explanations of how to use them, or provide SQL to create functions that will track actions.

The functions I am already using are:

HOST_NAME(),
APP_NAME(),
GETDATE(),
USER_NAME()

What I would really like is the IP address of the user. Any other tracking information/strategy is appriciated.
0
Comment
Question by:paulfryer
5 Comments
 
LVL 11

Accepted Solution

by:
SweatCoder earned 1500 total points
ID: 13810582
this should probably have been posted in the EE section of the programming language you're using in your web pages (asp? jsp? php?).

If you're using asp, there are some code samples of gathering that sort of data:

Request.ServerVariables("LOCAL_ADDR")
Request.ServerVariables("REMOTE_ADDR")
Request.ServerVariables("REMOTE_HOST")
0
 
LVL 1

Author Comment

by:paulfryer
ID: 13810710
I would prefer TSQL because the database is used by PHP, ASP, ColdFusion, ect.
0
 
LVL 22

Expert Comment

by:JesterToo
ID: 13810733
I don't think you can do this in T-SQL... much of the data you want to track isn't natively available at the MSSQL level.  You will probably need to provide it to the DB code from the web page level.
0
 
LVL 11

Expert Comment

by:SweatCoder
ID: 13810772
JesterToo is right, per my previous post. SQL can't just go out and grab user data, that must come through a webapp programming languange.
0
 
LVL 13

Expert Comment

by:davidlars99
ID: 13811895
why don't you integrate user tracking code right into your web apps..? this kind of activity should be handled by a web language and should not even be attempted at T-SQL level
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question