CREATE OR REPLACE TRIGGER SYS.restrict_ddl_in_db
BEFORE ddl ON DATABASE
DECLARE
machinename VARCHAR2(64);
message VARCHAR2(150) := 'You have no rights to execute DDL statements on DEVELOPBETA! Call the DBA! ';
BEGIN
SELECT SYS_CONTEXT ('USERENV', 'host') INTO machinename FROM DUAL;
IF machinename IS NULL then
message := message || ' ' || 'NULL';
else
message := message || ' ' || machinename;
end if;
IF INSTR(upper(machinename),'*****WORKGROUP\XPSP3-WBB',1) <> 0
OR INSTR(lower(machinename),'bg\fed',1) <> 0
OR INSTR(lower(machinename),'bg\plamen',1) <> 0
OR INSTR(lower(machinename),'developbeta',1) <> 0
OR INSTR(lower(machinename),'oralin1',1) <> 0
OR machinename IS NULL
THEN
null;
ELSE
RAISE_APPLICATION_ERROR (num => -20000,msg => message);
END IF;
END;
/
Halim is a Sr. Database Engineer/Data Architect (in Atlanta, USA) who is an Oracle certified (OCP) DBA, (OCP) Developer, Certified Cloud Architect Professional as well as OCI Autonomous DB specialist with extensive expertise in Database design, configuration, tuning, capacity planning, RAC, DG, Scripting, Python, PL/SQL etc. He achieved 16th position in worldwide first-ever PL/SQL Challenge cup playoff- http://plsql-challenge.blogspot.com/2010/07/winners-of-first-plsql-challenge.html
Monday, December 7, 2009
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
Index Usage – 21 week ago
-
-
-
-
-
-
-
-
Oracle Cloud & Third party tools3 years ago
-
-
-
Moving Sideways7 years ago
-
Upcoming Events...10 years ago
-
No comments:
Post a Comment