How to use Edition Based Redefinition in APEX?

Hello,
This might be my first question on this forum ;-)
I am trying to get 11gR2 Edition Based Redefinition to work within APEX. But for testing purposes (before altering the database to use the new edition as the default) I have to set the edition at the session level. But as APEX shares sessions from the pool (I might get another session with every page refresh/call), I need to execute an ALTER SESSION command.
I can't use EXECUTE IMMEDIATE, 'cause that results in:
execute immediate 'alter session set edition=HR_RELEASE2';
ORA-38815 : ALTER SESSION SET EDITION must be a top-level SQL statement
So is there a way to just run a SQL command at the "start" of a page (request)?
Greetings,
Roel
http://roelhartman.blogspot.com/
Edited by: Roel on Feb 28, 2010 7:00 PM
- Changed the subject of this post (for an easier search on the forum)

Hello all,
Patrick and John were on the right track...
After contacting Bryn (the Oracle brain behind EBR), there appeared to be a DAD attribute called 'database-edition'. Using this you can change the Edition of a DAD (and via the DAD ... all the users that use that DAD):
begin
dbms_epg.set_dad_attribute('APEX', 'database-edition', 'HR_RELEASE2');
end;The funny thing is that a user doesn't have to re-connect. With the next server roundtrip he will use the other edition!
Remarkable fact: This setting doesn't effect the Session-Edition, but only the Current-Edition. Have to test how that'll work out when using CrossEdition Triggers...
Another thing: There seems to be an equivalent for the Apache /HTTP Server.
You have to add a line to your dads.conf setting for PlsqlDatabaseEdition.
If I add that line (in my environment) the HTTP Server fails to start with:
/home/oracle/OraHome_1/Apache/Apache/bin/apachectl start: execing httpd
Syntax error on line 48 of /home/oracle/OraHome_1/Apache/modplsql/conf/dads.conf:
Invalid command 'PlsqlDatabaseEdition', perhaps mis-spelled or defined by a module not included in the server configurationApart from that: You have to restart the HTTP Server to use the changed DAD. So that is in opposite of the whole goal of EBR (24 x 7 availability).
Once I figured it all out I'll write a blog post about it. If somebody has anything to add to this thread, feel free! Especially the HTTP Server/Edition combination would be interesting!
Greetings,
Roel
http://roelhartman.blogspot.com/

Similar Messages

  • Editions based redefinitions to replace individual schema  objects concept

    Hello,
    Just wanted to get some opinion.
    Oracle db : 11.2.0.2
    Our company has only one schema where all objects reside in the design database and developers add code, modify objects etc within that same schema and invalidate other code and other developers sometimes spend a lot of hours around this.
    We personally thought to use editions based redefinitions to resolve this , that way, each developer could modify code in his own edition and other developers are unaware of the change and unaffected.
    Would this be ok and if we go this route, how does this affect the current tablespace and what other issues could we expect.
    Lets say we re talking 10 developers.
    Thanks.

    >
    The problem is even if we have private objects in our own schema, those would not be referenced since developers login to the app using the main schema bcos of object access restrictions and other thing is most of the code references objects using main schemaname.object (old code) and not much synonyms.
    >
    I understand that but edition-based redefinitioning is primarily to support 'code' updates, not DDL and object updates. And it is primarily used to support those updates in the higher-level environments even including production. For those environments it isn't really necessary to have editioned tables or the other currently non-supported objects; the goal is to get new code into place while the current code is running and then 'switch' to it as seamlessly as possible.
    The white paper I cited lists the limited objects that can be editioned.
    >
    editionable object types, editions-enabled users, and editioned objects
    • Views (and therefore editioning views), synonyms, and all the kinds of PL/SQL objects
    type13 (and therefore crossedition triggers) are editionable object types. There are no other
    editionable object types. For example, table is not an editionable object type; nor is
    java class14.
    >
    Unfortunately, for DEV environments those restrictions are generally too onerous when entirely new features are being added.
    A few of the larger environments I've worked in the developers essentially needed their own local version of the entire chain of browser, web server, app server and database. Functionality such as single-signon was global but that was about it.
    Because of the limitations and the relatively steep learning curve to properly architect and implement editioning you need to do adequate preparation and testing to make sure it is going to help you more than hurt you.

  • How to use ICC based colorspace

    hello,
    The question is how to define a color in ICC based colorspace ?
    I tried with gState.strokeColorSpec.value.color array and it work fine when my CIE based colorspace is CMYK but how to do it when colorspace can be CMYKOG or RGB ... ?
    Regards,
    William

    You can certainly use Cos to create the ICC colorspace (or the alternate) just as you did for the DeviceN.
    Cos is just a wrapper over direct PDF objects – so read the PDF standard for what the objects you need are, then make the relevant calls.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 20 Oct 2011 03:03:46 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: how to use ICC based colorspace
    Re: how to use ICC based colorspace
    created by yokuju<http://forums.adobe.com/people/yokuju> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/3981410#3981410

  • Is Edition Based Redefinition available in the Standard Edition of 11g?

    Thanks for all replies.

    Online index rebuild and Online table redefinition require EE version - http://download.oracle.com/docs/cd/E11882_01/license.112/e10594/editions.htm#CJACGHEB
    I believe other features of Edition based redefinition are available in all versions - http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17125/adfns_editions.htm
    HTH
    Srini

  • How to use decode function in oracle apex 3.2.1

    Hello Friends,
    how to use decode
    var_decode := 'decode'||'('|| var1 ||','|| -800000000000000||','||'.A'||','||
    appreciate your help.
    regards/kumar
    Edited by: kumar73 on Apr 23, 2010 12:25 PM
    Edited by: kumar73 on Apr 23, 2010 12:27 PM

    Hey just on this particular point, there's a handy PL/SQL method for escaping quotation characters which may reduce the complexity of the string.
    For example, if I had a string:
    I can't understand why quoting my 'quote' characters never seems to "work"!and I wanted to pass that into a variable, I could do this:
    vc_foo:= 'I can''t understand why my ''quote'' characters never seems to "work"!';or I could use the q function, whereby you enclose your string within a quote delimiter of your choice, like so:
    vc_foo:= q'^I can't understand why quoting my 'quote' characters never seems to "work"!^';
    note: I used the caret (^) character by convention but any valid character will do
    ...all of which leaves your original string more or less unadulterated.
    I find this particularly useful for generating dynamic SQL and dynamic PL/SQL, as it leave the query looking a tad more readable, although if you are chaining together multiple strings with double-pipes, it can make it a little muddier. I find it particularly useful if I'm going to deal with string data from, for example, a field with Irish-derived surnames such as "O'Reilly"...
    Give it a go!

  • How to use text based index

    Hi,
    I want to use a text based index. The problem statement was i have to delete all those records which have column
    'ABC%'
    means data can be ABC1, ABC2, ABCl, ABCn
    so i thought i would do like
    delete from tab1
    where col1 like 'ABC%'.
    There are millions of records.
    so i thought of optimizing the Query by using text based index. If my approach is right can you suggest how i can implement it and Is there any other way around?
    Thanks
    _vinod                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Are you saying that simple b tree index would be used in a qurey where i have used LIKE operator? Yes. Not "would" but certainly "could", as long as wildcard is trailing.
    Now whether it "would" depends on whether it's estimated to be the cheapest access path.

  • How to use JKS-based Keystore in Oracle SOA 11g

    I am trying to do FTPS on third party remote server(with UNIX OS) using SOA 11g FTP Adapter. I have Installed and Configured vsftpd and generated vsftpd.pem certificate file on remote server.
    Followed the steps mentioned in http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10231/adptr_file.htm#CIABDGCF
    In one of the step "Setting Up the Oracle FTP Adapter" walletLocation is required, then I went through steps mentioned in http://download.oracle.com/docs/cd/E17904_01/core.1111/e10105/wallets.htm#CHDGIJDC
    Tried to use both 1) JKS Keystore Management 2) Wallet Management
    But unable to find both of them in em of Oracle SOA 11g as the steps are not matching.
    Can anyone tell me how to use JKS Keystore Management or Wallet Management ?
    Many Thanks!!
    Regards
    Yogesh

    Hi Yogesh,
    I believe the wallet can be created from the FMW console only if the HTTP server is installed and available. If there is no Oracle HTTP server, please configure one as given under.
    [ http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14260/toc.htm | Oracle HTTP Server Installation ]
    Reards,
    Neeraj Sehgal

  • [JS][CS5] How can use 'edit with' option for link using sripting

    Hi All,
    I Can edit link using Link.editOriginal () if the default application is as i need it will open it from there, when I try to open it with other application instead of default application of link file I can't (usually we "use edit" with option in manually). Is there any option to do it in scripting.
    Any clue will help us to update the large set of links in a single click.
    Thanks in advance,
    Sankar L

    Hi csm_phil,
    You are exactly catch my point, my requirement is to update math type eps file. If my math type equation default application file is illustrator (say) as below
    it will open in illustrator instead of mathtype if i use editOriginal function...
    Jus i need to open it in mathtype, the link file default application file is whatever it is.
    Thanks,
    Sankar L

  • How to use Cost Based Optimizer

    Hi,
    I'm looking for a documentation about CBO, I found some information through google and here but anyone knows where I can found more informaton about CBO, how to use, how i'ts increase the performance and more?
    Thank You

    See Oracle® Database Performance Tuning Guide

  • How to use Editable Fields in ALV

    Hi,
    i am using alv with checkbox at extream right and one field date which is  editable.
    now i am executing program,selecing the checkbox and changing the date.
    i want to store the new value of the date field of the selected row in the internal table.
    anyone can tell me how can i store the new value of date field of the selected rows in the internal table.
    Thanks in advance.
    Chintan

    Hi Chintan,
    Please check this code:
    there is sample code for it...
    REPORT  ZTESTDFALV1                             .
    *Data Declaration
    DATA: BEGIN OF T_EKKO,
      EBELN TYPE EKPO-EBELN,
      EBELP TYPE EKPO-EBELP,
    FLAG TYPE C,
    HANDLE_STYLE TYPE LVC_T_STYL,
    END OF T_EKKO.
      DATA: GD_REPID LIKE SY-REPID, "Exists
      REF_GRID TYPE REF TO CL_GUI_ALV_GRID. "new
    DATA: BEGIN OF IT_EKKO OCCURS 0.
            INCLUDE STRUCTURE T_EKKO.
    DATA: END OF IT_EKKO.
    DATA: BEGIN OF IT_BACKUP OCCURS 0.
            INCLUDE STRUCTURE T_EKKO.
    DATA: END OF IT_BACKUP.
    *ALV data declarations
    TYPE-POOLS: SLIS.                                 "ALV Declarations
    DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_LAYOUT    TYPE SLIS_LAYOUT_ALV.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_FIELDCATALOG.
      PERFORM BUILD_LAYOUT.
      IT_BACKUP[] = IT_EKKO[].
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  build_fieldcatalog
          text
    FORM BUILD_FIELDCATALOG.
      REFRESH FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'EBELN'.
      FIELDCATALOG-SELTEXT_M   = 'Purchase Order'.
      FIELDCATALOG-INPUT     = 'X'.
      FIELDCATALOG-EDIT     = 'X'.
      FIELDCATALOG-COL_POS     = 2.
      APPEND FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'EBELP'.
      FIELDCATALOG-SELTEXT_M   = 'PO Item'.
      FIELDCATALOG-COL_POS     = 3.
      APPEND FIELDCATALOG.
      CLEAR  FIELDCATALOG.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM BUILD_LAYOUT.
      "Permet d'ajuster les colonnes au text
    gd_layout-colwidth_optimize = 'X'.
    GD_LAYOUT-TOTALS_TEXT       = 'Totals'(201).
    gd_layout-box_fieldname = 'SELECT'.
    gd_layout-box_tabname   = 'IT_EKKO'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM DISPLAY_ALV_REPORT .
      GD_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM        = GD_REPID
               i_callback_top_of_page   = 'TOP-OF-PAGE'
                I_CALLBACK_PF_STATUS_SET  = 'SET_PF_STATUS'
                I_CALLBACK_USER_COMMAND   = 'USER_COMMAND'
               i_grid_title             = 'My Title'
                IS_LAYOUT                 = GD_LAYOUT
                IT_FIELDCAT               = FIELDCATALOG[]
           TABLES
                T_OUTTAB                  = IT_EKKO
           EXCEPTIONS
                PROGRAM_ERROR             = 1
                OTHERS                    = 2.
      IF SY-SUBRC <> 0.
        WRITE:/ SY-SUBRC.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN EBELP
       UP TO 10 ROWS
        FROM EKPO
        INTO CORRESPONDING FIELDS OF TABLE  IT_EKKO.
    ENDFORM.                    " DATA_RETRIEVAL
                         FORM SET_PF_STATUS                              *
    FORM SET_PF_STATUS USING RT_EXTAB   TYPE  SLIS_T_EXTAB.
      SET PF-STATUS 'STANDARD_FULLSCREEN1' EXCLUDING RT_EXTAB.
    ENDFORM.                    "set_pf_status
    *&      Form  user_command
          text
         -->R_UCOMM    text
         -->RS_SELFIELDtext
    FORM USER_COMMAND  USING R_UCOMM LIKE SY-UCOMM
                             RS_SELFIELD TYPE SLIS_SELFIELD.
    *then insert the following code in your USER_COMMAND routine...
      IF REF_GRID IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            E_GRID = REF_GRID.
      ENDIF.
      IF NOT REF_GRID IS INITIAL.
        CALL METHOD REF_GRID->CHECK_CHANGED_DATA
      ENDIF.
    *modify
      CASE R_UCOMM.
        WHEN '&IC1'.
          CHECK RS_SELFIELD-TABINDEX > 0.
          IF RS_SELFIELD-VALUE EQ '6000000001'.
            CALL TRANSACTION 'ZDF2'.
          ENDIF.
        WHEN 'REFRESH'.
          READ TABLE IT_EKKO INDEX  RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            READ TABLE IT_BACKUP INDEX RS_SELFIELD-TABINDEX.
            IF SY-SUBRC = 0.
              IF IT_EKKO <> IT_BACKUP.
    then do your check
              ENDIF.
            ENDIF.
          ENDIF.
          PERFORM DATA_RETRIEVAL.
          RS_SELFIELD-REFRESH = 'X'.
      ENDCASE.
    ENDFORM.                    "user_command
    and also check this thread in which i gave the solution....
    REUSE_ALV_GRID EDITABLE
    This should help u out...
    Mark useful answers...

  • How to use a LOV object in apex with the parameter?

    Hi,
    I would like to create a LOV object with a query:
    SELECT ID, NAME
    FROM TABLE
    WHERE
    REF= APEX_FORM_VARIABLE
    This is for an Apex report page and each row provides the Apex form variable.

    What is your question then?
    Just create a dynamic LOV with that as your query. Use the bind variable notation for the apex item.

  • How to Use Edit - Cut  menu Command in my program

    Hi All,
    I want to call edit->cut menu action from my program, i have tried with textmodel->cut and also scrapsuite-> cut method, it works for normal text but i have a document with text from Word documents, when i cut the text from menu edit->cut it works properly, but when i tried to cut it from my code i get asserts like owneditem->getconnectedtotext() and the system crashes.can anybody guide me in this regard
    Thanks
    Madhu

    Hi i tried the following code<br /><br />SelectText (poTextModel, oRangeData);<br />InterfacePtr<IActionComponent> iptrActionComponent(CreateObject2<IActionComponent>(kScrapComponentBoss));<br />if (iptrActionComponent != nil )<br />{<br />IActiveContext *poActiveContext = gSession->GetActiveContext ();<br />if (poActiveContext != nil)<br />b iptrActionComponent->DoAction (poActiveContext, kCutActionID); asserts at this point<br /><br />}<br /><br />I am getting "About to use nil interface ptr!" assert,<br /><br />SelectText (poTextModel, oRangeData)->(My function which selects the text of specified range in the specified textmodel) <br /><br />Is anything wrong in the above code

  • Edition Based Redefinition in Oracle 11g R2

    Regarding new feature EBR in Oracle 11g r2
    As we all know Editioning view is like a wrapper over the base table which allows each edition to see the table in the form it needs, all data operations will be on editioning view once the view is created.
    ( Small downtime is required to rename the original_table to original_table_base, as we need to create editioning view as "original_table", applications do not have to change anything as its still pointing to "original_table" )
    During our POC on editioning views (DMLs on E.Views), we have noticed base table names into redo logs ("original_table_base")!!
    This requires significant amount of changes on the application utilizing redo log as source. (for example Goldengate).
    My question is do we have any work around to convert those redo entries into "original_table" ?

    Deepak,
    If I do remember correctly, 11gr2 table compression is enabled for the subsequent data only(can't recall whether its applicable to the exsiting data as well, need to verify it). Also, if the table's data is mostly unique, the rate of compression won't be much higher.
    HTH
    Aman....

  • How to use Edit/Quickly Apply?

    How does the command "Quickly Apply" work?
    I have paragraph styles that I made earlier and that show up when I select "Quickly Apply" but I have tried to apply it to marked text or just when selecting a textframe - neither worked. I marked the text and then I clicked the paragraph style in the Quickly Apply-box. I thought I could quickly reformat a text with this command. What am I doing wrong?
    Help...

    It doesn't sound as if you are **** anything wrong. Do you have locally applied formatting, or a character style which might be interfering with the paragraph style? Will it apply properly from the paragraph styles panel?
    Peter

  • How to use timestamp based dynamic message selector?

    Is it possible with message selector to issue query like statement that
    weill fetch any messages that have header timestamp older than "now" + 3 hrs.
    In SQL you would say something like:
    where timestamp <= sysdate + (180/1440)
    Please let ne know.
    Thank you,
    Edmon

    hi edmon,
    to my knowledge dynamically evalutaed expressions like this are not supported by any of the JMS vendors. messageselectors are in SQL92 format and the only dynamic part in them is the contents of the message properties and headers.
    So, you're out of luck with what you want to do (e.g., remove expired messages from a destination when they havent' been consumed within a time threshold??) but i could see two possible solutions:
    1) You could use time-to-live (TTL) on the sender side. Messages that are on the destination beyond their TTL would be placed onto a dead message queue (DMQ) from where you could consume them for further processing. DMQ is not a standard-JMS feature but supported by a few vendorrs (e.g., JBoss, ArjunaMS).
    2) You could use Message-driven Services (MDS) for more elaborate server-side message processing. MDS has been pioneered by ArjunaMS but is also available with a few other JMS vendors.
    Hope that helps!
    Kind regards,
    Thomas.

Maybe you are looking for

  • Credit Limit

    Dear Experts, we Interducing credit Management now,  we have done the testing for new sale oredres it is working fine, where as in old open sale orders we are trying to testing it is not controlling, "is there any reports to update  old open sale ord

  • Safari won't quit, so I can't install Office Mac.

    Hey guys. I got my new Office Mac, and I was hoping to install it. It said Firefox and Safari needed to close. Firefox was a snap (good job guys!), but Safari is doing HORRIBLE. It is not forcing to quit at all, and I don't want to restart or shut do

  • Music not playing in music app on IPAD 2

    My iPad 2 is just not playing music in the music app. I can click play, it says it is playing but the bar doesnt move to indicate playback and there is no sound. I've tried closing the app and restarting the device.  Does anyone have any ideas?

  • How to change a Credit Card Commission Currency

    Hi Experts, I hope you can help me with a question I have... I have a USD Customer who is paying a USD AR Invoice by a Credit Card. I am in Banking -> Deposits -> Credit Card.  I have selected my Deposit Currency as USD, selected my Euro Bank Account

  • Auto Save  the unsaved Data

    Hi, We can set up your SAP System to automatically log off users with no activity after a specified period of time. We can activate automatic Logoff by setting the system profile parameter rdisp/gui_auto_logout to the number of seconds of inactivity