Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Logging userinfo. (asp/sql server)

Posted on 1998-10-14
5
Medium Priority
?
272 Views
Last Modified: 2013-12-25
I have sql server 7, iis 4 and vb 6.

I want to log what ever users do in the sql server. To do that i need to know which user does which thing. How do i do this with asp or an iis-application???
0
Comment
Question by:osthus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Author Comment

by:osthus
ID: 1855704
Edited text of question
0
 
LVL 28

Accepted Solution

by:
sybe earned 800 total points
ID: 1855705
- 1. Another way is analysing the server-log file, there is all information you need. there are applications available that make it very easy to analyze the log file (WebTrends).

- 2. When users are logged in on NT, then in ASP you can get the username with
Request.ServerVariables("LOGON_USER")
In every ASP page you could write a few lines of code to put in the database which user looked at which page at what time

strSQL = "INSERT table (username,page,access_date) value (" &_
Request.ServerVariables("LOGON_USER") & ", " &_
Request.ServerVariables("PATH_INFO") & ", " &_
"CONVERT(DateTime,'" & Date() & "',103) )"

' supposing you already have a connection to the database called "Conn":

Conn.Execute(strSQL)

0
 

Author Comment

by:osthus
ID: 1855706
to sybe

Sorry, let me refrase my question.

I'm making a iis/asp application which make it possible to interact with the sql-server. What web-users does is what i want to log.

The problem is that its multiple users and one iis-application.

Anyway, Using NT-security is a good proposal, but how can I use the security used in SQL-server??
0
 
LVL 28

Expert Comment

by:sybe
ID: 1855707
Make a login page. Store the username/password in SessionVariables and use those in the ODBC connection string:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DSN=YourDSN;SERVER:servername;UID=" & Session("username") & ";PWD=" & Session("password") & ";APP=;DATABASE=Databasename"

0
 

Author Comment

by:osthus
ID: 1855708
thanks a lot, im using nt-secrity in a connection string......-
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

609 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