How to do rollback in a database control in ajpd

Hello,
I created a database control which has 3 methods that calls 3 respective stored procedures that inserts/updates tables. I have a jpd which uses the database control and calls each of the 3 methods. When it fails on the 3rd method, it doesn't rollback the inserts/updates done by the 2 methods. I'm using BEA's XA driver for SQL Server. Im new in this thing so please any help will be greatly appreciated.
Thanks.
Florence

Dear Dinsh,
Here are some links that will help you:
http://download-uk.oracle.com/docs/cd/A97630_01/server.920/a96540/statements_510a.htm#2062405
http://download-uk.oracle.com/docs/cd/A97630_01/server.920/a96540/toc.htm
http://www.oracle.com/technology/products/oracle9i/index.html
Regards,
Francisco Munoz Alvarez

Similar Messages

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to Schedule Job using Database Control for SQLPLUS script?

    Hi All,
    I am using Database version 10.2. I would like to schedule a SQLPLUS script job using Database control (Not using Grid Control!). The following is the script.
    ========================================================
    define OEM_FRIENDLY=1
    define OWB_BACKGROUND=0
    set serveroutput on
    set verify off
    whenever sqlerror exit failure;
    define REPOS_OWNER='&1.'
    define LOCATION_NAME='&2.'
    define TASK_TYPE='&3.'
    define TASK_NAME='&4.'
    define SYSTEM_PARAMS='&5.'
    define CUSTOM_PARAMS='&6.'
    alter session set current_schema = &REPOS_OWNER.;
    set role owb_d_&REPOS_OWNER., owb_o_&REPOS_OWNER.;
    variable exec_return_code number;
    begin
    -- Initialize Return Code
    :exec_return_code := wb_rt_api_exec.RESULT_FAILURE;
    -- Run Task
    :exec_return_code := wb_rt_api_exec.run_task('&LOCATION_NAME.',
    '&TASK_TYPE.',
    '&TASK_NAME.',
    '&CUSTOM_PARAMS.',
    '&SYSTEM_PARAMS.',
    &OEM_FRIENDLY.,
    &OWB_BACKGROUND.);
    end;
    exit :exec_return_code;
    ===========================================================
    Is it possible to schedule SQLPLUS script with 6 different parameters? If yes then how can I schedule for monday to friday or only for Saturday and sundays.
    Please provide brief steps.
    Thanks for your help in advance.
    - Mehul

    Let me explain to you about scheduler.
    You can schedule a pl/sql stored procedure TEST_S as follows...
    Begin
    dbms_scheduler.create_job(
    job_name=>'MY_JOB',
    Job_Type=>'STORED_PROCEDURE',
    job_action=>'TEST_S',
    start_date=>sysdate,
    repeat_interval=>'freq=monthly;BYDAY=MON,TUE,WED,THU,FRI',
    end_date=>null');
    END;
    You can also also execute o/s script like .bat or .sh. For this job type should be EXECUTABLE.
    Example of converting a .sql script in .bat script...
    insert.sql
    insert into dept values(50,'IT','LONDON');
    exit
    insert.bat
    sqlplus scott/tiger @insert.sql
    Executing now...
    C:\Documents and Settings>insert.bat
    C:\Documents and Settings>sqlplus scott/tiger @insert.sql
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Mar 1 08:01:00 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    1 row created.
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - P
    oduction
    With the Partitioning, OLAP and Data Mining options
    C:\Documents and Settings>
    So first read about DBMS_SCHEDULER and do the work in prompt. Then you can go and schedule it even by database control.
    Scheduling by database control...
    http://www.oracle.com/technology/oramag/oracle/04-jul/o44tech_dba.html
    Scheduler
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sched.htm#CIHEHDHA
    PS: By default each job you created is disable state. Please enable it by enable procedure of DBMS_SCHEDULER package.

  • How do I create a new emkey for Enterprise Manager Database Control?

    Hi,
    I just installed 11gR2.
    I am evaluating it.
    How do I create a new emkey for Enterprise Manager Database Control?
    I tried various combinations of this command:
    emctl config emkey
    I did find a probable bug:
    $ emctl config emkey -emkey -emkeyfile emkey.ora -force -sysman_pwd he11ow0rld
    Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
    Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
    Undefined subroutine &EmKeyCmds::promptUserPasswd called at /u2/app/oracle/product/11.2.0/dbhome_1/bin/EmKeyCmds.pm line 160, <FILE> line 3.
    $
    Again,
    How do I create a new emkey for Enterprise Manager Database Control?
    I do have a copy of my old key but it is no longer good because I reinstalled the repository with these commands:
    emca -repos drop ...
    emca -repos create ...
    Oh, and where is emctl "documented".
    I poked around in some book-index links and with the search engine.
    I could not find anything.
    Thanks,
    -Janis

    user11892726 wrote:
    Oh, and where is emctl "documented".
    http://download.oracle.com/docs/cd/B16240_01/welcome.html

  • How to read sql from properties file in database control

    Hey Guys,
    I want to know that how a properties file can be used in bea built-in database control to read SQL.
    Any help would be greatly appreciated.
    Thanks,
    Deepak Kumar
    Qwest, India

    hi
    ok i tried it like its written in the tutorial...i do it like this:
    ClassLoader cl = ResourceAnchor.class.getClassLoader();
    props.load( cl.getResourceAsStream(pathname));
    -> tha pathname is dvd.properties
    and there always appears a NullPointerException: error reading properties file: java.lang.NullPointerException
    -angela

  • How to instantiate a database control in a session bean (Weblogic 8.1)

    Is it possible to instantiate a database control in a session bean?
    in a jsp i invoke "WlwProxy.create" method with an HttpServletRequest Object,
    ther's another "WlwProxy.create" which take an URL object instead of an HttpServletRequest one, i've tried to use it with the URL of my database Control class,
    I've tried two ways :
    1- URL url = new URL(C:\bea\user_projects\.....\MydatabaseControlclass")
    2- URL url = new URL("http","localhost",7001,"nameOfPackege/MydatabaseControlclass");
    But it failed
    Does anybody here know how to use "WlwProxy.create" with an URL object ?
    Thanks.
    Edited by concerto at 04/19/2007 6:29 AM
    Edited by concerto at 04/19/2007 6:36 AM
    Edited by concerto at 04/19/2007 6:43 AM

    Hi Gautam
    I don't think Database control has any attribute on Role.
    The database control takes the connection from the datasource that is specified in the jcx. I am not sure if there is any attribute at the connection pool level that will allow you to set a role.
    Or you can call a method in the dbcontrol that executes a set role.. statement and then run other methods.
    Thanks
    Vimala

  • How to configure Enterprise Manager Database Control (EMDC) to make it work on 2 servers working (primary and standby) under DG rules

    Hello everybody i use Oracle Database EE 11.2.0.4 with DG.
    In those cases i need to get Enterprise Manager Database Control running against DB with no RAC and no DG i perform the following steps:
    I Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:
    DECLARE
    CURSOR c1 IS
    SELECT owner, synonym_name name
    FROM dba_synonyms
    WHERE table_owner = 'SYSMAN';
    BEGIN
    FOR r1 IN c1 LOOP
    IF r1.owner = 'PUBLIC' THEN
    EXECUTE IMMEDIATE 'DROP PUBLIC SYNONYM '||r1.name;
    ELSE
    EXECUTE IMMEDIATE 'DROP SYNONYM '||r1.owner||'.'||r1.name;
    END IF;
    END LOOP;
    END;
    DROP USER mgmt_view CASCADE;
    DROP ROLE mgmt_user;
    DROP USER sysman CASCADE;
    After that i run
    emca -config dbcontrol db -repos recreate
    But what should i do in cases i have 2 servers working (primary and standby) under DG rules?

    Hi ,
    It is not possible to monitor/administer a Logical or Physical Standby database, i.e Data Guard, using Enterprise Manager Database Control.  This is primarily due to the fact that Database Control is designed to monitor 1 database and a Data Guard environment, by definition, includes more than 1 database.
    If you attempt to run emca against a standby Database, you will get an error like (i.e. ORA-01219: database not open).
    Database Control, can, of course, be used to monitor the current Primary database (with no ability to administer or monitor Data Guard related functionality).  In such a case, when failover occurs Database Control must be reconfigured to run on the new Primary database using the commands detailed in Note 278100.1 How To Drop, Create And Recreate DB Control In A 10g Database, section C. Recreate/ReConfig DB Control, Option 2. Recreate the DB Control Configuration Files and Repository.
    Enterprise Manager Grid Control or Cloud Control provides the functionality for viewing, monitoring, and administering primary and standby databases in a Data Guard configuration.
    Reference: Is it Possible to Configure Database Control for a Logical or Physical Standby Database? (Doc ID 315116.1)
    You can use EM 12c cloud control to monitor and manager Standby DB effectively
    Ref to below link for details
    Set Up and Manage Oracle Data Guard using Oracle Enterprise Manager Cloud Control 12c
    Regards,
    Rahul

  • How to view/ammend jobs in DBA_JOBS using Enterprise Manager (Database Control)

    Dear Gurus,
    We are using Oracle 10gR2 on Widwos OS. We defined couple of jobs using DBMS_JOBS and i can see them using DBA_JOBS view, how can we view/amend these jobs in Enterprise Manager (Database Control)?
    Regards,
    Riaz

    Riaz wrote:
    Dear Gurus,
    We are using Oracle 10gR2 on Widwos OS. We defined couple of jobs using DBMS_JOBS and i can see them using DBA_JOBS view, how can we view/amend these jobs in Enterprise Manager (Database Control)?
    Regards,
    Riaz
    In V10 which is no longer under support DBA_JOBS was superceded  by DBMS_SCHEDULER.
    Why are you dependent upon EM to manage the DB?

  • How do I configure OEM Database Control 10g

    Hi Gurus,
    I have Oracle 10g Release 2 (10.2.0.1) on Windows XP installed. How do I configure Database Control 10g??
    Any help is appreciated
    Thanks !!!

    Use the enterprise manager configuration assistent (emca)
    <ORACLE_HOME>\bin\emca
    with emca -h you get some help

  • How to remove out-of-the-box policy violation from Database Control

    Hi, I just installed a new Oracle 11g box with a new database created using DBCA with all the out-of-box settings.
    Using database control, I can see a lot of "policy violation" warning etcs. For example, one warning is "Control File Permission (Windows)". Apparently, it is complaining about the control file permission bit. So I go in and remove all permission except for systems and the oracle dba group ORA_DBA (in window). Still it is complaining. How do I fix it?
    Thanks for any suggestion

    It should disappear after you have "completely" taken care of it. If you think you have, then you can use "Manage Policy Violations" to ignore and clear them. But do not do this if you have not taken care of it.

  • How can i solve to secure the database Control ?

    Hello Good Morning !
    I have applied 10.2.0.4 patchset on 10.2.0.1 binary , finally i upgrade my database by DBUA
    When checking upgradation result screen - which was showed by DBUA. (i am confused what i blue marked below)
    i am  pasting following below. please have a look blue marked.
    Some information about the step is available.
    Step Execution Information:
    Post UpgradeEarlier persistent initialization parameter file (spfile) has been renamed to: /u01/app/oracle/product/10.2.0/db_1/dbs/spfileorcltest.ora.bak.
    A persistent initialization parameter file (spfile) has been created at the following location: /u01/app/oracle/product/10.2.0/db_1/dbs/spfileorcltest.ora.
    Enterprise Manager Configuration
    Oracle Enterprise Manager configuration is upgraded.
    Enterprise manager configuration succeeded with the following warning -
    Error securing Database Control, Database Control has been brought up in non-secure mode.
    To secure the Database Control execute the following command(s):
    1) Set the environment variable ORACLE_SID to orcltest
    2) /u01/app/oracle/product/10.2.0/db_1/bin/emctl stop dbconsole
    3) /u01/app/oracle/product/10.2.0/db_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >
    4) /u01/app/oracle/product/10.2.0/db_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >
    5) /u01/app/oracle/product/10.2.0/db_1/bin/emctl start dbconsole
    To secure Em Key, run /u01/app/oracle/product/10.2.0/db_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >
    Go to top Initialization Parameter changes
    database upgrade has been completed successfully, and the database is ready to use.
    The following document describes important behavioral changes from previous database releases to the Oracle Database 10g release:
    /u01/app/oracle/product/10.2.0/db_1/assistants/dbua/doc/help/DefaultBehaviorChangesin10g.html
    select comp_name , version, status from dba_registry;
    Initialization Parameter changes
    The following changes have been made in the initialization parameters:Parameters Updated:
    Name                                Old Value                             New Value
    db_recovery_file_dest              /u01/app/oracle/flash_recovery_area    /u01/app/oracle/flash_recovery_area
    db_recovery_file_dest_size        2147483648                              2147483648
    Thanks in advance .

    This means the the URL for database control will use the http protocol. To convert to the https protocol (using the included SSL certificate), use the steps documented above. Before doing so, pl review MOS Doc 1222603.1
    HTH
    Srini

  • How to (what to) download and install OEM database control

    Hello
    Can you please tell me the name of the file I should download (Is it still accessible?). I have download many of the oracle product files but don't have the OEM one burned to a CD.
    I want to reinstall my database as I have changed my domain name and the OracleConsole(orcl)
    I.E.
    L:\app\owner\product\11.2.0\db_1\bin\nmesrvc.exe fails to start.
    My situation is that I am using a single instance of Oracle 11G R2 for self educational training and development.
    I am running on Windows XP SP3.

    Hi,
    To create or recreate a database control you need to execute the following commands:
    Create the DB Control Repository Objects and Configuration Files
    $ <ORACLE_HOME>bin/emca -config dbcontrol db -repos create
    ReCreate the DB Control Repository Objects and Configuration Files
    $ <ORACLE_HOME>bin/emca -config dbcontrol db -repos recreate
    Best Regards,
    Venkat

  • Database control: how to read output of sproc that returns result set

    I have a stored procedure that returns a result set. Should I use a RowSet control to wrap this, or a database control, or neither? Am I better off with straight JDBC in a Java control?
    Thanks.

    Sorry for missing the point totally...
    DOKTL also contains long text for FM parameters...
    This is a modified version of your code that retrieves the long text and displays it...
    DATA: parameter TYPE TABLE OF swotfupar,
          ls_parameter LIKE LINE OF parameter,
          search_string TYPE doktl-object,
          texttab type table of doktl-doktext with header line.
    PARAMETERS: fubaname TYPE swcontdef-abapname
                              DEFAULT 'POPUP_TO_CONFIRM',
                pa_lang TYPE sy-langu.
    START-OF-SELECTION.
      CALL FUNCTION 'SWO_QUERY_FUNCTION_PARAMETERS'
        EXPORTING
          functionmodule            = fubaname
        TABLES
          function_parameters       = parameter
    *   EXCEPTIONS
    *     FUNCTION_NOT_FOUND        = 1
    *     OTHERS                    = 2
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT parameter INTO ls_parameter.
        CONCATENATE `                              `            "30 spaces
                    ls_parameter-parameter INTO search_string.
        OVERLAY search_string WITH fubaname.
        SELECT doktext FROM doktl INTO TABLE texttab
               WHERE id = 'FU'
               AND langu = pa_lang
               AND object = search_string.
        WRITE:/ 'Long Text for', ls_parameter-parameter.
        LOOP AT texttab.
          NEW-LINE.
          WRITE: AT 10 texttab COLOR COL_HEADING.
        ENDLOOP.
      ENDLOOP.
    Hope this helps you
    Regards,
    Dushyant Shetty

  • How to use database control to execute sql queries which change at run time

    Hi all,
    I need to execute sql queries using database controls , where the sql changes
    at run time
    based on some condition. For eg. based on the condition , I can add some where
    condition.
    Eg. sql = select id,name from emp where id = ?.
    based on some condition , I can add the following condition .
    and location = ?.
    Have anybody had this kind of situation.
    thanks,
    sathish

    From the perspective of the database control, you've got two options:
    1) use the sql: keyword to do parameter substitution. Your observation
    about {foo} style sbustitution is correct -- this is like using a
    PreparedStatement. To do substitution into the rest of the SQL
    statement, you can use the {sql: foo} substitution syntax which was
    undocumented in GA but is documented in SP2. Then, you can build up
    the filter clause String yourself in a JPF / JWS / etc and pass it into
    the DB control.
    For example:
    * @jc:sql statement="select * from product {sql: filter}"
    public Product[] getProducts(String filter) throws SQLException;
    This will substitute the String filter directly into the statement that
    is executed. The filter string could be null, "", "WHERE ID=12345", etc.
    2) you can use the DatabaseFilter object to build up a set of custom
    sorts and filters and pass that object into the DB control method.
    There have been other posts here about doing this, look for the subject
    "DatabaseFilter example".
    Hope that helps...
    Eddie
    Dan Hayes wrote:
    "Sathish Venkatesan" <[email protected]> wrote:
    Hi Maruthi,
    The parameter substituion , I guess is used like setting the values for
    prepared
    statements.
    What I'm trying to do , is change the sql at run time based on some condition.
    For example ,
    consider the following query :
    select col1,col2 from table t where t.col3 > 1
    At run time , based on some condition , I need to add one more and condition.
    i.e. select col1,col2 from table t where t.col3 > 1 and t.col4 < 10.
    This MAY not address your issue but if you are trying to add "optional" parameters
    you may try including ALL the possible parameters in the SQL but send in null
    for those params that you don't want to filter on in any particular case. Then,
    if you word your query
    as follows:
    select col1, col2 from table t where t.col3 > 1 and (t.col4 = {col4param} or
    {col4param} is null) and (t.col5 = {col5param} or {col5param} is null) ...
    you will get "dynamic" filters. In other words, col4 and col5 will only be
    filtered if you send in non-null parameters for those arguments.
    I have not tried this in a WL Workshop database control but I've used
    this strategy dozens of times in stored procedures or jdbc prepared statements.
    Good luck,
    Dan

  • How to Perform Recovery in Database Control on tablespace?

    Hi,
    I am runnig 10gR2 on Windows XP SP 2.
    I have taken backup of my nonsystem tablespace by using Database Control.
    Now to test it I dropped tablespace.
    Logged in as sys on Database Control:
    Maintenance->Perform Recovery->          
    Object Level Recovery
    Here in Object Type I choosed Tablespace from the dropdown
    But what do I choose in Operation Type? There are three choises:
    - Recover to current time or a previous point-in-time
    - Restore tablespaces
    - Recover from previously restored tablespaces
    And as I said, I have taken backup of my whole tablespace...
    Thanks

    Hi Werner,
    thanks again, but I still would like to perform backup of my tablespace.
    Now I understood, that to drop a tablespace was an error. OK.
    Next try:
    Step 1:
    CREATE TABLESPACE TEST_TS DATAFILE
    'C:\ORACLE\ORADATA\ORCL\TEST_01.DBF' SIZE 1M AUTOEXTEND ON,
    'C:\ORACLE\ORADATA\ORCL\TEST_02.DBF' SIZE 1M AUTOEXTEND ON;
    Step 2:
    CREATE TABLE TEST_TBL (
    NAME VARCHAR2(10))
    TABLESPACE TEST_TS;
    Step 3:
    INSERT INTO TEST_TBL VALUES('DB2');
    Step 4:
    COMMIT;
    Step 5:
    I have done backup of newly created tablespace TEST_TS via Database Control.
    Step 6:
    shutdown database;
    Step 7:
    I have manually renamed datafile TEST_01.DBF to TEST_01_.DBF
    Step 8:
    Now I have started database and have following entries in alert.log:
    Errors in file c:\oracle\oracle\product\10.2.0\db_1\admin\orcl\bdump\orcl_dbw0_4124.trc:
    ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
    ORA-01110: data file 6: 'C:\ORACLE\ORADATA\ORCL\TEST_01.DBF'
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 2) The system cannot find the file specified.
    ORA-1157 signalled during: alter database open...
    Which is correct. Oracle can not find the datafile I have renamed.
    Step 9:
    Now I thought I could be able to access Backup/Recovery Page in Database Control,
    but all I can reach is 'Recovery Settings'
    Do I need to go in open stage first to perfor recovery?
    What needs to be done in Step 9? Do I have to drop my
    ALTER DATABASE DATAFILE 'C:\ORACLE\ORADATA\ORCL\TEST_01.DBF' OFFLINE DROP;
    alter database open;
    Go to Database Control and try it out?
    Thanks

Maybe you are looking for

  • How do I delete photos that were synched from my iMac to my iPhone 5s?

    How do I delete photos that were synched from my iMac to my iphone 5s?

  • On trying to download the dialogue box doesn't appaer

    on trying to download adobe reader the dialogue box doesn't appear and therefore I cannot download the software. Is there any way around this?

  • Some missing elements in Encore

    After purchasing Creative Cloud and downloading Premier Pro,AE and PS, encore is missing some elements. I have most of the Library templates but I'm missing buttons,images,layers,backround ,layer sets,text items,shapes and replacement layers. I follo

  • Login Assistance throwing error

    When trying to use Login Assistance, Under the Forgot Password section in the User Name field, I type my username and click the "Forgot Password" Button but get the following error: Error An unexpected error occurred while attempting to reset your pa

  • How can I remove users assignments on role import?

    Hello, I am importing a role that aleady exists in the portal in order to change some of it's assignments. Overwrite is also checked. The problem is that if I want to add something to the existing role it is updating but if I want to remove something