?
Solved

Logging userinfo. (asp/sql server)

Posted on 1998-10-14
5
Medium Priority
?
271 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses
Course of the Month8 days, 5 hours left to enroll

765 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