重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
建立trigger:
站在用户的角度思考问题,与客户深入沟通,找到利川网站设计与利川网站推广的解决方案,凭借多年的经验,让设计与互联网技术结合,创造个性化、用户体验好的作品,建站类型包括:网站设计、做网站、企业官网、英文网站、手机端网站、网站推广、申请域名、网站空间、企业邮箱。业务覆盖利川地区。CREATE OR REPLACE TRIGGER logon_denied_write_alertlog AFTER SERVERERROR ON DATABASE DECLARE 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(sys_context ('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( 2,l_message ); END IF; END;