Script for handling triggers and delete statements

Hello,
currently I'm facing a problem which I don't know how to deal with.
We need a script which deletes/disables two triggers first, then delete some data and afterwards create/enable the triggers again.
I didn't find a proper hint how to cover this with dbmcli, probably we have to use a "higher" language..?!?!
Is it possible at all to provide "dbmcli -i" with a file including sql statements like the example afterwards ?
Is it possible to disable/enable triggers or do I have to delete and create them ?
e.g.:
disable/drop trigger trig_a
disable/drop trigger trig_b
delete from a where....
delete from b where...
enable/create trigger trig_a...
enable/create trigger trig_b...
used maxDB version is 7.5.0.38
any hint appreciated....GERD.....

Hi Gerd,
please be aware that DBMCLI is a DBMServer client, not a SQL client (although it can tunnel some sql through the DBMServer).
Better use SQLCLI for things like that.
And. no, you cannot switch triggers on and off - just drop and recreate them.
But you may specify the IGNORE TRIGGER keyword for the delete statements.
That way you can leave the triggers just as they are.
p.s.
Any reason to stay on super old 7.5 ?
regards,
Lars

Similar Messages

  • Searching update insert and delete statements

    Hi.
    Suppose, there is change request containing 10 or more programs.
    One of the program has statements, working with database tables,
    like update, insert or delete.
    Is there any transaction where we can select request number and find
    programs working with tables directly.

    Hello
    1. Goto table E071 with TRKORR = change request and OBJECT = {reps, repo, rept}
    2. In field OBJ_NAME will be all reports names in this request
    3. In abap-programm upload this reports into internal table
    4. Search for 'update' 'insert' and 'delete'
    P.s. it is only for reports

  • Notification[s] for handling Complaing and CAPA handling process in Pharma

    SAP QM-QN facilitates work flow process, task monitoring, solution database and FMEA process for handling complaints and CAPA processes. BUT the current fields and reports configuration do not  support specific-requirements of regulatory/organization-.
    What are the implications of of customizing the "fields", "work flow" and "reports" inline with the FDA requirements. i.e.,
    1. huge number of fields have to added in the notification initiation section which are different for each CAPA process [complaint, deviation, incident]
    2. multiple work flow process for each category of CAPA process.
    3. multiple reporting requirements for each instance of CAPA record. etc.,
    request your comments/guidance on the impact during the life cycle viz., "while upgrading the current versions to next level" etc.,
    kindly enlighten.
    venugopal.

    Hi Venu
    MY rek. also same...
    Did you get any idea?
    If you find please give some detail about How did you design this..
    thanks
    Sami

  • Problem using TAPI triggers and merge statement

    Hi,
    I use Designer tapi triggers on a table. When I try to execute a merge statement, I get the following error:
    ORA-06502: PL/SQL: numeric or value error: NULL index table key value.
    Is there a restriction when using TAPI triggers and merge statements that anyone is aware of?

    No restrictions on MERGE commands that I know of. I have, however, seen the TAPI give inexplicable ORA-06502 errors. It would help to know what line in which procedure or trigger gave the error. That information should have been in the error stack.

  • Function Module for blocking, unblocking and deleting assets

    Hi,
    Are there function modules available for blocking,unblocking and deleting assets in SAP.
    Can I user 'BAPI_FIXEDASSET_CHANGE' for the same?
    Thanks in adavnce,
    Laxman

    Hey,
    I tried by putting the values of company code,asset number,subnumber, transaction type as 'A' and passing the value of INLA-XSPEB as 'X' in FM ASSET_MASTERRECORD_MAINTENANCE to block the asset but it is not working. I am trying many other things. Can you suggest what are the mandatory fields that need to be passed for the asset to be blocked.
    As there are lot of parameters in this FM, I am little confused. Is there a proper documentation available somewhere to understand the flow.
    Thanks in advance for the help.
    Laxman Pai.

  • [svn:bz-trunk] 7494: Add testcaseses for http put and delete methods.

    Revision: 7494
    Author:   [email protected]
    Date:     2009-06-02 13:13:33 -0700 (Tue, 02 Jun 2009)
    Log Message:
    Add testcaseses for http put and delete methods. Proxy should return endpoint's content instead of empty body
    Added Paths:
        blazeds/trunk/qa/apps/qa-regress/remote/testMethods.jsp
        blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/proxyService/httpservice/bugs/Pu tAndDeleteMethodTests.mxml

    found it - here: http://discussions.apple.com/thread.jspa?threadID=2323131&tstart=30
    I set the Realm to Location instead of Folder. Now I'm prompted for my credentials at the /svn/ URL.

  • Cursor problem ! (equivalents for insert, update and delete)

    Hi,
    I am having following three sql statements. I am using Oracle 8i.
    ====================================================================================================================
    Statement1 : Insert
    Insert Into DBSchema.DstTableName( dstCol1, dstColP, dstColKey, dstCol2, dstCol3, dstCol4, dstCol5, dstCol6 )
    ( SELECT DbSchema.Seq.nextval, srColP, srColKey, srCol1, srCol2, nvl(srCol3,0), nvl(srCol4,0), SYSDATE
    From
    SrcTableName SRC
    Where
    srcColP IS NOT NULL AND
    NOT EXISTS
    (SELECT 1
    From
    DBSchema.DstTableName Dst
    Where
    SRC.srcColP = DST.dstColP AND SRC.srcColKey = DST.dstColKey )
    ====================================================================================================================
    Statement2 : Update
    Update DBSchema.DstTableName dst
    SET ( dstCol1,dstCol2,dstCol3,dstCol4, dstCol5)
    =
    ( SELECT srCol1, srCol2, nvl(srCol3,0), nvl(srCol4,0), SYSDATE
    From
    SrcTableName src
    Where
    src.srcColP = dst.dstColP AND SRC.srcColKey = DST.dstColKey
    WHERE EXISTS (
    SELECT
    1
    From
    SrcTableName SRC
    Where
    SRC.srcColP = DST.dstColP AND SRC.srcColKey = DST.dstColKey ) ;
    ====================================================================================================================
    Statement3 : Delete
    Delete
    FROM DBSchema.DstTableName DST
    Where Exists (
    SELECT
    1
    From
    SrcTableName SRC
    Where
    src.srcColP = dst.dstColP )
    AND NOT EXISTS
    SELECT
    1
    From
    SrcTableName SRC
    Where
    src.srcColP = dst.dstColP AND SRC.srcColKey = DST.dstColKey ) ;
    ====================================================================================================================
    For the above three statement I have written the following cursor.
    Equivalent Cursor:
    PROCEDURE DEMOPROC
    is
    loop_Count integer := 0;
    insert_Count integer := 0;
    CURSOR c1
    IS
    SELECT src.srcCol1,
    src.srcCol2,
    src.srcCol3,
    src.srcCol4,
    src.srcCol5,
    src.srcCol6,
    src.srcCol7,
    src.srcCol8,
    src.srcCol9,
    src.srcColKey,
    src.srcColP
    FROM
    SrcTableName SRC
    Where src.srcColP IS NOT NULL
    AND NOT EXISTS
    (SELECT 1
    From
    DBSchema.DstTableName Dst
    Where
    src.srcColP = DST.dstColP AND src.srcColKey = DST.dstColKey )
    BEGIN
    FOR r1 in c1 LOOP
    Insert Into DBSchema.DstTableName( dstCol1, dstColP, dstColKey, dstCol2, dstCol3, dstCol4, dstCol5, dstCol6 )
    values(DBSchema.Seq.nextval, r1.srcColP, r1.srcColKey, r1.srcCol1, r1.srcCol2, nvl(r1.srcCol3,0), nvl(r1.srcCol4,0), SYSDATE);
    Update DBSchema.DstTableName dst
    SET dst.dstCol1=r1.srcCol1 , dst.dstCol2=r1.srcCol2,
    dst.dstCol3=nvl(r1.srcCol3,0),
    dst.dstCol4=nvl(r1.srcCol4,0),
    dst.dstCol5=SYSDATE
    Where
    r1.srcColP = dst.dstColP
    AND
    r1.srcColKey = DST.dstColKey ;
    Delete
    FROM DBSchema.DstTableName DST
    Where
    r1.srcColP = dst.dstColP ;
    insert_Count := insert_Count + 1 ;
    /* commit on a pre-defined interval */
    if loop_Count > 999
    then begin
    commit;
    loop_Count := 0;
    end;
    else loop_Count := loop_Count + 1;
    end if;
    end loop;
    /* once the loop ends, commit and display the total number of records inserted */
    commit;
    dbms_output.put_line('total rows processed: '||TO_CHAR(insert_Count)); /*display insert count*/
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('Error '||TO_CHAR(SQLCODE)||': '||SQLERRM);
    END;
    ====================================================================================================================
    I am not sure whether this cursor is right or not, have to verify it.
    In delete and insert statements there is same where not exist clause in the original statement so I included that in my cursor declaration but not sure whether update will work with that or not.
    I have to use the three statements mentioned above for few source and destination tables and each are having many rows. How do i tune it ?
    What else can be done to improve the performance with the the three statements mentioned above.
    Any help will be highly appreciated.
    Thanks !
    Regards,

    You wont any anything extra by creating mulitple threads of the same question. Instead of this just provide the full information wht have been asked so that someone here can helpo you. If you keep doing like this then you will put yourself in our's negative list and that's not good for you.
    Daljit Singh

  • Prallel query and Delete statements

    Hi Gurus, need your help in understanding parallel execution
    We are noticing that delete statements are executing very slowly when parallel query is forced. Is this expected?
    All the literature that I read says that parallel query has no impact on DML statements. Yet, the query plan on the delete statement shows that it will be executed in parallel mode. This could mean that the scan portion is happening in parallel but the delete operation itself is happening in serial, correct?
    I tested in various servers and multiple tables before posting my question here. They all seem to show consistent results. Delete statements are twice slower when parallel query is forced. The same happens when parallel degree is set in table definition.
    For your information, we are running 10g on windows server with 15 million rows in table, 5 million rows being deleted with the statement. There is one index on the table and it doesn’t match the columns in query. Query plan shows full table scan. Table is not portioned.
    Thanks for your help in advance

    Parallel DML is supported by Oracle. Obviously when enabled, it can impact a DML statement.. (what literature have you read that said otherwise?)
    The delete operation itself is done in parallel using rowid ranges (e.g. each PQ slave process does a distinct physical "piece" of the table).
    Parallel DML should typically speed up the process. Why? Because I/O itself has latency. The process needs to wait (idle CPU time) for the I/O operation to complete before continuing.
    So let's assume the process can only do a 100 deletes per second. The actual I/O channel is capable of a 1000 I/O's per second. But due to inherant latency, the "max delete speed limit" for a procces is a 100 I/O's per second. The full capacity of the I/O channel is thus not used (and cannot be used by a single process).
    Parallel Query enables more processes to do I/O in order to utilise this "max speed limit".
    Why would you see a degradation in performance? It could be due to overutilising the I/O channels (attempting to go faster than the speed limit so to say).
    It could be due to some other contention in Oracle or even the o/s. You will need to investigate the wait state and events of the PQ processes to try and determine the probable cause.

  • When is there going to be a select all/delete all option in email? I need to search for certain emails and delet them from my phone but not my email program (Outlook)

    when will there be a select all/delete all option in Emails? I have a large number of emails that come to my phone which i dont want to delete from my outlook mail account (On my PC). However, i want to be able to search, select all and delete these emails from my phone? I do not use ICloud either as it causes issues with my calendars at work.
    These features should be a standard as there are plenty of other users out there that are trying to do the same thing and as yet there has been no progress? The email on the iphone is one of the biggest downfalls of the phone, blackberry and android handle them much better, but i dont have an option with my phone at work. Please help??

    No one here would have any idea when or if such a feature would be introduced until and unless Apple announces it.

  • RFC enabled function module for insert update and delete in a Ztable..

    friends..
    Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)? if not how can we create it? plz give me the details steps..
    what are the import, export parameters and how to develop and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address)
    Thanks and Regards

    Hi,
    Try this code.
    REPORT ZMMC071Z_RMV.
    TYPE-POOLS : ABAP.
    FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
                   <DYN_WA>,
                   <DYN_FIELD>,
                   <LV_CONDI>.
    DATA: DY_TABLE TYPE REF TO DATA,
    DY_LINE TYPE REF TO DATA,
    XFC TYPE LVC_S_FCAT,
    IFC TYPE LVC_T_FCAT.
    SELECTION-SCREEN BEGIN OF BLOCK F1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_TABLE  LIKE DD02L-TABNAME OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK F1.
    Evento: At Selection Screen                                          *
    START-OF-SELECTION.
      PERFORM GET_STRUCTURE.
      PERFORM CREATE_DYNAMIC_ITAB.
      PERFORM GET_DATA.
    END-OF-SELECTION.
    *& Form get_structure
    text
    FORM GET_STRUCTURE.
      DATA : IDETAILS TYPE ABAP_COMPDESCR_TAB,
      XDETAILS TYPE ABAP_COMPDESCR.
      DATA : REF_TABLE_DES TYPE REF TO CL_ABAP_STRUCTDESCR.
      DATA VL_LENGHT(30).
    Get the structure of the table.
      REF_TABLE_DES ?=
      CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME( P_TABLE ).
      IDETAILS[] = REF_TABLE_DES->COMPONENTS[].
      LOOP AT IDETAILS INTO XDETAILS.
        CLEAR XFC.
        XFC-FIELDNAME = XDETAILS-NAME .
        XFC-DATATYPE = XDETAILS-TYPE_KIND.
        XFC-INTTYPE = XDETAILS-TYPE_KIND.
        XFC-INTLEN = XDETAILS-LENGTH.
        XFC-DECIMALS = XDETAILS-DECIMALS.
        APPEND XFC TO IFC.
      ENDLOOP.
    ENDFORM. "get_structure
    *& Form create_dynamic_itab
    text
    FORM CREATE_DYNAMIC_ITAB.
    Create dynamic internal table and assign to FS
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = IFC
        IMPORTING
          EP_TABLE        = DY_TABLE.
      ASSIGN DY_TABLE->* TO <DYN_TABLE>.
    Create dynamic work area and assign to FS
      CREATE DATA DY_LINE LIKE LINE OF <DYN_TABLE>.
      ASSIGN DY_LINE->* TO <DYN_WA>.
    ENDFORM. "create_dynamic_itab
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM GET_DATA .
    *Get data from p_table into internal table <DYN_TABLE>
      SELECT * INTO TABLE <DYN_TABLE>
          FROM (P_TABLE)
    Here you can implemente function DELETE, INSERT.
    ENDFORM.                    " De_para

  • SAP Scripts for Stock Removal and Stock Placement ?

    Hi All,
      Can you please let me know what are the SAP script names and Transaction codes for  Stock Removal and Stock Placements ?
    Thanks,
    Raj

    Hi
    Tcode is MIGO only (select Goods receipt) and mvt type as
    Putaway (305, 315, and so on)
    Stock removal (303, 313, and so on)
    Transfer posting (301, 311, and so on)
    regards
    Yogesh

  • Configuaration for handling Units and Packaging List

    Dear All,
    Kindly suggest me the configuration for the Handling units and packaging List.
    Regards

    Hi,
      Refer this  http://help.sap.com/printdocu/core/print46c/en/data/pdf/LOHU/LOHU.pdf
    Regards
    GK.

  • Java scripting for header,footer and combine PDF as package

    Hi All,
    1.How to add header and footer using scripting.
    2.How can i combine 5 pdf files in to one pdf as PDF file package using Java Scripting.
    Thanks
    Mohamed Idris

    Hi Lenonard,
    Thanks for your reply, I am refering JavaScript for Acrobat API Reference, Version 8 document , but i could not find the right syntax for the above task.
    I am sucessfull writing script for page label but not for insertion of page number in the footer section.
    Regarding combining PDF files i could merge file and it comes as single PDF file not like assembeling pdf files as package.
    Please let me know the syntax and if i am looking at not right documentation, please let me know the document name to refer.
    Thanks again.
    Mohamed Idris

  • Powershell script for security groups and users for multiple share folders

    Hi scripting team,
    I need your help with powershell script for the below queries 
    1. List out the security groups for more than one server share path and output it to a file ( csv ) 
    For eg.
    If the are are two share paths 
    \\servername\foldermain\folder1
    \\servername\foldermain\folder2
    So I needs the list of security groups for each share path
    And the output needs to be under each any every path.
    2. Grab the users belongs to main security groups and it nested groups for more than one security group and listed the users under each and every group. No need to display nested groups. Just users belongs to main group and users under nested.
    Your teams help is much appreciated 
    Thank you.
    Thilochana kumararatne

    Hi Braham,
    Thanks for your quick reply.
    Are we able to do this on two stage method
    1. grab the security groups from the share paths
    if can grab the share path from a separate txt file than copying it to the <your path> location
    so i can modify the txt file
    once run the script
    if can the output like below to a CSV file
    \\servername\foldermain\folder1group 1group 2group 3\\servername\foldermain\folder2group 1group 2group 3then i know which groups belongs to which share paththen i can remove the duplicate groups and keep the common groups to grab the users belongs to itso with the second script same as the first copy the security groups to a txt file and the out put as below.what I needs is the users full name and the samaccount name ( user id )group 1user1user2user3
    group 2user1user2user3looking forward your help on thisThank you.Thilo

  • Script for downloading(svn) and install E17

    I've been working on a script that download for the svn repository e17, compiler and install. I've made this script more as a to lear more about bash script. You can do the same thing as my script with yaourt. I hope someone might need it.
    #!/bin/bash
    # Title: Arch E17 svn #
    # Auther: Kamil MIklaszewski ([email protected]) #
    # Date: 2008-12-19 19:10 #
    # Licence: GPL #
    # This program is free software; you can redistribute it and/or modify #
    # it under the terms of the GNU General Public License as published by #
    # the Free Software Foundation; either version 2 of the License, or #
    # (at your option) any later version. #
    # This program is distributed in the hope that it will be useful, #
    # but WITHOUT ANY WARRANTY; without even the implied warranty of #
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
    # GNU General Public License for more details. #
    # You should have received a copy of the GNU General Public License #
    # along with this program; if not, write to the Free Software #
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, #
    # MA 02110-1301, USA. #
    # Version: 1.0 #
    # Description: This script was writen for Archlinux. It will download e17 #
    # from the svn repository and it will do a full installation. #
    # This script also take care of the dependency for all of the #
    # programs that are installed with e17. #
    # TODO: For version 1.0 #
    # -have the scipt use dialog #
    # -make the script more autamatic #
    # Change Log: *2008-12-19 #
    # -creation of script #
    # Function name: prep
    # Function paramiter(s): none
    # Function description: This function prepers the envirement to run
    # the rest of the script
    prep()
    #make a temporery directory and go to it
    mkdir -p ~/arch_e17_svn
    cd ~/arch_e17_svn
    #export this path to compile succesfuly
    export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/
    # Function name: message
    # Function paramiter(s): Word to be printed on the screen
    # Function description: This function print messages on the screen.
    message()
    #print a message to the screen
    echo -e "==>" $*
    # Function name: downloadPackage
    # Function paramiter(s): none
    # Function description: This function go to the user's home
    # directory and downloads e17 from svn repo.
    downloadPackage()
    message "Downloading " $1 " from E17 svn repository."
    #download the specifed package with less text
    svn co --quiet http://svn.enlightenment.org/svn/e/trunk/$1 $1-svn
    # Function name: generalDependencys
    # Function paramiter(s): none
    # Function description: This fuction install the general
    # dependencys.
    generalDependencys()
    message "Installing Dependencys..."
    #list of package needed to be installed
    generalDependencysList=(
    'svn'
    'm4'
    'autoconf'
    'automake'
    'libtool'
    'pkgconfig'
    'texinfo'
    'zlib'
    'libpng'
    'libjpeg'
    'freetype2'
    'xorg'
    'dbus'
    'hal'
    'pam'
    'librsvg'
    'libnotify'
    'curl'
    'openssl'
    'libungif'
    'libtiff'
    'gettext'
    'glibc'
    'glibmm'
    'doxygen'
    'giflib'
    'cairo'
    'libx11'
    'libxext'
    'libxrender'
    'fontconfig'
    'libxcb'
    'sdl'
    'mesa'
    'qt'
    'librsvg'
    'libtiff'
    'directfb'
    #install the dependencys in the list
    sudo pacman -Sq --needed ${generalDependencysList[@]}
    # Function name: installPackage
    # Function paramiter(s): The name of the package to install
    # Function description: This fuction need one paramiter that is
    # the package to configure and install.
    installPackage()
    #change directory to the program to configure and install
    cd ~/arch_e17_svn/$1-svn
    message "Configurating package " $1
    #run the autogen script that will configure and
    #make read to install this program
    ./autogen.sh
    message "Compiling package " $1
    #now compile the source file of the program
    make
    message "Installing package " $1
    #now install the program
    sudo make install
    cleanUp()
    rm -r ~/arch_e17_svn
    # MAIN #
    main()
    #preper the envirement
    prep
    #install the general dependecys using pacman
    generalDependencys
    #list of packages to download and install
    packagesList=(
    'eina'
    'eet'
    'evas'
    'ecore'
    'efreet'
    'embryo'
    'edje'
    'e_dbus'
    'e'
    #loop that gos through the list and downloads the packages
    for package in ${packagesList[@]}
    do
    downloadPackage $package
    message "Done\n"
    done
    #loop that gos through the list and installs the packages
    for package in ${packagesList[@]}
    do
    installPackage $package
    message "Done\n"
    done
    main

    pressh wrote:to not duplicate work I've already created a python script some time ago which you can use to build e17 pacman packages using the community PKGBUILDs: http://dev.archlinux.org/~ronald/e17.html
    I may extend its usage if someone sees any use for it. Either way, just thought I should drop it here.
    is that script any different from a full build through makepkg/yaourt using AUR's Pkgbuilds?
    I tried to use it but i get a list of errors similar to
    cp: impossibile creare il file normale `eina-build/eina/.svn/prop-base/NEWS.svn-
    base': Permission denied
    but if i can use yaourt, why not?
    Edit: sorry, i looked at the python source and realized that it actually just syncs abs and then runs makepkg and namcap for each package. so i guess i'll use yaourt instead (or try to understand why makepkg exits with that error)
    Last edited by pikiweb (2009-06-19 08:48:46)

Maybe you are looking for

  • Office web apps crome issue

    I have SharePoint 2013 integrated with office web apps. I have activated the feature Open Documents in Client Applications by Default. If I open word document in Internet explorer it opens in client application but if I open same word document in cro

  • Recover a database using cold backup

    Hi, I am working in oracle 9i and solaris 5.8. I am taking coldbackup and its stored in another solaris server. I need to create a new database in the backup server using the cold backup files. Please explain me in detail how to create a database usi

  • Flash on my pc not recognised

    I have the most recent version of Flash Player installed. Yet any time I am on a web page requiring flash am told I need to download and install flash player. What do I need to do to make Adobe Flash Player 11.6 open when necessary?

  • Serial_Communication.vi don't want work

    Hello Members. I try to use serial_communication.vi at LabView7Express-Student-Edition (I use it at home for privat, not commercial) to communicate with a Modem on COM1. Well, I get everytime a error code 1073807202. Means "A code library required by

  • My itunes stops responding. I am using win. vista sp1 and itunes latest version.

    I have problem with itunes. when i visit the store or connect ipod my itunes stops responding and my windows says programe not responding. please help me.