3 Replies Latest reply on Sep 6, 2019 9:32 PM by Darrin Parker

    APEX 18.2 Private Saved Interactive Reports deleted on deploy to production

    Darrin Parker

      We have our APEX app in source control and we install it using APEX_APPLICATION_INSTALL api as follows:

       

      begin
        dbms_output.put_line('Installing ' || p_app_alias || ' - ' ||   p_workspace_name || ' - ' || p_parsing_schema);
        :bv_workspace_id := apex_util.find_security_group_id (p_workspace => p_workspace_name);
        apex_application_install.set_workspace_id( :bv_workspace_id );
        select max(application_id) into v_old_application_id
          from apex_applications
          where alias = p_app_alias and workspace = upper(p_workspace_name);
        if (v_old_application_id is not null) then
          apex_application_install.set_application_id(v_old_application_id);
        else
          apex_application_install.generate_application_id;
        end if;
        :bv_application_id := apex_application_install.get_application_id;
        apex_application_install.set_application_alias(  p_app_alias );
        apex_application_install.generate_offset;
        apex_application_install.set_schema( p_parsing_schema );
        apex_application_install.set_keep_sessions( true );
      end;
      

       

      Then we run install.sql to replace the existing application - i.e. the scenario above where v_old_application_id is not null, therefore we do apex_application_install.set_application_id(v_old_application_id)

       

      We do this on 3 different servers (Dev, Test, and Production).  In our Dev and Test environments this works fine and existing Private Saved Interactive Reports are not deleted on install.  I can see that the WORKSHEET_ID field on the WWV_FLOW_WORKSHEET_RPTS table is updated using the new offset (I assume).

       

      However, in Production the Private Saved Interactive Reports are gone/deleted (rows in WWV_FLOW_WORKSHEET_RPTS are gone)!  All servers/environments are configured the same.  Can someone help me diagnose the problem - where should I look?  What causes the rows in WWV_FLOW_WORKSHEET_RPTS to be deleted instead of updated on install?

       

      Thanks