CREATE OR REPLACE TRIGGER no_create_dblink
BEFORE DDL ON DATABASE
BEGIN
IF ORA_SYSEVENT = 'CREATE' and ORA_DICT_OBJ_TYPE='DATABASE LINK'
THEN
RAISE_APPLICATION_ERROR (-20000,'Cannot create the ' || ORA_DICT_OBJ_TYPE ||' named ' || ORA_DICT_OBJ_NAME ||
' as requested by ' || ORA_DICT_OBJ_OWNER ||'联系管理员');
END IF;
END;
/
验证:
create public database link to_11 connect to scott identified by tiger using 'bylw';
ERROR at line 1:
ORA-00604: error occurred at recursive sql level 1
ORA-20000: Cannot create the DATABASE LINK named TO_11 as requested by
??????????
ORA-06512: at line 4 原文链接:/oracle/207020.html