This discussion is archived
11 Replies Latest reply: Feb 3, 2009 12:50 PM by Tyler RSS

Post Clone Apex steps

627615 Newbie
Currently Being Moderated
Hi all, we are having an issue that after our clones, we are not seeing the same permissions granted to APEX in our test and development instances as they are set up in Production. All clones come from production...Has anyone else come across this issue?

Are there some post clone specific steps we should be following that we are not? In prodcution APEX can see our apps tables yet in development after a clone, I cannot see apps or even create an apex table and select from it within apex.

Any ideas?

Danny
  • 1. Re: Post Clone Apex steps
    438381 Guru
    Currently Being Moderated
    Danny:

    What method is used to 'clone' the test and dev environments from production ?

    Varad
  • 2. Re: Post Clone Apex steps
    627615 Newbie
    Currently Being Moderated
    Varad,
    The database is being cloned by a Snapview Clone on the EMC storage and then rapidclone is used on top of that.
  • 3. Re: Post Clone Apex steps
    Tyler Expert
    Currently Being Moderated
    Is this a full database clone? Unless you clone the entire database, it's not going to work.

    Tyler
  • 4. Re: Post Clone Apex steps
    438381 Guru
    Currently Being Moderated
    Danny:

    I am not sure what 'rapidclone' does. Can you verify that the APEX schema 'FLOWSxxxx' and any schema identified as a workspace parsing schema exists in the cloned database ?

    Varad
  • 5. Re: Post Clone Apex steps
    Tyler Expert
    Currently Being Moderated
    Even if you get the FLOWS_XXXXXX and FLOWS_FILES schemas, plus any application schemas, you will still be missing:
    - Grants between the 2 FLOWS schemas
    - privs granted to those schemas
    - Public Synonyms
    - APEX objects owned by SYS (there are a few)

    Tyler
  • 6. Re: Post Clone Apex steps
    438381 Guru
    Currently Being Moderated
    Yes, perhaps a re-install of APEX and importing of the applications might be needed.

    Varad
  • 7. Re: Post Clone Apex steps
    627615 Newbie
    Currently Being Moderated
    Tyler, Varad,
    Yes its a full database clone....

    Tyler, the items you indicated - are those items that need to be performed after the clone as post clone steps? Guess I dont know enough about the dba tasks on clones to know why the wouldnt be included since you are cloning a full snapshot of the production image and then modifying all of the pointers from prod to Dev or test. I would have thought that would include grants, etc.

    Edited by: Danny L Sullivan on Feb 3, 2009 12:20 PM
  • 8. Re: Post Clone Apex steps
    627615 Newbie
    Currently Being Moderated
    one more item - the APex schema does in fact live inside of the Oracle database and there are actually 2 schemas that come in defaulted - Apex and apex_public_user
  • 9. Re: Post Clone Apex steps
    Tyler Expert
    Currently Being Moderated
    If you are using APEX 3.1 or greater, try the following statement when connected as a DBA:
    desc sys.WWV_DBMS_SQL
    This is to determine whether or not the SYS objects are there. Just to be clear, you are sure the clone is a complete clone including ALL tablespaces and users, even SYS and SYSTEM? This should be comparable to an "Image Copy" or a full RMAN backup and restore.

    What version of APEX, database, HTTP Server are you using?

    What are the exact symptoms of your problem?

    Thanks,
    Tyler
  • 10. Re: Post Clone Apex steps
    627615 Newbie
    Currently Being Moderated
    Tyler - I will re-verify with the dba's...


    My biggest issue right now is that we do most of our development work in BGNAD - our dev instance....After a recent clone, apex operates differently in BGNAD than it does in BGNAP. I discovered this as our applications we had developed were getting errors that the tables and views we had given permissions to did not exist. I could verify this by going to SQL workshop/sql commands and typing things in like select * from gl.gl_code_combinations and get an ora 942 error - table or view does not exist.

    The Apex schema user in Apex development couldnt view those tables as a select statement script yet they were already shared and you could actually view them from query builder inside of APEX. I suspect query builder has its own set of permissions from SQL Workshop/ SQL commands, yet code written inside of developed apps appears to follow the same permissions as the SQL commands window.

    It was like all the the grants to apex had been removed even to the extent that within APEX, I could not create my own table and select from it....I was able to create the table in apex and even enter data into it via the insert data function from the object browser but when I would go to the SQL Workshop/SQL commands and do a select * from EMP1, get the error table or view does not exist.

    I discovered this because I was trying to duplicate the apex demo Denes had created on cascading LOVS using ajax in one of these forums and since I never did get it working decided I would create a table called EMP1 to recreate the data used in the demo against a teble called emp.....thats when I got the error.

    I had issues on previous instance of dev work with permissions disappearing so I made sure we incorporated them all into BNGAP assuming that when we clone, those would be in place. That didnt occur for all of those grants on this last clone but not all grants disappeared. Only a partial grouping of APEx grants appeared to disappear. Thats when we started wondering if we are missing something or if Apex has a set of post clone steps we are bypassing
  • 11. Re: Post Clone Apex steps
    Tyler Expert
    Currently Being Moderated
    What version of APEX, database, HTTP Server are you using?

    One quirk to keep in mind is that the SQL Workshop can use database "ROLES" to inherit object privs whereas APEX Applications have no concept or ROLES. Everything must use a direct grant such as grant select on scott.emp to my_schema.

    Tyler

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points