This discussion is archived
3 Replies Latest reply: Sep 27, 2013 12:31 PM by 0409428c-1e80-49d5-bc66-823150416d03 RSS

APEX_INSTANCE_ADMIN PACKAGE NOT FOUND IN APEX 4.0

842063 Newbie
Currently Being Moderated
Hi,

I have created a workspace in APEX 4.0 and named it POC_TEST with a schema called POC_TEST .I am trying to run the below command in SQL Commands Window to automate the creation of any workspace in APEX.


ALTER SESSION SET CURRENT_SCHEMA=APEX_040000;
BEGIN
APEX_INSTANCE_ADMIN.ADD_WORKSPACE(8675309,'MY_WORKSPACE','POC_TEST','POC_TEST1');
END;


The following error throws up in the SQL Parsing window:

ORA-06550: line 2, column 1:
PLS-00201: identifier 'APEX_INSTANCE_ADMIN' must be declared
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
1. BEGIN
2. APEX_INSTANCE_ADMIN.ADD_WORKSPACE(8675309,'MY_WORKSPACE','POC_TEST','POC_TEST1');
3. END;

I tried running the below PL/SQL statement:

SELECT object_name
FROM all_objects
WHERE object_type = 'PACKAGE'
AND object_name = 'APEX_INSTANCE_ADMIN'

But it said 'No Data Found'

Please reply to this if anybody has a solution.
  • 1. Re: APEX_INSTANCE_ADMIN PACKAGE NOT FOUND IN APEX 4.0
    842063 Newbie
    Currently Being Moderated
    I have created a workspace in APEX 4.0 and named it POC_TEST with a schema called POC_TEST .I am trying to run the below command in SQL Commands Window to automate the creation of any workspace in APEX.

    ALTER SESSION SET CURRENT_SCHEMA=APEX_040000;
    BEGIN
    APEX_INSTANCE_ADMIN.ADD_WORKSPACE(8675309,'MY_WORKSPACE','POC_TEST','POC_TEST1');
    END;


    The following error throws up in the SQL Parsing window:

    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'APEX_INSTANCE_ADMIN' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    1. BEGIN
    2. APEX_INSTANCE_ADMIN.ADD_WORKSPACE(8675309,'MY_WORKSPACE','POC_TEST','POC_TEST1');
    3. END;

    I tried running the below PL/SQL statement:

    SELECT object_name
    FROM all_objects
    WHERE object_type = 'PACKAGE'
    AND object_name = 'APEX_INSTANCE_ADMIN'

    But it said 'No Data Found'

    The Database on which the SQL scripts have been run is ORACLE 11i

    Please reply to this if anybody has a solution.
  • 2. Re: APEX_INSTANCE_ADMIN PACKAGE NOT FOUND IN APEX 4.0
    trent Expert
    Currently Being Moderated
    I am not sure about why its not working on your environment, but here it is fine.

    I do note that your query:
    839060 wrote:
    SELECT object_name
    FROM all_objects
    WHERE object_type = 'PACKAGE'
    AND object_name = 'APEX_INSTANCE_ADMIN'

    But it said 'No Data Found'
    Is producing the correct output based on those conditions:
    SQL>  select object_name,object_type from all_objects where object_name like 'APEX_INSTANCE%';
    
    OBJECT_NAME                 OBJECT_TYPE
    ------------------------------ -------------------
    APEX_INSTANCE_ADMIN            SYNONYM
    APEX_INSTANCE_ADMIN            SYNONYM
    Ta,
    Trent

    Edited by: trent on Feb 23, 2011 11:07 PM

    Most likely you are connected to a user that does not have permissions to use apex_instance_admin.

    Edited by: trent on Feb 23, 2011 11:08 PM
    The APEX_INSTANCE_ADMIN package provides utilities for managing an Oracle Application Express runtime environment. You use the APEX_INSTANCE_ADMIN package to get and set email settings, wallet settings, report printing settings and to manage scheme to workspace mappings. APEX_INSTANCE_ADMIN can be executed by the SYS, SYSTEM, and APEX_040000 database users as well as any database user granted the role APEX_ADMINISTRATOR_ROLE.
    http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/apex_instance.htm#CACGJEDD

    Even though you are altering the session, probably you need to first connect with a user with the appropriate roles.
  • 3. Re: APEX_INSTANCE_ADMIN PACKAGE NOT FOUND IN APEX 4.0
    0409428c-1e80-49d5-bc66-823150416d03 Newbie
    Currently Being Moderated

    If not connected as SYS or SYSTEM get identifier 'APEX_INSTANCE_ADMIN' must be declared. Thanks

Legend

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