I tried the same thing but the trigger gives you an error about ddl operation
not being allowed in a system trigger.
Here is a work-around:
CREATE or REPLACE TRIGGER alteruser
AFTER CREATE on DATABASE
DECLARE
JobNo NUMBER;
BEGIN
IF ora_dict_obj_type = 'USER' THEN
DBMS_JOB.SUBMIT(
job=> JobNo,
what=>'alter_the_user('''||ora_dict_obj_name||''');',
next_date=>sysdate);
END IF;
END;
The job runs once (because there is no interval), and the procedure
alter_the_user is just:
EXECUTE IMMEDIATE 'alter user '||user_in
||' temporary tablespace temp';
Hth,
Chaim
"Maser, Donna (SEA)" <[EMAIL PROTECTED]> on 07/25/2001 07:25:19
PM
Please respond to [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc: (bcc: Chaim Katz/Completions/Bombardier)
Hi Guys,
I was hoping to use the new 8i triggers to prevent
new users from getting assigned to the SYSTEM tablespace.
Has anyone seen a way to build a trigger on a CREATE USER statement?
Thx,
Donna Maser
The information contained in this email is intended for the
personal and confidential use of the addressee only. It may
also be privileged information. If you are not the intended
recipient then you are hereby notified that you have received
this document in error and that any review, distribution or
copying of this document is strictly prohibited. If you have
received this communication in error, please notify Celltech
Group immediately on:
+44 (0)1753 534655, or email '[EMAIL PROTECTED]'
Celltech Group plc
216 Bath Road, Slough, SL1 4EN, Berkshire, UK
Registered Office as above. Registered in England No. 2159282
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Maser, Donna (SEA)
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).