Using xmlgen in a trigger -HELP

We are trying to use xmlgen in a trigger, actually a insteadOf on a view but that is really secondary.
The problem we have is that xmlgen doesnt seem to work from a trigger or any other background process. There is no reall erro messgae it just fails.
Has anyone used xmlgen from a trgigger??
Rob

Can't this be done.....
create or replace trigger audit_EMP_DTL
before update or delete or insert
on EMP_DTL
for each row
declare
pragma autonomous_transaction;
v_blockexists number := 0;
no_lock exception;
ReturnExp EXCEPTION;
begin
select     count(a.sid) into v_blockexists
from     v$session a
where     a.sid=(select     tab1.sid
          from     v$lock tab1, v$lock tab2
          where     tab1.block =1
          and     tab2.request > 0
          and     tab1.id1=tab2.id1
          and     tab1.id2=tab2.id2
if v_blockexists = 0 then
insert into audit_blocks(program_name) values ('No block yet');
commit;
RAISE ReturnExp;
end if;
EXCEPTION
WHEN ReturnExp THEN
NULL;
END;

Similar Messages

  • After update row level trigger help

    Hello,
    I have to update some data on a table. I need to be able to undo the update just in case something goes wrong after update is comitted. I decided to keep track of updated rows by inserting new and old values on a audit table using UPDATE ROW LEVEL trigger. Everything working fine as I wished, but here is what I am having a problem in separating each bulk of update by a unique ID... I am not talking about any primary key or autogenerated sequence key here.
    Audit table inserts values: primary key of table, old value before update, new value after update, and time stamp. Now, I want add one more field on the audit table that indentifies each bulk of UPDATE operation... I tried to use session ID, it works fine, but sometimes I may update two or three times, maybe around same time, on the same day from the same session (timestamp doesn't help me). In that case, each UPDATE operation inserts the same session ID on Audit table. I won't know which update operation populated which row of the audit table.
    Can somebody give me how I can resolve this situation. Again, this has to be inside the trigger. Is there any other IDs that I can use? I would appreciate your help. Thanks,

    Can you add a table level trigger in addition to your row level trigger? If so, you could do what you want in there. In the new trigger, formulate a unique value (such as session id || sysdate) and store it using dbms_application_info.set_module and set the MODULE to that value. Then, in your row level trigger code, execute dbms_application_info.read_module and pull the MODULE value and insert it into your audit table.
    The use of session id || sysdate should be fine (and unique) in this context. You'd just have to know at what time the UPDATE batch occurred that you wanted to undo.
    By the way, you could use LogMiner to do what I think you're trying to create with the use of your trigger code and table entries. Recall the Oracle keeps the undo and redo data for every row that is updated in the redo/archive logs. Using LogMiner, you could find and undo any change from any time. Just like your method, you'd have to know when the "bad" thing occurred in order to find the correct log and "mine" it, but all the functionality is there. There's a kinda old, but very good, article by Arup Nanda at http://www.oracle.com/technology/oramag/oracle/05-jul/o45dba.html that reviews how it all works. You may want to look at it to see if you can avoid re-inventing the wheel to meet your needs. Just a thought....
    Karen

  • TS3988 My icloud account is not verifying it says check my mail witch I have done and I get a message say your iPhone for has been used to set up and Icloud account but still can not use the icloud can anybody help me.

    My icloud account is not verifying it says check my mail witch I have done and I get a message say your iPhone for has been used to set up and Icloud account but still can not use the icloud can anybody help me.

    Be sure you are checking the email account that you used to set up the Apple ID you used to create the iCloud account.  Also, be sure to check your spam/junk folder as well as your inbox.  The email you should receive looks like the image below.  When you get it, click the Verify Now link.
    If it still isn't there, try going to https://appleid.apple.com, click Manage your Apple ID, sign in, click on Name, ID and Email addresses on the left, then to the right look for a link to resend the verification email.

  • Using a link to trigger a delete action on form page?

    Hello,
    I have been unable to find an explanation about how to do this in the documentation, these forums or the old interakt forums.
    Is it possible to use a link to trigger the delete action on a form page?
    If so how is it done?
    Thanks in advance!

    Sorry Purple.. I know that there is a delete link that triggers the delete transaction on the form page..
    The question was if anybody knew if I am able to use a link to trigger that delete transaction (on the form page), much like a dynamic list has a link that will trigger the delete transaction on the form page.
    I don't want to use a dynamic list in this case though. :)
    Thanks anyways,
    Drew

  • When I plug my iPod into the computer, itunes won't come up on the screen and my iPod is not recognized anymore and it use to be. Please help because I can't sync it at all because it won't show up as a device

    When I plug my iPod into the computer, itunes won't come up on the screen and my iPod is not recognized anymore and it use to be. Please help because I can't sync it at all because it won't show up as a device on the right hand side of itunes.

    Try
    iOS: Device not recognized in iTunes for Windows
    I would start with              
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    Before you reinstall the Apple software, also remove iCloud vi Control Panel Remove programs. The reinstall the Apple programs
    New cable and different USB port?
    Runs this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Try on another computer to help determine if computer or iPod problem

  • HT1335 My ipod classic have no software and I am stuck with it. It was formatted for apple but I use windows 8.  Please help. Thanks in advance.

    My ipod classic have no software and I am stuck with it. It was formatted for apple but I use windows 8.  Please help. Thanks in advance.

    Hello there, DrDhillon.
    The following Knowledge Base article goes over the steps that will help you resolve your issue:
    Restoring iPod to factory settings
    http://support.apple.com/kb/HT1339
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • HP Enterprise - Use Cloud-based HP Online Help to Troubleshoot Printing

    HP LaserJet Enterprise printers and HP Officejet Enterprise printers have cloud-based Online Help available to troubleshoot printing issues. HP Online Help users can scan a QR code on the printer display using a mobile phone or tablet, or click an error-specific link in the Event Log of the Embedded Web Server, to automatically retrieve the most relevant and up-to-date information or video to help resolve the issue at the control panel.
    Use Cloud-based HP Online Help to Troubleshoot Printing c04672002
    Setup and Configure Cloud-based HP Online Help  c04671899
    https://www.youtube.com/watch?v=IZyuyDz0Nz0
     

    Hi @Sunshyn2005
    I timed-out waiting for advice, and contacted HP Support, who helped me get the printer back on the air.  While we didn't manage to root-cause it, in the course of trying various things, the tech disabled Norton 360's firewall, which then allowed connecting to the printer, and restoring print service, which remains up after re-enabling the firewall. 
    The timing of the disconnection doesn't neatly corellate with any Windows updates.  My own theory is that it was caused by a 360 update, but am unable to find a smoking gun, since 360 doesn't provide update history.  The exact root-cause remains a mystery, but at least provides another thing for folks to try should they find themselves in similar straits.
    I really appreciated your hint that a Windows update might be the root cause, and your pointing out how to review the history and back-out updates: this morning, I found that Windows had installed a batch of updates overnight, and found that no browsers worked.  Using your advice, I rolled back the update, restoring browsing.
    Thanks,
    -rjs

  • I cannot use data back up when I use iphone4s in iphone5 ,please help me?

    I cannot use data back up when I use iphone4s in iphone5 ,please help me?now a day I use iphone5 and ipad4 I love apple

    I back up in iCloud when I used iPhone 4S,but now I want use data iCloud in iphone5 but I cannot do it,please help me?what should Ido ?

  • I am working on Mac OS 10.7.2 using Quark 9.I. The program keeps shutting down every time I try to work on a file I created on my MacBook Pro using Quark 7.01. Help!

    I am working on Mac OS 10.7.2 using Quark 9.I. The program keeps shutting down every time I try to work on a file I created on my MacBook Pro using Quark 7.01. Help!

    http://support.quark.com/SSP/Login.aspx?ReturnUrl=/ssp/default.aspx

  • I can't connect my ipad air to my computer. It comes up with the message  'connection has timed out'. I use windows vista. Please help, I want my music catalogue on my ipad. Thanks

    I can't connect my ipad air to my computer. It comes up with the message  'connection has timed out'. I use windows vista. Please help, I want my music catalogue on my ipad. Thanks

    Have you updated your iTunes? iOS7 requires at least iTunes 11.

  • I´m trying to open an excel file in numbers not being successful. The error msg is unexpectedly error using plugin SFCompatibility can you help me?

    I´m trying to open an excel file in numbers not being successful. The error msg is unexpectedly error using plugin SFCompatibility can you help me? Already changed the extension of the excel document to xlsx an now gives an unknown import error.

    In Excel have you tried saving directly to xls (not xlsx) and opening the xls in Numbers?
    If you have a complicated workbook in Excel that uses lots of Excel's advanced features, Numbers may not be able to handle the import.  It does pretty well on basic things, though.
    If you're just trying to get data into Numbers, then often copy-paste from Excel is easier than trying to open xls files.
    SG

  • I downloaded a form and saved as pdf yet cannot attach to email, says in use but all are closed help!

    i downloaded a form and saved as pdf yet cannot attach to email, says in use but all are closed help!

    for the moment you can Forcequit, as Eustace said.
    Really quit a program you do by clicking the menu bar of the program where its name is, on the bottom you see "Quit (appname)"; when it is in the Dock, rightclick it in the Dock and choose "Quit".
    Now about yout attachment: it does not matter what you did to it and where you moved it, as long as Preview is still open it doesn't let it go.

  • I have iTunes 11 on PC and Mac. How do I transfer SOME songs from PC to Mac using ver. 11? Help!

    i have iTunes 11 on PC and Mac. How do I transfer SOME songs from PC to Mac using ver. 11? Help!

    Use Home Sharing
    Understanding HomeSharing
    Setting up Home Sharing

  • When I reboot my iMac I'll get hard disk selection instead of fast login and I am not using boot camp! Any help is greatly appriciated!

    When I reboot my iMac I'll get hard disk selection instead of fast login and I am not using boot camp! Any help is greatly appriciated!

    Have you selected which disk you want to boot from? In System Preferences, click startup disk and choose the drive you want as your default boot drive.

  • Do you know how to use Flash? can you help?

    hi all,
    Do you know how to use Flash?
    I have been trying for months to find someone who can use
    flash, who can help me, with no luck.
    I need my links on my website updating, just a couple of them
    need the text changing as i need
    to change the name/title of some pages. I have tried to do it
    myself (using a trial version of flash,
    as i dont have flash). the site was made using dreamweaver.
    the files are .FLA
    and before anyone says 'get the person who made the site to
    do it'....He wont, ive tried.
    when i tried to change them myself i cocked them up and now
    they dont work at all, see my
    website and you will see; www.stevenallenphotography.co.uk
    so, if you can use flash please can you help me? all i need
    doing is the file updating with some
    of the link titles/names changing, i.e. one link is
    'exhibitions' which needs changing to 'published work',
    please get in touch if you can help.
    thanks,
    steven.

    I used divx in my site once its really very nice! but i use it in different host not .mac...try this divx web player with video selector code --------<object id="ie_plugin" classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616"
    width="640" height="480"
    codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
    <embed id="np_plugin" type="video/divx"
    width="640" height="480"
    pluginspage="http://go.divx.com/plugin/download/">
    </embed>
    </object>
    <script type="text/javascript">
    // This code detects which browser we are
    // running into (IE or others) and assigns
    // the correct element (object or embed) to
    // the "plugin" variable, that we will use.
    var plugin;
    if(navigator.userAgent.indexOf('MSIE') != -1)
    plugin = document.getElementById('ie_plugin');
    else
    plugin = document.getElementById('np_plugin');
    // This is a local JS function used by our form
    // element to call the plugin functions using
    // the "plugin" variable that we defined above
    function openNewMovie()
    var url = document.forms['videoSelector'].movie.value;
    if(url != '')
    plugin.Open(url);
    </script><form name="videoSelector">
    Choose a video to play:
    <select name="movie" onChange="javascript:openNewMovie();">
    <option value="" selected>Video Selector
    <option value="http://www.yourdomain.com/folderdivx/name.divx">title1 divx
    <option value="http://www.yourdomain.com/folderdivx/name.divx">title2 divx
    </select>
    </form> ---------------------
    Hope this help!

Maybe you are looking for

  • Firefox crashes when 'save as'-dialog is shown

    Hi, Arch 64bit, fully up to date (gnome 3.8 installed the day before yesterday). Upon saving a file from a website, Firefox hangs completely for a few seconds and then crashes. Performing the same task with Chromium works. Does anyone have a clue? Th

  • Heating Issue with P4

    Hey Everyone I've been reading alot lately in this forum, and there is lots of good info, but I was hoping that someone can help me out. I recently upgraded my PC, from a P4 2.53 GHZ with a Asus P4PE motherboard with cheap PSU and RAM and case to a C

  • Creating a pdf with user selectable images?

    Hello, I'm quite new to indesign and need some help. I really hate to be that guy saying "quick someone fix my problem for me" but I'm signifigantly behind schedual and this is holding me up. Basically, I need some way to alow a used to select from a

  • I have an ipod classic with 4gb, it is full. What is the most economical way to upgrade to at least 16gb

    I have an ipod classic with 4gb, it is full. What is the most economical way to upgrade to at least 16gb? (I don't want to delete anything)

  • The AUR needs a forum section (rather than visa versa)

    The AUR needs everyone working together to suceed.  We need the users to put their PKGBUILDs in, do their voting and get some feedback on the interface and processes from the users. To do this we have the tur-users mailing list, which is great for co