I have two functions in the sql server that are not being recognized by the database
-- Não loga conexões de usuários de sistema
IF (ORIGINAL_LOGIN() IN ('sa', 'AUTORIDADE NT\SISTEMA', 'NT AUTHORITY\SYSTEM') OR ORIGINAL_LOGIN() LIKE '%SQLServerAgent')
RETURN
and
-- Não loga conexões de softwares que ficam se conectando constantemente
IF (PROGRAM_NAME() LIKE 'Red Gate%' OR PROGRAM_NAME() LIKE '%IntelliSense%' OR PROGRAM_NAME() = 'Microsoft SQL Server')
RETURN
The message I get is:
'ORIGINAL_LOGIN' is not a recognized function name. Server: Msg 195, Level 15, State 1, Procedure Audit_Login, Line 49 'EVENTDATA' is not a recognized function name. Server: Msg 170, Level 15, State 1, Procedure Audit_Login, Line 52
I'm using SQL Server 2000