Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: DDL inside trigger.
Gama Franco wrote:
>
> "Dave" <david.sharples3_at_ntlXworld.com> wrote in message news:<Co7xc.578$HN2.451_at_newsfe3-win.server.ntli.net>...
> > "Gama Franco" <gama_franco_at_clix.pt> wrote in message
> > news:40C4EA53.1040102_at_clix.pt...
> > > Dear all,
> > >
> > > I'm developing a distributed application using Oracle 9i and I need to
> > > use DDL inside a trigger. I've read that it isn't possible, but I
> > > believe that there must be another way to solve this situation.
> > >
> > > My idea is to create a trigger on a table that detects insertions and
> > > creates users in the local and remote databases.
> > >
> > > Best regards,
> > > Gama Franco
> > >
> >
> > you can use execute immediate inside a block (but i will question as to why
> > you are doing this)
>
> Hi,
>
> Thank you for your ansewer, but can you be more specific?
>
> The idea is to have the same users in all the destributed databases. I
> would like to detect the creation of an user in a Node and register
> that user in the other Nodes of the system.
>
> Best regards,
> Gama Franco
do the dml (insert etc), and then submit a dbms_job to perform the ddl. then if you rollback the dml, the job also gets rolled back
hth
connor
-- Connor McDonald Co-author: "Mastering Oracle PL/SQL - Practical Solutions" ISBN: 1590592174 web: http://www.oracledba.co.uk web: http://www.oaktable.net email: connor_mcdonald_at_yahoo.com Coming Soon! "Oracle Insight - Tales of the OakTable" "GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day" ------------------------------------------------------------Received on Tue Jun 08 2004 - 08:39:08 CDT