MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 12th, 2004, 01:29 AM
awbrab awbrab is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Singapore
Posts: 28 awbrab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #2  
Old June 12th, 2004, 06:37 AM
r937's Avatar
r937 r937 is offline
SQL Consultant
Click here for more information.
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 17,919 r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 12 h 51 m 39 sec
Reputation Power: 1018
using SQL? no
__________________
r937.com | rudy.ca

Reply With Quote
  #3  
Old June 12th, 2004, 06:48 AM
awbrab awbrab is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Singapore
Posts: 28 awbrab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old June 12th, 2004, 07:24 AM
r937's Avatar
r937 r937 is offline
SQL Consultant
Click here for more information.
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 17,919 r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level)r937 User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 12 h 51 m 39 sec
Reputation Power: 1018
to do this you need to use a scripting language like asp, php, coldfusion, etc.

Reply With Quote
  #5  
Old June 12th, 2004, 01:18 PM
Al_Dev's Avatar
Al_Dev Al_Dev is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 105 Al_Dev User rank is Private First Class (20 - 50 Reputation Level)Al_Dev User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 h 32 m 21 sec
Reputation Power: 6
Send a message via AIM to Al_Dev
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

Reply With Quote
  #6  
Old June 13th, 2004, 12:33 AM
awbrab awbrab is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Singapore
Posts: 28 awbrab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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?

Reply With Quote
  #7  
Old June 14th, 2004, 12:41 AM
awbrab awbrab is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Singapore
Posts: 28 awbrab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks everyone. I am able to capture the IP address and store into the database already

Reply With Quote
  #8  
Old June 14th, 2004, 07:07 AM
Al_Dev's Avatar
Al_Dev Al_Dev is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 105 Al_Dev User rank is Private First Class (20 - 50 Reputation Level)Al_Dev User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 h 32 m 21 sec
Reputation Power: 6
Send a message via AIM to Al_Dev
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Capture IP Address


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT