2
I have two functions in 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 am used in SQL Server 2000
Tried APP_NAME instead of PROGRAM_NAME? What version of SQL Server is?
– Bacco
I’m using the Sqlserver 2000 version
– alexjosesilva
My condolences for having to use this version.
– DH.