Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««23456

Blocking Users by IP Expand / Collapse
Author
Message
Posted Friday, November 8, 2013 4:54 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Today @ 6:39 AM
Points: 26, Visits: 174
nice article, it's good to see those papers re-published.

can anyone help me on how to get the "hostname" from EVENTDATA() ?

ty
Post #1512609
Posted Friday, November 8, 2013 8:08 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, May 15, 2014 9:29 AM
Points: 108, Visits: 113
I think I'll use this to prevent my co-workers from using the web service login to connect to SQL instead of the login I provided them. I'll just block that login unless it comes from the primary or backup Web Servers.
Post #1512696
Posted Monday, November 11, 2013 2:21 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, July 18, 2014 12:04 PM
Points: 2,186, Visits: 68
I am trying to run following query -

DECLARE @IP NVARCHAR(15);
SET @IP = (SELECT EVENTDATA().value('(/EVENT_INSTANCE/ClientHost)[1]', 'NVARCHAR(15)'));
Select @IP

It is returning Null. Am I doing something wrong ?
Post #1513040
Posted Tuesday, November 12, 2013 7:44 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 8:39 AM
Points: 104, Visits: 938
Look in BOL:

"EVENTDATA returns data only when referenced directly inside of a DDL or logon trigger. EVENTDATA returns null if it is called by other routines, even if those routines are called by a DDL or logon trigger."

Lee

Post #1513463
« Prev Topic | Next Topic »

Add to briefcase «««23456

Permissions Expand / Collapse