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: creating public synonyms and granting rights via an after create

Re: creating public synonyms and granting rights via an after create

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Tue, 07 May 2002 13:41:59 -0800
Message-ID: <F001.0045AA06.20020507134159@fatcity.com>


Call a stored procedure from your trigger, and declare "PRAGMA AUTONOMOUS_TRANSACTION" there (in stored procedure). In stored procedure use dynamic sql to create a synonym.

Igor Neyman, OCP DBA
ineyman_at_perceptron.com

> > Group:
> >
> > would like to use a ddl triger (after create on schema) to create a
public
> > synonym for the newly-created object,
> > but unfortunately since DDL is not allowed inside the trigger I get
> > ORA-04097: DDL conflict while trying to drop or alter a trigger
> > when creating a new table.
> >
> > A while back I posted this in a MetaLink forum and got a response to use
> > an autonomous transaction for this . . . but declaring the pragma inside
> > the trigger body
> > generates an error when I compile the trigger: PLS-00710: PRAGMA
> > AUTONOMOUS_TRANSACTION cannot be declared here
> >
> > anyone know how to do this? or anyone have a workaround?
> >
> > thanks much
> >
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Magaliff, Bill
> INET: Bill.Magaliff_at_lendware.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: Igor Neyman
  INET: ineyman_at_perceptron.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).
Received on Tue May 07 2002 - 16:41:59 CDT

Original text of this message

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