Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / January 2007

Tip: Looking for answers? Try searching our database.

Auditing and IP addresses

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PBsoft - 10 Jan 2007 20:22 GMT
In a database I created an audit table in which, e.g., I insert one record
for each INSERT statement made on another table (via a trigger).

My problem is to recover remote IP address of the connected client which
does the INSERT.

I tried to use DMV sys.dm_exec_connections because it contains a "client_net_address"

field: it was just what was searching for.
But, unfortunately, this DMV requires VIEW SERVER STATE permission, which
is not assigned to any user.

May you tell me how can I solve this problem, avoiding to assign that permission
to everybody?

Thanks all.

--
PBsoft di Gabriele Bertolucci
www.pbsoft.it
skype:pbsoftsolution
Jens - 10 Jan 2007 21:29 GMT
Hi,

this is the only way to get the information. prior to the DMV you had
to retrieve the information from XP_cmdshell:

http://www.sqlserver2005.de/Articles/3/

HTH, Jens K. Suessmeyer.

---
http://www.sqlserver2005.de
---
Erland Sommarskog - 11 Jan 2007 23:15 GMT
> In a database I created an audit table in which, e.g., I insert one record
> for each INSERT statement made on another table (via a trigger).
[quoted text clipped - 11 lines]
> May you tell me how can I solve this problem, avoiding to assign that
> permission to everybody?

Create a certificate and which you sign the trigger with. You need to
have this certificate in master as well. Then create a login from that
certificate, and grant that login the rights.

I have an article on my web site that describes this in a lot more
detail: http://www.sommarskog.se/grantperm.html.

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Delia - 22 Jan 2007 20:35 GMT
try the auditdatabase
auditing tools ( http://www.auditdatabase.com/AuditTools.html ) for
generate audit triggers (FREE)  for SQL Server and other DBMS's)
This triggers save the client IP and MAC information

Delia.

Erland Sommarskog ha escrito:
> > In a database I created an audit table in which, e.g., I insert one record
> > for each INSERT statement made on another table (via a trigger).
[quoted text clipped - 26 lines]
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.