Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. IP restriction Error in SQL Server 2005

IP restriction Error in SQL Server 2005

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelp
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aman786Singh
    wrote on last edited by
    #1

    I am getting this error Msg 1084, Level 15, State 1, Procedure LOGIN_IP_RESTRICTION, Line 2 'LOGON' is an invalid event type. while executing under code:- CREATE TRIGGER [LOGIN_IP_RESTRICTION] ON ALL SERVER FOR LOGON AS BEGIN DECLARE @host NVARCHAR(255); SET @host = EVENTDATA().value('(/EVENT_INSTANCE/ClientHost)[1]', 'nvarchar(max)'); IF(EXISTS(SELECT * FROM master.dbo.IP_RESTRICTION WHERE UserName = SYSTEM_USER)) BEGIN IF(NOT EXISTS(SELECT * FROM master.dbo.IP_RESTRICTION WHERE UserName = SYSTEM_USER AND ValidIP = @host)) BEGIN ROLLBACK; END END END; i am running it on mAster database and i am using SQL server 2005 standard edition. thanks in advance Aman

    L K 2 Replies Last reply
    0
    • A Aman786Singh

      I am getting this error Msg 1084, Level 15, State 1, Procedure LOGIN_IP_RESTRICTION, Line 2 'LOGON' is an invalid event type. while executing under code:- CREATE TRIGGER [LOGIN_IP_RESTRICTION] ON ALL SERVER FOR LOGON AS BEGIN DECLARE @host NVARCHAR(255); SET @host = EVENTDATA().value('(/EVENT_INSTANCE/ClientHost)[1]', 'nvarchar(max)'); IF(EXISTS(SELECT * FROM master.dbo.IP_RESTRICTION WHERE UserName = SYSTEM_USER)) BEGIN IF(NOT EXISTS(SELECT * FROM master.dbo.IP_RESTRICTION WHERE UserName = SYSTEM_USER AND ValidIP = @host)) BEGIN ROLLBACK; END END END; i am running it on mAster database and i am using SQL server 2005 standard edition. thanks in advance Aman

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Did you install Service Pack 2?

      I are troll :)

      M 1 Reply Last reply
      0
      • L Lost User

        Did you install Service Pack 2?

        I are troll :)

        M Offline
        M Offline
        Manas Bhardwaj
        wrote on last edited by
        #3

        Eddy Vluggen wrote:

        Service Pack 2

        Service Pack 3[^] ;P

        Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        1 Reply Last reply
        0
        • A Aman786Singh

          I am getting this error Msg 1084, Level 15, State 1, Procedure LOGIN_IP_RESTRICTION, Line 2 'LOGON' is an invalid event type. while executing under code:- CREATE TRIGGER [LOGIN_IP_RESTRICTION] ON ALL SERVER FOR LOGON AS BEGIN DECLARE @host NVARCHAR(255); SET @host = EVENTDATA().value('(/EVENT_INSTANCE/ClientHost)[1]', 'nvarchar(max)'); IF(EXISTS(SELECT * FROM master.dbo.IP_RESTRICTION WHERE UserName = SYSTEM_USER)) BEGIN IF(NOT EXISTS(SELECT * FROM master.dbo.IP_RESTRICTION WHERE UserName = SYSTEM_USER AND ValidIP = @host)) BEGIN ROLLBACK; END END END; i am running it on mAster database and i am using SQL server 2005 standard edition. thanks in advance Aman

          K Offline
          K Offline
          Kaushal Arora
          wrote on last edited by
          #4

          Hi Aman, Try to read this article. It is full of information. http://technet.microsoft.com/en-us/library/bb326598.aspx[^] Regards, Kaushal Arora Please Mark as Answer if it Solved Your Problem.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups