Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Locate the wrong login for Oracle without audit enabled

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Establish a trigger:

CREATE OR REPLACE TRIGGER logon_denied_write_alertlog AFTER SERVERERROR ON DATABASEDECLARE l_message varchar2 (2000); BEGIN-ORA-1017: invalid username/password Logon denied IF (IS_SERVERERROR (1017)) THEN select 'Failed login attempt to the' | | sys_context ('USERENV',' AUTHENTICATED_IDENTITY') | |'"schema' | | 'using' | | sys_context ('USERENV',' AUTHENTICATION_TYPE') | | 'authentication' | |' at'| | to_char (logon_time,'dd-MON-yy hh34:mi:ss') | | from'| osuser | |'@'| machine |'['| nvl ('USERENV',' IP_ADDRESS') | 'Unknown IP') | |']'| | 'via the "' | | program | |'" program.' Into l_message from sys. V _ $session where sid = to_number (substr (dbms_session.unique_session_id,1, 4), 'xxxx') and serial# = to_number (substr (dbms_session.unique_session_id,5, 4),' xxxx');-- write to alert log sys.dbms_system.ksdwrt (2je lame message); END IF;END

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report