|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Capture IP Address
Hi all experts, is it possible to to capture the IP of the computer adding the record to the database using SQL statement?
|
|
#3
|
|||
|
|||
|
Then does anyone know or have any idea on how to capture the IP address of the PC use to insert a new record?
My idea is to track who are the user uses the database. I actually have a website setup in my company intranet for users to tick on some selection and save it in the database. My database run well but it will be better if i know who insert the record ![]() |
|
#4
|
||||
|
||||
|
to do this you need to use a scripting language like asp, php, coldfusion, etc.
|
|
#5
|
||||
|
||||
|
you could reverse engineer the sp_who or sp_who2 storedprocs. you'll have to get into sysprocesses, users and locks etc. the sP_who2 proc returns hostnames/applications of users connected, never seen ip addresses though.
goodluck Al |
|
#6
|
|||
|
|||
|
Oh no, I am very new in programming world. Some of the term like sysprocess i have no idea what is that!!!
Where can I get the script? Or everyone can guide me on how to go abt? |
|
#7
|
|||
|
|||
|
Thanks everyone. I am able to capture the IP address and store into the database already
|
|
#8
|
||||
|
||||
|
sure, FYI. there's a system stored procedure called sp_who2 and that has the text for determining what the active connections and processes are.
if you type sp_helptext sp_who2 in query analyzer, it will display the whole procedure so you can determine who's connected by procces etc. it's really interesting how it works. good luck. Al |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Capture IP Address |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|