Re: AFTER CREATE trigger (object actually being REPLACED)




"DA Morgan" <damorgan@xxxxxxxxx> wrote in message
news:1196366789.806991@xxxxxxxxxxxxxxxxxxxxxxxxx
Syltrem wrote:
Hi

I have an AFTER CREATE trigger.
I can verify what kind of object has been created by using the
ora_dict_obj_type event attribute function, but is there such a function
that would tell me if the object is being added *or* replaced ?

The object here is a VIEW, and a CREATE OR REPLACE does not always create
the view... in such case I don't want to do anything but the trigger gets
fired anyway.

Or do I have to query DBA_OBJECTS to check CREATED and LAST_DDL_TIME to
make an educated guess ?

Or any better way that you know of...

Thanks

The only way I can think of doing this would be to query all_objects,
or a similar source, to see if the object already exists in the named
schema.

Thing is, this is an AFTER create trigger.
So the object will always exist.
So I've got to use the creation date I guess ?

Syltrem

--

Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan@xxxxxxxxxxxxxxxx (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


.



Relevant Pages

  • Re: getting data in triggers
    ... transaction will hold everything in lock until your trigger is done. ... Looking at your vbscript, you are making a new sqlconnection and attempting ... suggest you create a sql job and schedule it to run these external calls at ... >>> I can execute the script using xp_CmdShell in the SQL Query Analyzer ...
    (microsoft.public.sqlserver.programming)
  • Re: Please help me optimise this stored procedure.
    ... But do you really need this query? ... I assume your query is run in a trigger. ... UPDATE Titles ... Also, I forgot that the counters are in another table, not ...
    (microsoft.public.sqlserver.programming)
  • Re: date question
    ... that being said we have to agree that not all techniques are for all ... I haven't experienced such horrible benchmarks using the DATEDIFF functions. ... whether or not the trigger does any work, it is still a trigger and there ... query you just have to make the change to the code). ...
    (microsoft.public.sqlserver.programming)
  • RE: Triggering IDS
    ... A DNS version query is what we use to trigger NIDS sensors. ... UDP and the trigger is the query. ... vulnerability management needs. ...
    (Pen-Test)
  • RE: I want the user to decide if duplicates are ok
    ... Sorry QBF = Query By Form ... The basics are that you filter a query by the contents of controls on a ... The event to trigger the action is up to you. ...
    (microsoft.public.access.gettingstarted)