Click here to Skip to main content
15,878,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

How can we get the Ip address of the server from which my sql server accessed.
consider some fishing things happened with database ,i want to know the ip addresses from where all the Sqlserver is connected.


Thanks
Posted
Updated 15-Aug-13 20:12pm
v2

You can run the SQL server profiler. It list down all the request that comes to SQL database. Then you can identify which request is genuine and which is not.
 
Share this answer
 
Comments
kishore sharma 16-Aug-13 3:13am    
Thanks mR.Brij i need to look into Sql server profiler,
I think this will monitor the current happening with database,that means we can check only once we come to know some fishing thing happened. but if i want to check from which Ip address my database accessed yesterday (i mean in past).
can You suggest anything more
Brij 16-Aug-13 3:38am    
You can schedule the SQL trace as well that will run accordingly and later you can go and check the logs.
http://technet.microsoft.com/en-us/library/ms187656.aspx
1) If you mean someone accessing your application & doing hanky panky with the front end, what I can think of is that you can use a stored procedure on certain screens that is called on the front end on certain operations you want to log. Then, you could provide that procedure with necessary identification parameters such as IPAddress, userName etc. & log these in a separate table.

2) If you are trying to log someone using SQL server you can use ConnectionProperty. However, I wonder if this would return you the application address if this is applied on a web application. This would help http://msdn.microsoft.com/en-us/library/bb895240.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900