Need enable all triggers start eith 'EMP_'

Hi ,
i am looking for a single query to enable all of my triggeers start with trigger name'EMP_' insted of enable all triggers individually.any help??

in pl/sql something like:
  begin
    for i in (select owner||'.'||trigger_name trg_name
                from all_triggers where trigger_name like 'EMP_%' and status = 'DISABLED') loop
      execute immediate 'alter trigger '||i.trg_name ||' enable';
    end loop
  end;
in sql spool the file then run the spool file.
  set verify off;
  set echo off;
  set fedback off;
  spool c:\sql\enabled_trigger.sql;
  select 'alter trigger '||owner||'.'||trigger_name||' enable;' from all_triggers
   where trigger_name like 'EMP_%' and status = 'DISABLED';
  spool off;
  set fedback on;
  set echo on;
  set verify on;

Similar Messages

  • Enable all triggers/Recompile all procedures???

    Hi,
    I have a good number of triggers I want to enable and procedures/functions I want to recompile. I tried to create a cursor for it but got the error (please find below) apparently I'm missing something in my code...
    I wonder if it's possible at all?
    Please help)))
    Thanks a lot
    Marina
    Here is my code and error message:
    SQL> DECLARE
    2 TRIG_NAME VARCHAR2(40);
    3 FETCH_STATUS INTEGER;
    4 RC2_NAME INTEGER;
    5 ROWS_PRSD INTEGER;
    6 CURSOR RC1 IS SELECT OBJECT_NAME FROM ALL_OBJECTS
    7 WHERE OBJECT_TYPE ='TRIGGER' AND STATUS='INVALID';
    8 BEGIN
    9 OPEN RC1;
    10 FETCH RC1 INTO TRIG_NAME;
    11 IF RC1%NOTFOUND THEN
    12 FETCH_STATUS:=-1;
    13 ELSE
    14 FETCH_STATUS:=0;
    15 RC2_NAME:=DBMS_SQL.OPEN_CURSOR;
    16 END IF;
    17 WHILE FETCH_STATUS=0 LOOP
    18 DBMS_SQL.PARSE(RC2_NAME, 'ALTER TRIGGER :X ENABLE;', DBMS_SQL.NATIVE);
    19 DBMS_SQL.BIND_VARIABLE(RC2_NAME, ':X', 'GCM.'||TRIG_NAME);
    20 ROWS_PRSD:=DBMS_SQL.EXECUTE(RC2_NAME);
    21 FETCH RC1 INTO TRIG_NAME;
    22 IF RC1%NOTFOUND THEN
    23 FETCH_STATUS:=-1;
    24 ELSE
    25 FETCH_STATUS:=0;
    26 END IF;
    27 DBMS_SQL.CLOSE_CURSOR(RC2_NAME);
    28 END LOOP;
    29
    30 END;
    31 /
    DECLARE
    ERROR at line 1:
    ORA-04070: invalid trigger name
    ORA-06512: at "SYS.DBMS_SYS_SQL", line 824
    ORA-06512: at "SYS.DBMS_SQL", line 32
    ORA-06512: at line 18

    Hi Marina....
    It's so easy it not even like Oracle.
    DBMS_UTILITY.COMPILE_SCHEMA (schema VARCHAR2);
    In case you don't believe it....
    otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/appdev.817/a76936/dbms_ut2.htm#1002085
    Note: You may have to edit out the '<br>'s put in by the Forum code to get the URL to work. Also you may have append some of the URL which may be truncated, usually the bookmark(#nnnn).
    Smile while you compile. Good Luck.

  • Input paramter--Trigger Starting String  _disable all triggers

    I want a procedure where input parameter is trigger's starting letter and the function shoudl disable all triggers starting with that name
    Please help me

    Hey,
    You can use this procedure:
    create or replace procedure p_disable_all_trg_by_letter(p_letter in varchar2,
    p_disable boolean,
    p_table boolean) is
    begin
    If p_table Then
    for i in (select trigger_name
    from user_triggers
    where table_name like upper(p_letter) || '%') loop
    execute immediate 'alter trigger ' || i.trigger_name || case when p_disable then ' disable ' else ' enable ' end;
    end loop;
    Else
    for i in (select trigger_name
    from user_triggers
    where trigger_name like upper(p_letter) || '%') loop
    execute immediate 'alter trigger ' || i.trigger_name || case when p_disable then ' disable ' else ' enable ' end;
    end loop;
    End If;
    end;
    Note that this procedure takes 3 argument's:
    a. the table or trigger name (could be one letter or more)
    b. boolean flag - true will disable the triggers, false will enable them
    c. boolean flag - true will search by the table name, false by the trigger name
    Amiel.

  • Cannot start VM - IDE Emulator Failed to Power on with Error 'The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.'

    HI all.
    New install of 2008R2 on HP DL-380 G6.  I have created (several) VM's none of which will start.  If I remove the IDE Hard Disk and add a DVD of the OS ISO, it will boot and start the install (although with no HDD). 
    It seems like the IDE controller is working ok - it is what the DVD drive is using, but it cannot mount a VHD.  The error indicates a driver is not working (although the DVD on IDE works fine) so something to do with VHD?  I can attach the VHD
    in disk management, so it does not seem corrupt - again I have tried with both dynamic and fixed VHDs.
    Full error is:
    'Test1' failed to start. (Virtual machine ID 4320D2D6-DF7E-40D2-BD0F-9562CBB9F052)
    'Test1' Microsoft Emulated IDE Controller (Instance ID {83F8638B-8DCA-4152-9EDA-2CA8B33039B4}): Failed to Power on with Error 'The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.' (0x80070422).
    (Virtual machine ID 4320D2D6-DF7E-40D2-BD0F-9562CBB9F052)
    'Test1': Failed to open attachment 'C:\Users\Public\Documents\Hyper-V\Virtual hard disks\New Virtual Hard Disk.vhd'. Error: 'The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.' (0x80070422).
    (Virtual machine ID 4320D2D6-DF7E-40D2-BD0F-9562CBB9F052)
    Any Ideas?

    Hi ,
    Did  you try to disable the services , if they are exsit :
    HP Smart Array SAS/SATAEvent notification
    HP Insight storage agents
    Then restart your server .
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • I have enabled all cookies, yet some sites say cookies need to be enabled for me to get access. How do I fix this?

    I have enabled all cookies, yet some sites say cookies need to be enabled for me to get access. How do I fix this?

    First check the settings and try all of the options in the [[websites say cookies are blocked]] article.
    In addition to the above, another possible cause is the file that stores cookies is corrupt, if that is the case deleting the file should fix the problem. First you need to locate your profile folder, for details of how to do that see the [[profiles]] article. Once you have opened the profile folder, close Firefox and either delete or rename cookies.sqlite, when you restart Firefox that file will be re-created.

  • Intergated WLS not starting after enabling all "Debug" flags

    Hi,
    I have JDeveloper 11.1.1.4 with Integrated Weblogic Server. I had enabled all "Debug" flags in WLS servers and now after the required bounce, it is not coming up. I should not have enabled all "Debug" options, but I'm just unable to login to disable it.
    Is there any way to get around this issue?
    Thanks,
    Vikas

    Also check if you could comment the below similar elements in the config.xml and restart the server, if you have not maintained the backup copy of the configuration file.
    <server-debug>
          <debug-scope>
            <name>weblogic</name>
            <enabled>true</enabled>
          </debug-scope>
        </server-debug>
    If the server still fails to start, please check the server log , for any critical issues or errors and revert back with the details or error stack trace to further assist you.
    Thanks,
    Vijaya

  • Font book keeps enabling ALL of my fonts - Overloading my system

    When I restart my computer or just Font Book, Font Book enables ALL of my fonts. I have over 1100 fonts. It eats up all of my RAM (3GB) and the computer grinds to a slow crawl. I have deselected "automatic font activation" in preferences. I have created "collections" so I can activate and de-activate groups and manage the many fonts. I can even go through EVERY non-system font and manually deactivate them. But they will all activate at restart. I have been having this problem for years with ALL versions of Font Book from day 1. I am now on OSX Lion with Font Book 3.0. Same problem. Yet I see few posts about other s dealing with this. What's could be causing FB to open all fonts?
    Is there a fix for this? Is Font Book worth the trouble? I have known people (also with large font collections) who claim it works fine for them. If not, how do I bring in new font managment software and shut down Font Book to avoid any conflicts?

    Don't count on Font Book to help you at this point. With a lot of bad fonts on the system before, it's now likely that its database is hosed. When that happens, Font Book does all kinds of strange things. Like not being able to activate or deactivate fonts that are in its list.
    To straighten things out, do this:
    1) Go directly to the following folders, not through Font Book. Delete all fonts in the /Library/Fonts/ folder. Delete all fonts in the Fonts folder of your user account.
    2 Restart the Mac and hold down the Shift key to start up in Safe Mode. This takes awhile as the OS is doing multiple checks. For your particular needs, it also clears all cache files from your user account and trashes Font Book's current database.
    3) When the Safe Mode startup is done, your Mac will be at what looks like your normal desktop. Restart again normally.
    4) Follow the directions at the bottom of the article ~Bee linked to in order to restore just the fonts from the Snow Leopard installation disk.

  • Just installed Firefox 3.6. Firefox will not start and Firefox safemode does not start either. Using Task manager I do not see if started either. If I create a new profile and start from that window, Firefox starts up. I see no error windows/messages. I d

    Just installed Firefox 3.6. Firefox will not start and Firefox safemode does not start either. Using Task manager I do not see if started either. If I create a new profile and start from that window, Firefox starts up. I see no error windows/messages. I do have it listed in my Firewall as an exception program with Permit All. What is happening?
    == This happened ==
    Every time Firefox opened
    == After removing Firefox and Reinstalling it. ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; MS-RTC LM 8)

    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    See also [[Basic Troubleshooting|#Make_a_new_profile|Basic Troubleshooting: Make a new profile]]

  • Button to enable all checkboxes on front panel

    I have checkbox controls on the front panel to select various functions of my VI.  I would like to have buttons to check ("enable all") and un-check ("disable all") all the checkboxes at once, if desired.  Preferably, I'd like to see the boxes activate (show the checkmark) prior to starting the VI -- like they do when you select them one by one.  I am fairly new to LabView & am using 7.0 Pro.  Any help would be appreciated.
    JH

    Here's a picture of the code. Pretty simple.
    Message Edited by altenbach on 04-05-2006 09:23 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    AllOnOff.png ‏7 KB

  • New to Mac - do I need to create a start-up disc?

    Hi
    I've recently switched over to an iMac from PC - I've worked with macs but I didn't have to deal with back-ups myself (they were all networked)
    I have an external HDD which uses Time Machine to back-up - I did hope to use that as back-up and keep a stash of stock photos (large file!) on there too but I've heard that it's not a good idea to do that (even if I partitioned the drive)
    My main issue is that I've heard that the back-ups cannot be used as a 'start-up' disc in case something happens to the iMac - so can someone let me know how I should go about doing this? (I didn't get any discs with the iMac so what do I do if something does happen?)
    and while I'm asking questions... do you think I should get another external HDD? one to use for photo storage etc (I work professionally with Photography so they are large files) and then use the other for time-machine?
    can you use a smaller sized HDD for time-machine? (the external drive I have now is 500GB -
    Model Name: iMac
    Model Identifier: iMac8,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2.8 GHz
    Memory: 4 GB
    Hard Drive 320GB

    I've moved over from a PC to a MBP since May, and have dealt with similar backup issues concerning backups of software projects (also large files) daily. So I can share my thoughts and experience here.
    1) I would keep the photo file originals on a separate external USB HDD (not the Time Machine backup) with Read-Only attribute. When I copy files from my Mac to an external disk drive, I think it automatically takes on an archive attribute (read-only). With Leapord 10.5, I think that drive can even be in NTFS format (as used by Windows XP & Vista).
    Since HDD eventually fails, I would, over time, back up these high resolution photos on Dual density (8GB) DVDs.
    Because it'll probably take too many DVDs to back up al the photos, an easier option is to purchase an external backup drive systems that automatically back up a copy of your data on its own separate physical HDD package inside the same box. At the minimum, the box would actually contain two identical size HDD, but you get to use only one. The second drive is for the automatic backup. These boxes are called RAIDs, and a decent one will notify you when it detects a disk error on any one of the two drives so you can preventively replace the faulty drive to give your data full protection. The best I've seen cost $800 list for a TeraByte of protected disk storage. This box actually uses multiple data redundancy schemes to give you flexibility in buying HDDs as your need grows, but you do need to start with at least two drives for data protection. See...
    http://www.drobo.com/WheretoBuy/Index.html
    A review of its abilities and limitations was published on ZDNet..
    http://blogs.zdnet.com/Ou/?p=508
    The author of the review called himself his first review harsh, and I agree since the limitations was due to physics and user selection of disk drives that were installed, no design.
    2) For any photo files that I am manipulating daily, I would keep them on my Mac so that Time Machine so that every revision I make is backed up.
    As far as whether you need to create a start-up disk, I believe the answer is no. From Apples own online documentation, you can recovering your Mac installation from Time Machine. I understand that if you allow Time Machines to back up up everything (default setting), the procedure to full system recovery is:
    1) Reformat the boot disk and restore MacOS X from the CDs that came with the computer.
    2) Connect the external Time Machine backup drive, bring up Time Machine and restore. You can find the details by searching the Time Machine discussions. I saw some users even tried the procedure out for real.
    I've consider using one of the many backup software to back up a full disk image of my Mac, so I re-install my Mac with that disk image. The problem with this is it's a duplicating backup scheme: twice the amount of work and cost. And when the mac crashes, which one backup do I use?

  • OIM 11g - User Not enabled After the job "enable user after start date"

    Hi,
    I have a future hired user in OIM whose start date is set in OIM. The status of the user in OIM is 'Disabled Until Start Date'.
    After the start date has passed and the scheduled job 'enable user after start date' is run, I see that the user is still in the status 'Disabled Until Start Date'. I re-run the scheduled job 'enable user after start date', this time manually, still the state of the user remains unchanged.
    Please help in troubleshooting as to find out the root cause of the issue and a workaround/solution, if possible.
    This issue is intermittent and has happened with quite a number of user. Any pointer would be helpful.
    Regards,
    Sudipto S.

    I agree with Nayan.
    One alternative approach can be to write your own custom scheduler which can overcome the limitation of OOTB scheduled job 'enable user after start date'. Let the OOTB job get executed first. After it, your custom scheduler should fire a simple SQL Query:
    SELECT USR_KEY, USR_STATUS FROM USR WHERE (USR_START_DATE > SYSDATE -1) AND USR_STATUS='Disabled Until Start Date';
    //Means those users who are supposed to get enabled today and are still not yet enabled and are in 'Disabled Until Start Date'. May be 2-3 user keys at max will come...
    As you said it happens only intermittently and not for all users... So, let the OOTB scheduled job take care of most of such users... And after it has finished, if any user still remains in 'Disabled Until Start Date', your custom scheduler should enable it via using tcUserOperationsIntf.enableUser(userKey);
    Using API is always better than database update... Because APIs trigger downstream provisioning workflows as well and not just updates OIM Database...
    Keeping your constraints in mind, I think it is the correct answer.

  • InDesign CS3 (WIN): "Enable all profiles" scriptable ?

    Hi,
    We have to following problem: We have a large collection of IND files from different sources. When creating output, we want the image profiles to be enabled. The only way to do this, it seems, is manually when opening a document with a mismatched color profile, and there choose "Enable all profiles" for placed content. Trouble is, we can't seem to script this option. Question: Is it possible to disable the warnings and "enable all profiles" for placed content after the document is openend via a script? Or is there another option to script that all placed image profiles should be enabled, before exporting a PDF?
    I hope you can help, where quite desperate...
    Thanks,
    Frank

    Hello John,
    I think you should start by modifying your *WidgetEH boss definition in your framework resources - replacing the IID_IBOOLEANCONTROLDATA it aggregates by an IID_IINTEGERCONTROLDATA - then you'll have to follow this boolean field down deep into your *WidgetEH implementation to replace it to any flavour of integer value you are used to.
    Doing it that way you'll be able to store a state value from 0 to 7 - by example: that would be much closer from the behaviour you are looking for than a boolean toggle I'll guess.
    Is this making sense to you?
    Best regards
    Patrick Perroud

  • Enabling all SATA ports on a 875P Neo-FIS2R

    I need to buy a new DVD writer, because my old one died. Since most of them are SATA now, I was wondering if I could enable all 4 SATA ports on my mobo, in order to plug the DVD writer? I already have SATA 1 and 2 ports occupied. Thanks.

    The two other SATA ports on your board are provided by the Promise controller. It does not support optical drives.
    There are still plenty of PATA (IDE) optical drives around, just find one of those instead.

  • Standard Vendor IDoc CREMDM04 needs to be triggered from the transactions

    The Standard Vendor IDoc CREMDM04 needs to be triggered from the following transactions:
    u2022XK01 (Create Vendor)
    u2022XK02 (Modify Vendor)
    u2022User Exit EXIT_SAPOTM_VEND01 .
    The following are some more details:
    u2022Receiving System: SAP PI
    u2022Sending System: SAP ECC
    u2022Direction: Outbound from SAP ECC.
    How do we achieve it ??
    BR.
    Tan
    Moderator message: please do more research before asking, show what you have done when posting.
    Edited by: Thomas Zloch on Feb 20, 2012

    Hi,
    In Tx. WE42, Select the process code for the corresponding partner and bind your workflow / task inplace of the function module with the process code. Now, this will enable the idoc to get placed in the agents(identified by that workflow)inbox.
    But to design the workflow, you`ll have to use tx. swdd and prior to that get some basic understanding of Business Workflow from SAP Library.
    Hope the info. is helpful and reward points if so.
    Regards

  • How to skipp or enable all the stpes that belong to certain step type in A sequence file?

    I have a big sequence file, and I have a very special requirement:that is to skipp or enable all the stpes that belong to certain step type?
    I know it could be a somewhat chanllenge, but I believe it can be done.
    Thanks!
    Jacky

    Hi Jacky,
    http://forums.ni.com/ni/board/message?board.id=330​&message.id=2419&query.id=86917#M2419
    http://forums.ni.com/ni/board/message?board.id=330​&message.id=1610&query.id=86919#M1610
    Here are a couple of examples that Get or Set the Run Mode of a step.
    There are also examples on the NI website for TestStand, that will obatin all the steps of a sequence / sequence file,
    http://sine.ni.com/apps/we/niepd_web_display.displ​ay_epd4?p_guid=B45EACE3EE5556A4E034080020E74861&p_​...
    http://sine.ni.com/apps/we/niepd_web_display.displ​ay_epd4?p_guid=EF3B073A7D7B5336E0340003BA7CCD71&p_​...
     which should help for building the basic loop to get a step,
    check its Step Type (there is an example of this on website),
    http://sine.ni.com/apps/we/niepd_web_display.displ​ay_epd4?p_guid=BB88802AAEA621D5E034080020E74861&p_​...
    to decide whether to modify the Step property or not.
    The tricky bit is whether your sequence call steps call sequences in the sequence file or in an external sequence file.
    Hope this gets you started.
    What version of TestStand are you using?
    Regards
    Ray Farmer
    Regards
    Ray Farmer

Maybe you are looking for

  • NFe com dados de fornecedor incompletos após atualização do mesmo

    Bom dia! Estou tendo o seguinte problema. É enviada uma NF ao GRC, porém não consta no cadastro do Fornecedor o campo Bairro. Ao alterar o cadastro do fornecedor (via FK02) incluindo o bairro, esta informação não é replicada à NFe, e o erro no GRC co

  • Copy item categories condtion copier type = firm all plnd orders

    Hi we have issue with copy controls we are copying from previous to succeeding document sales order pricing data is copying for return order creation, but when we are changing quantity in return order it's re-determining price as per the scale . If w

  • Syncing of iPhone / iPad to iTunes & iPhoto

    I just bought a iPad 3.  I've set it up and it syncs with iTunes.  However, my iPhone 4 and iPad 2 no longer will connect with iTunes.  What could I have done to not let them connect with iTunes.  They are not recognized by iPhoto as well.  I'm confu

  • [SOLVED] Kernel26-BFS - Is there a how to?

    Hi Folks, I would not consider myself a beginner, but I am no expert either. I have never compiled a kernel to order and have only ever used the stock kernel ... but hey, you have to learn somewhere. My question is, is there some kind of how to? Ther

  • Get-Acl : The input object cannot be bound to any parameters

    Hi I am trying to get a list of folder and permissions for network folders and I am getting the error Get-Acl : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input an