Is it possible to fire DDL queries from within a trigger?

Hi,
In Oracle 8.0.5, Is it possible to fire DDL queries from within a trigger?
e.g. when no. of rows is multiple of 1000, I wish to call a procedure which
analyzes the table and finds the size of the table. I am getting :
"ORA-04092: cannot COMMIT in a trigger" error message.
Regards
Sanchayan

One way around this is to use the AUTONOMOUS_TRANSACTION pragma, but I think that was introduced in 8i. Check your docs. Another way is to set up a procedure to do the ANALYZE and in your trigger submit a job using DBMS_JOB to run that procedure.
Anyway, the second option is best because you really don't want to impose the overhead of running an ANALYZE onto a DML transaction.
You are also going to run into the mutating table problem: you can't find out how big the table is, because you can't run queries against the table from within a trigger. You could use DATE_LAST_ANALYZED from USER_TAB_COLUMNS, but really you should just schedule jobs to run ANALAYZE at regular intervals - once a day, once a week, once a month, depending on the volatility and usage of any given table.
Cheers, APC

Similar Messages

  • Is it possible to fire an ibot from unix command line?

    Hi,
    Is it possible to fire an ibot from unix command line?
    I am looking to setup a setp in a job in grid control which runs a report in order to create a cached file on the obiee server once a prior step has completed. Is this possible?

    Hi,
    Did you check this?
    is it possible to execute ibot..
    Rgds,
    Dpka

  • Reading Queries from within planning functions

    Hi all,
    Does anyone of you have experience with the following thrilling task: We want to read specific queries from within a BPS function, handing over parameters like company code and profit center, retrieving the query results and writing them into a cube.
    Is this feasible and would anyone know about the function modules to use?
    Many thanks in advance,
    Andreas Krüger

    Andreas,
    I found a soultion for your problem.
    I tried at in my system and it works fine.
    Pl do the following:
    1. Have a multiarea with actual and plan areas or have one area but make sure you load data from actual to plan.
    2. In the level, select all the charactetirtics and key figures that you wish to see in the report.
    3. Make a layout and configure it accordingly. If header has mutiple values, make sure you have a variable on that.
    4.Make a folder and execute it.
    5. When the folder is opened, all the data in the cube will be displayed in the change mode.
    6. View the date and change them if you wish, save.
    Let me know if you ned any help.
    Ravi Thothadri

  • Calling a concurrent request from within the trigger

    Oracle apps r12.
    Calling a concurrent request from within the trigger.
    Does it requre apps initilization.
    Thanks,
    Lavan

    Hi,
    Whether apps initialization needed or not will depend on followings
    1. Trigger is written on which table seeded or custom. In case of seeded tables, there is no need for apps initialization (although oracle does not recommend writing trigger on seeded tables).
    2. Triggering Table Update/Insert/Delete event processing is done from apps front end or Backend. In case of front end apps initialization is not required.
    Regards,
    Saurabh

  • Possibility to abort the execution from within the PreUUT and MainSequence

    Hello,
    This is probably a TS newbie question that most of you can answer right away!
    I'm using the sequential model to develop my test. I cannot figure out how to do terminate the execution from within the PreUUTLoop or MainSequence callback.
    In the PreUUT you can manipulate the parameter ContinueTesting to indicate to the process model that you want to stop testing.
    For the PreUUTLoop and MainSequence callback this parameter is not available.
    I could modify the process model itself to also supply me this parameter for the PreUUTLoop and the MainSequence. (and check for it on return from these callbacks)
    But, I was wondering, is there another (maybe even better) way to do this?
    Thanks for the help!
    noxus.

    Thanks, that's what I was looking for.
    One extra question:
    - From the PreUUTLoop callback it is working fine. (immediately stops the execution)
    - From the MainSequence callback I still get the popup message "Next UUT" or "Terminate". Can I avoid this popup message and just Terminate the execution? (preferably without modifying the process model)
    or, another alternative is that I disable the "Test UUT" entry point and only allow the user to select "Single Pass". Is that possible? Is it possible to disable the "Test UUT" entry point for the sequential process model?
    Message Edited by noxus on 02-22-2007 04:17 AM

  • Is it possible to correct converging verticals from within Aperture?

    Need to correct converging verticals can it be done from within Aperture 3.5.1

    Need to correct converging verticals can it be done from within Aperture 3.5.1
    Sorry, no.
    Aperture does not support lens correction or perspective correction.
    Aperture can however be extended with plug-ins or use external editors for this kind of correction. You can do lens correction with the PT Lens plug-in, or correct converging  verticals with external editors like Photoshop or Gimp.

  • Is it possible to control IP devices from within Muse?

    I want to create a simple iPad app for my own use that will send IP commands wirelessly to devices on a LAN like video projectors. So simply explained these devices have a unique IP port and IP addresses that will accept ASCII strings to call inbuilt routines such as "PowerOn" or "Run Main Timeline", etc. I know this can be dine itch Flash or Air but I don't know how to code on those platforms. Is there a simple way to add buttons in Muse to send these kinds of IP messages?

    Muse is not the right product for this.  You're trying to build a native iOS device application. 
    Look at  Dreamweaver CS6 with PhoneGap Build: 
    (2 min video)
    http://tv.adobe.com/watch/cs6-creative-cloud-feature-tour-for-web/updated-phonegap-support -in-dreamweaver-cs6/
    (5 min video)
    http://tv.adobe.com/watch/cs6-creative-cloud-feature-tour-for-web/using-the-phonegap-build -panel-in-dreamweaver-cs6-to-build-native-applications-for-android-and-ios-devices/
    Nancy O.

  • Calling a procedure from within a trigger

    Hi,
    I have a table (table1) which when a row is inserted into this table I need to populate a number of tables based upon gathering information from multiple tables using three fields passed in from table 1.
    I therefore proposed to create a before insert trigger on table1 calling a procedure which passes in the three new values as follows:
    CREATE OR REPLACE TRIGGER trigger1
    BEFORE INSERT ON table1
    FOR EACH ROW
    BEGIN
    package1.populate_tables(:new.col1, :new.col2, :new.col3) ;
    END;
    This compiles fine, but when I actually insert data in table1 then I receive the following message and do not know how to get round it:
    ORA-04091: table table1 is mutating, trigger/function may not see it.
    I am using other fields in table1 to insert values into other tables (confusing I know).
    If anyone can help me I would appreciate it, or if you require any more information I would be very happy to provide it.
    Thanks in advance.

    Hi,
    You triggered in fired on table and you procedure in acting is on the same table which rasing the exception.
    Go throw this link you will understand
    http://asktom.oracle.com/tkyte/Mutate/
    - Pavan Kumar N

  • Is it possible to change application state from a component?

    I was wondering if it is possible to change application state from within a custom component and if so, what would the syntax be if I had an application named "zzz" and I wanted to change the app state from "state1" to "state2" from my component?
    Thanks!

    Hi,
    you always have a static class Application.
    Application.application will be the root component. After that you can change it state.
    Application.application.currentState = "state2";
    But it's not the best way to change states. It's better to dispatch events from components and change states in listeners.

  • Adding custom css classes from within edge animate

    is it possible to add  CSS classes from within Edge Animate, im not talking about adding your own stylesheet by ex. manually editing the .html document, but rather adding classes via ex. the code window ?, it would be immensely helpful to have everything in one place.
    any suggestions on this one ?

    Yes - you can use addclass() and you can use UI.
    1- UI
    Select elements in elements panel. Click the C button in the property panel.
    Use this for example
    sym.$('.classname').css({'color':'red'});
    2- addclaas()
    sym.$("name').addclass('classname');
    Use same as above.
    On Sat, Apr 25, 2015 at 8:56 AM mads18950258 <[email protected]>

  • Accessing iPad camera from within DPS application

    I have a potential client who asked me if it were possible to access the camera from within a DPS application. I have no further information at this point regarding what the reason for it will be but thought I'd shoot the question out anyway. Apparently it is possible in iOS 6 to access the camera in mobile Safari but I don't know if that is of any help.
    Thoughts? Thanks!
    :jaj

    See http://forums.adobe.com/message/5040166#5040166.
    Neil

  • Starting notepad.exe from within Java app?

    Is it possible to start notepad.exe from within a java app to display a log file (for instance)?

    search the forum for Runtime.getRuntime()

  • Calling MS Access queries from Java

    Anyone have any idea if it's possible to call MS Access queries from Java? I have a client who is insistent on keeping MS Access for their database, and it'd be nice if I didn't have to receate all their queries in Java.
    I've successfully connected to and queried the Access MDB, but I need to know if it's even possible to execute the stored MS Access queries they have setup in the database.
    Thanks!

    See reply 6 in the following....
    http://forum.java.sun.com/thread.jspa?forumID=48&threadID=203818

  • Am I missing something regarding database queries from BPEL?

    Hi,
    I'm trying to execute what I would think is a simple query from within a BPEL process against an Oracle 10g database.
    I have a root table, meter_reading that has an id, a time, a value, and a foreign key to a meter_reading_type table with a simple id-name-description format.
    How do I create a PartnerLink in BPEL that queries for the last reading of a particular type? The SQL is easy. The problem is that with the relationship, I can't find the proper format for a pass-through query so that I can do the subselect AND the select by type (name column).
    Also, is it possible with the BPEL PM/OC4J combination to output the queries being generated from Toplink?
    I've looked through the toplink docs, but they seem to refer to doing this in Java, not in the toplink_mappings.xml file.
    Any help would be appreciated. If I'm missing something obvious, please point it out.
    Thanks for your time,
    Chris

    I am guessing from the examples and from looking around that the only solution to this complexity is stored procs and functions. What happens if you're not allowed to use them? Seems like an awkward part of a product that is owned by Oracle.
    C

  • Exporting Queries from Developer Reports .rdf file

    Is there a way I can extract the queries from the Developer Reports .rdf file.
    We have the reports on a NT File server from where the users access the reports. We do not have the Report tables installed in the database.
    We are using Developer Reports 3.0
    Your help is highly appreciated.
    Thanks,
    Chegi Reddy

    This isn't possible directly. You could use the conversion utility to convert the rdf files to rex files (textual representations), or XML files with the 9i release, and then parse these files to get the queries. Note that since rex is considered an 'internal' representation there's no documentation on the structure, but it shouldn't be too difficult to figure out where the queries are.
    Hope this helps,
    Danny

Maybe you are looking for

  • Want songs in playlist but not in library

    so i have a CD with thousands of short japanese recordings on it, the only way i believe that i can get them onto my iphone/ipod is through adding them to itunes. However when i hit shuffle songs the likelihood of getting a japanese recording instead

  • StorLib error message in the Lenovo Solution Center

    I keep getting an error message under the device manager tab in the Lenovo Solution Center. It says under drivers - 'StorLib bus (virtualstorage support)', status is 'Uninstalled'. I can't find anything anywhere about this or how to correct the issue

  • Error on RESB table changing planning order using BAPI_PRODORD_CHANGE

    Hallo. In my custom program ZINTERFACE_ORDER, I use BAPI 'BAPI_PRODORD_CHANGE' to change multiple production order (quantity / start date/ end date). CALL FUNCTION 'BAPI_PRODORD_CHANGE'      EXPORTING number       =  wk_ordine orderdata    =  wk_orde

  • Switching libraries issue

    iPhoto 11 continues to come up with new and innovative way to annoy and frustrate me. I am running latest version of this and Lion, a new thing has come up when I try and switch between my different libraries. It relaunches, defaults to the attached

  • Calendar not working properly after software upgrade

    Today I upgraded my touch software to version 4.1 (8B117). Since this upgrade, the calendar doesn't work properly. Before the upgrade this is the scenario: I would go into my Calendar (synced with my gmail calendar) in "List" view. There was always a