Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Trigger on Create User

Re: Trigger on Create User

From: <G.Plivna_at_itsystems.lv>
Date: Thu, 26 Jul 2001 07:26:02 -0700
Message-ID: <F001.00355FAD.20010726072034@fatcity.com>

Maybe you can simply call procedure with autonomous transaction in system trigger
Is it possible?

Gints Plivna

                                                                                       
                                          
                    Chaim.Katz_at_Completions.Bomb                                        
                                          
                    ardier.com                         To:     Multiple recipients of 
list ORACLE-L <ORACLE-L_at_fatcity.com>       
                    Sent by: root_at_fatcity.com          cc:                             
                                          
                                                       Subject:     Re: Trigger on 
Create User                                   
                                                                                       
                                          
                    2001.07.26 16:42                                                   
                                          
                    Please respond to ORACLE-L                                         
                                          
                                                                                       
                                          
                                                                                       
                                          






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)" <Donna.Maser_at_sea.celltechgroup.com> on 07/25/2001 07:25:19
PM

Please respond to ORACLE-L_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> 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 'is_at_celltech.co.uk'

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: Donna.Maser_at_sea.celltechgroup.com

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: ListGuru_at_fatcity.com (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: Chaim.Katz_at_Completions.Bombardier.com

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: ListGuru_at_fatcity.com (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: G.Plivna_at_itsystems.lv

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: ListGuru_at_fatcity.com (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). Received on Thu Jul 26 2001 - 09:26:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US