Insufficient privileges of procedure

Hello
In 11.1.0.7 on SOLARIS, I have a procedure created in the schema of SYSTEM that queries dba_tables and then uses dynamic sql to remove tables of a schema (schema name suppose ABC).
When I run this procedure, I get ORA-01031: insufficient privileges error.
If I run the same code as a box of PL/SQL (not), I am able to run this code and remove all the tables that meet the criteria.

No idea why oracle does not allow a procedure in the schema to remove these tables of one schema other SYSTEM? and let me down PL/SQL block.

Salman

a procedure cannot use rights since in a role (DBA)
the user's system must be granted delete any table

concerning

Tags: Database

Similar Questions

  • insufficient privileges when you create sequence using the procedure

    CREATE OR REPLACE PROCEDURE schema1.proc1 AS
    BEGIN
    EXECUTE IMMEDIATE 'DROP SEQUENCE schema1.add_ins_seq';
    EXECUTE IMMEDIATE 'CREATE SEQUENCE schema1.add_ins_seq MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 1000 NOORDER  NOCYCLE';
    END;
    

    This procedure is created to schema1 by schema1.

    Schema1 boasts a CREATE SEQUENCE privilege.

    When I run this procedure through SQL Developer after the Cup to schema1, the error is thrown in insufficient privilege to CREATE SEQUENCE, however, DROP SEQUENCE is executed. I can create the sequence without the procedure call.

    If I add AUTHID CURRENT_USER so I don't get the error of insufficient privileges.

    Why it gives this error when the owner and the applicant of the procedure is schema1?

    Hello

    1st thing to know: when a procedure is defined (and updated), any privileges granted through ROLE is not taken into account. This is because these privileges can be active or not at the level of the session (as happens if for example a user has active 'role A' in session 1 but not in session 2 and if this role has been used to define a procedure?) The proecedure must at the same time be VALID in session 1 and INVALID session 2? Is not possible.

    Thus, for instance in a situation of 'standard': user SYSTEM has 'DBA Rôle', so you can for example make a sqlplus session "SELECT * v $ instance;", but you would write a procedure owned by system making instance_name SELECT INTO l_variable OF v$ instance;  "then"surprise": the procedure cannot be compiled because of the ORA-904 Table or view does not exist..." To be able to create the procedure, a DSS system needs to be done.

    2nd thing for your special case, a little more complex: default for a procedure is 'AUTHID DEFINE', but once more: it means "privileges of the author creating the procedure", so without taking into account the acquired privileges through roles... Your user name is 'sequence create' through a role, it cannot use the privilege within the procedure.  But... but when you define the procedure with AUTHID CURRENT_USER, privileges are evaluated at run time, and thanks to the active ROLE in the session by calling the procedure, at this time, the user can create the sequence.  If try again you but with 'The VALUE NONE ROLE' in the session before the call, you will again have the question.

    Conclusion: If you need to do the action, you must grant the user the necessary privilege directly.

    Best regards

    Bruno Vroman.

  • Re: "insufficient privileges" error when you run the Java stored procedure in another schema

    I get an "insufficient privileges" error when you run the Java stored procedure in another schema, see details below.  I don't know what are missing privileges (I already granted the EXECUTE privilege), suggestions?  -Thank you.

    Define a simple java class and deploy it as a Java stored procedure to test:


    Schema: User1

    test of the package;

    public class HelloWorld {}

    public HelloWorld() {

    Super();

    }

    public static String Hello () {}

    Return "HELLO";

    }

    }

    CREATE or REPLACE FUNCTION HELLO RETURN VARCHAR2 AUTHID CURRENT_USER AS LANGUAGE JAVA NAME ' test. HelloWorld.hello () return java.lang.String';

    Grant execute on USER2 HELLO

    Test the Java stored procedure through the PL/SQL function call (in the same schema):


    Schema: User1

    SET SERVEROUTPUT ON

    DECLARE

    v_Return VARCHAR2 (200);

    BEGIN

    v_Return: = User1. HELLO;

    DBMS_OUTPUT. Put_line ('v_Return =' | v_Return);

    END;

    anonymous block filled

    v_Return = HELLO

    Test the Java stored procedure through the PL/SQL function call in a different pattern:


    Schema: USER2

    SET SERVEROUTPUT ON

    DECLARE

    v_Return VARCHAR2 (200);

    BEGIN

    v_Return: = User1. HELLO;

    DBMS_OUTPUT. Put_line ('v_Return =' | v_Return);

    END;

    Error report-

    ORA-01031: insufficient privileges

    ORA-06512: at "User1." HELLO', line 1

    ORA-06512: at line 4 level

    01031 00000 - "insufficient privileges".

    * Cause: An attempt was made to change the user name or password

    without the privilege appropriate. This error also occurs if

    trying to install a database without the need for employment

    access privileges.

    When Trusted Oracle is configure in DBMS MAC, this error may occur

    If the user has been granted the privilege necessary for a higher label

    that the connection is active.

    * Action: Ask the database to perform the operation or grant administrator

    the required privileges.

    For users Trusted Oracle get this error, well that granted the

    the privilege that is suitable for the top label, ask the database

    administrator to grant the privilege to the appropriate label.

    You have created the function with AUTHID CURRENT_USER, which means that the function is executed with the rights of the applicant (but not with the rights of the author). This means that the applicant must have grants (directly or through roles) on all used/accessible objects in the service. In your case the user USER2 has not granted with EXECUTE on the class/source Java test. Class HelloWorld, causing the ORA-01031 exception. You create service without AUTHID CURRENT_USER (i.e. with AUTHID DEFINE, which is by default, if you do not have a specific reason to use AUTHID CURRENT_USER) or grant EXECUTE on JAVA test SOURCE. Class HelloWorld to User2.

    Dimitar

  • Error of insufficient privileges on the creation of model running in a stored procedure

    Hello

    I get the error of insufficient privileges on execution of the DBMS_DATA_MINING. Script CREATE_MODEL in a stored procedure.

    If I run the same DBMS_DATA_MINING. Script CREATE_MODEL in an anonymous block with just begin... end;

    I am able to create a model successfully, but if I do the same thing after having stored the script in the stored procedure, it is throwing error of insufficient privileges.

    Scripts:

    BEGIN

    DBMS_DATA_MINING. () CREATE_MODEL

    Model_name = > < template name >

    mining_function = > dbms_data_mining. CLASSIFICATION,

    DATA_TABLE_NAME = > < data table name >

    CASE_ID_COLUMN_NAME = > < case ID >

    target_column_name = > < target column >

    SETTINGS_TABLE_NAME = > < settings table >

    DATA_SCHEMA_NAME = > < schema >

    SETTINGS_SCHEMA_NAME = > < schema >

    );

    END;

    The foregoing, works very well and created a model with the model given with success.

    But if I keep the above, in a stored procedure as - MINING_TESTING

    create or replace procedure MINING_TESTING as

    BEGIN

    DBMS_DATA_MINING. () CREATE_MODEL

    Model_name = > < template name >

    mining_function = > dbms_data_mining. CLASSIFICATION,

    DATA_TABLE_NAME = > < data table name >

    CASE_ID_COLUMN_NAME = > < case ID >

    target_column_name = > < target column >

    SETTINGS_TABLE_NAME = > < settings table >

    DATA_SCHEMA_NAME = > < schema >

    SETTINGS_SCHEMA_NAME = > < schema >

    );

    END;

    Compiles correctly.

    Enforcement - EXEC MINING_TESTING;

    Error message throw sufficient privileges.

    The error message complete below:

    Error report:

    ORA-01031: insufficient privileges

    ORA-06512: at "SYS." DBMS_DATA_MINING', line 1798

    ORA-06512: at "MIS_ORABI_ODM.CA_MINING_TESTER", line 3

    ORA-06512: at line 1

    01031 00000 - "insufficient privileges".

    * Cause: An attempt was made to change the user name or password

    without the privilege appropriate. This error also occurs if

    trying to install a database without the need for employment

    access privileges.

    When Trusted Oracle is configure in DBMS MAC, this error may occur

    If the user has been granted the privilege necessary for a higher label

    that the connection is active.

    * Action: Ask the database to perform the operation or grant administrator

    the required privileges.

    For users Trusted Oracle get this error, well that granted the

    the privilege that is suitable for the top label, ask the database

    administrator to grant the privilege to the appropriate label.

    Hello

    DataMiner UI grants privileges to a role, so if you're depending on these privileges you must proceed as follows when you create a stored procedure.

    Your stored procedure was created with the default authid which is definers. It will not use the privileges for the role. Solution is to create the stored procedure with authid current_user. This will pick up the privileges for the role. Another option is to apply the following subsidies directly to the user account:

    grant CREATE MINING MODEL

    CREATE THE TABLE,

    IN ORDER TO CREATE

    Example of stored procedure:

    create or replace procedure MINING_TESTING AUTHID CURRENT_USER as

    BEGIN

    DBMS_DATA_MINING. () CREATE_MODEL

    MODEL_NAME =>

    mining_function-online dbms_data_mining. CLASSIFICATION,

    DATA_TABLE_NAME =>

    CASE_ID_COLUMN_NAME =>

    target_column_name =>

    SETTINGS_TABLE_NAME =>

    DATA_SCHEMA_NAME =>

    SETTINGS_SCHEMA_NAME =>

    );

    END;

    Thank you, Mark

  • insufficient privileges when executing stored procedure

    Hello gurus,
    I'm new to plsql, working on a stored procedure.
    Basically, trying to create a temporary table by using the dynamic sql... Here is my code, the runtime, I'm encoutering error of insufficient privileges. not sure where I'm wrong. any help is appreciated, thanks

    -successfully - compiled code
    SQL > CREATE or REPLACE procedure stp_temp (i_table in varchar2)
    2 is
    3 table_creation_stmt varchar2 (4000): = ";
    4 start
    5
    6 table_creation_stmt: = 'CREATE of TABLE TEMPORARY GLOBAL' | i_table | ' AS select * from TABLE_STGG';
    7 dbms_output.put_line (' query is :'|| table_creation_stmt);
    8 execution immediate table_creation_stmt;
    9 end;
    10.

    Created procedure.

    SQL > exec stp_temp ('table123');
    Request: CREATE TEMPORARY TABLE global table123 AS select * from TABLE_STGG
    BEGIN stp_temp ('table123'); END;

    *
    ERROR on line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "E3US9T. STP_TEMP', line 8
    ORA-06512: at line 1


    -table gets created to copy/paste on top of the output (that is the query)

    SQL > CREATE GLOBAL TEMPORARY TABLE table123 AS select * from TABLE_STGG;

    Table created.

    Why the hell you create a TWG in a stored procedure?

    Create once and be done with it.

    To answer your question, your create table privilege granted to you via a role. Roles are not in pl/sql, you need the privilege granted to you directly.

  • insufficient privileges when using dynamic sql statements in the procedure

    Hello
    I use following script on oracle 10g. and get the error not enough privs. Please advice.

    SQL > show user
    The user is 'GRSADM '.
    SQL > create or replace procedure grsadm.test_proc as
    a varchar2 (2000);
    Start
    a: =' VIEW to CREATE or REPLACE
    TEST_VIEW
    IN SELECT
    "FLAS" one
    THE DOUBLE ';
    immediately run one;
    end;
    Created procedure.
    SQL > start
    grsadm.test_proc;
    end;
    Start
    grsadm.test_proc;
    end;
    Error on line 16
    ORA-01031: insufficient privileges
    ORA-06512: at "GRSADM. TEST_PROC', line 9
    ORA-06512: at line 2

    SQL > select * from session_privs
    where the privilege as "VIEW %.

    PRIVILEGE
    ----------------------------------------
    CREATE A VIEW
    REMOVE ANY VIEW
    CREATE A MATERIALIZED VIEW
    MODIFY A MATERIALIZED VIEW
    REMOVE ANY MATERIALIZED VIEW


    5 selected lines.

    Published by: Rous Sharma on November 24, 2011 12:00

    GRSADM has a privilege ' CREATE (all) VIEW ' live?
    And not via a role...

    SSM
    Samir,
    GRSADM is the owner of this procedure, it seems that the EXECUTE priv, that you suggested is already involved.

  • Create table ORA-01031: insufficient privileges

    SQL > indicate user USER is 'TEST_RPT.

    SQL > CREATE TABLE mytest (id NUMBER); - it does not work

    CREATE TABLE mytest (id NUMBER)

    * ERROR at line 1: ORA-01031: insufficient privileges

    SQL > CREATE TABLE TEST_RPT.mytest (id NUMBER).

    Table created. SQL >


    SQL > select * from session_privs;

    PRIVILEGE

    ----------------------------------------

    ANY PROCEDURE DEBUG

    DEBUGGING SESSION CONNECT

    CREATE INDEXTYPE

    OPERATOR TO CREATE

    CREATE THE TYPE

    CREATE THE TRIGGER

    CREATE PROCEDURE

    CREATE SEQUENCES

    CREATE VIEW

    CREATE SYNONYM

    CREATE THE CLUSTER

    CREATE TABLE

    UNLIMITED TABLESPACE

    ALTER SESSION STATEMENT

    CREATE SESSION

    Try this:

    SELECT USER, SYS_CONTEXT('USERENV','CURRENT_SCHEMA') FROM DUAL;

    The two identical values? CURRENT_SCHEMA is what will determine the owner of the table you create, if you do not specify an owner.

    This can be changed by

    ALTER SESSION SET CURRENT_SCHEMA = whatever_you_want_it_to_be;

  • ORA-01031: insufficient privileges in ORACLE 8.0.5


    Hi all


    Can you help me please:


    IM using ORACLE 8.0.5



    I made this package:

    ORACLE 8.0.5

    CREATE OR REPLACE PACKAGE BODY MULTIFOX. PAQ_MULTIFOX AS

    PROCEDURE REVISA_CRED IS

    BEGIN

    UPDATE / * + BYPASS_UJVC * /.

    (

    SELECT IF NECESSARY. CDGNS, PRN. CICLO, PRN. CANTAUTOR, MPD. NF

    OF MULTIFOX. MPD MPD,

    SIACOM. NRP NRP

    WHERE MPD. CDGNS = PRN. CDGNS AND MPD. CICLO = PRN. CICLO

    AND THE LBD. CANTAUTOR > 0

    ) NF SET = null;

    COMMIT;

    END;

    END PAQ_MULTIFOX;

    /

    CREATE OR REPLACE PACKAGE MULTIFOX. PAQ_MULTIFOX AS


    PROCEDURE REVISA_CRED;

    END PAQ_MULTIFOX;

    When I call this procedure of Toad SQLEditor I get this error

    Capturado.gif

    If I run the script directly in TOAD sqleditor, it works great!

    Capturado.gif

    I have connected to the schema SIACOM one gave all permisions them user MULTIFOX,.


    GRANT CONNECT TO MULTIFOX;

    GRANT DBA TO MULTIFOX;

    MULTIFOX GRANT RESOURCE;

    GRANT SELECT ANY TABLE TO MULTIFOX;

    GRANT EXECUTE ANY PROCEDURE TO MULTIFOX;

    GRANT SELECT, INSERT ON SIACOM. PD FOR MULTIFOX;

    GRANT SELECT, INSERT ON SIACOM. PDI TO MULTIFOX;

    but don't solve it, get the same error (ORA-01031: insufficient privileges)

    When I add the AUTHID CURRENT_USER clause to the definition of the package, had this error in compiling...

    Capturado.gif

    What Miss me?

    Thanks in advance. !



    But isn't your request doing an UPDATE? A right to select is not help with that.

    The best way to solve the problems related to the privilege is to remove all of THE objects except for one a simple query and see if it works. If she adds another object of return and test this.

    You will find the problem object when it fails.

  • error "insufficient privileges".

    I get an "insufficient privileges" error when you run the Java stored procedure in another schema, see details below.  I don't know what are missing privileges (I already granted the EXECUTE privilege), suggestions?

    Define a simple java class and deploy it as a Java stored procedure to test:

    Schema: User1

    test of the package;

    public class HelloWorld {}

    public HelloWorld() {

    Super();

    }

    public static String Hello () {}

    Return "HELLO";

    }

    }

    CREATE or REPLACE FUNCTION HELLO RETURN VARCHAR2 AUTHID CURRENT_USER AS LANGUAGE JAVA NAME ' test. HelloWorld.hello () return java.lang.String';

    Login in SYS as SYSDBA and perform this grant:

    grant execute on User1. User2 HELLO

    Test the Java stored procedure by calling the PL/SQL function (in schema User1):

    SET SERVEROUTPUT ON

    DECLARE

    v_Return VARCHAR2 (200);

    BEGIN

    v_Return: = HELLO;

    DBMS_OUTPUT. Put_line ('v_Return =' | v_Return);

    END;

    anonymous block filled

    v_Return = HELLO

    Test the Java stored procedure by calling the PL/SQL function (in schema USER2):

    Schema: USER2

    SET SERVEROUTPUT ON

    DECLARE

    v_Return VARCHAR2 (200);

    BEGIN

    v_Return: = User1. HELLO;

    DBMS_OUTPUT. Put_line ('v_Return =' | v_Return);

    END;

    Error report-

    ORA-01031: insufficient privileges

    ORA-06512: at "User1." HELLO', line 1

    ORA-06512: at line 4 level

    01031 00000 - "insufficient privileges".

    * Cause: An attempt was made to change the user name or password

    without the privilege appropriate. This error also occurs if

    trying to install a database without the need for employment

    access privileges.

    When Trusted Oracle is configure in DBMS MAC, this error may occur

    If the user has been granted the privilege necessary for a higher label

    that the connection is active.

    * Action: Ask the database to perform the operation or grant administrator

    the required privileges.

    For users Trusted Oracle get this error, well that granted the

    the privilege that is suitable for the top label, ask the database

    administrator to grant the privilege to the appropriate label.

    We found the problem.  In the loadjava call, we need to specify the "-grant User2" option.

  • insufficient privileges as sys

    Can someone explain this situation?

    DB version: 11.2.0.4.0

    in the scheme of the User1, there is a procedure:

    create or replace procedure do_alter_user is
    begin
    execute immediate 'alter user hr identified by hr acount unlock';
    end;
    
    

    now, we run the procedure like this

    conn / as sysdba
    exec user1.do_alter_user;
    
    

    There is an error return

    ORA-01031: insufficient privileges

    its easy to give the user to alter privilege to User1.

    But im running the procedure as SYS?

    Thank you.

    Update:

    When running the steps in a database 11.2.0.2.0 the procedue completes successfully.

    its easy to give the user to alter privilege to User1.

    But im running the procedure as SYS?

    Caution - it is important to be VERY precise in the terms / words that you use.

    You say you 'perform the procedure as SYS' but most likely, you mean that the SYS user is to PERFORM the procedure, which is owned by USER1.

    The procedure is a defect, the DEFINER rights procedure so it runs with the privileges of USER1, not SYS privileges.

    See "how the work of roles in PL/SQL blocks" in the doc of database security

    http://docs.Oracle.com/CD/B28359_01/network.111/B28531/authorization.htm#i1007304

    See 'Rights of appellant to help' or define (AUTHID Clause) in the doc of the PL/SQL language

    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/subprograms.htm#LNPLS00809

    For units stored PL/SQL that you create or change with the following statements, you can use the optional parameter AUTHID clause to specify either CURRENT_USER or DEFINER . The default value is DEFINER .

  • Issue of insufficient privileges

    Could anyone help on this?

    create or replace procedure

    as

    txt varchar (100): ='GRANT SELECT ON "RADB. "" NOV14 ' to RADB_READ_ONLY';

    Begin

    run immediately (txt);

    end;

    SQL > execute test

    START the test; END;

    *

    ERROR on line 1:

    ORA-01031: insufficient privileges

    ORA-06512: at "DRAI01. TEST', line 5

    ORA-06512: at line 1

    But it works.

    Begin

    run immediately ('GRANT SELECT ON "RADB".) "" NOV14 "to RADB_READ_ONLY"); "

    end;

    Kind regards

    VN

    Please explain why it is necessary to publish the GRANT via EXECUTE IMMEDIATE.

    all GRANT & CREATE statements should be made through SQL static during the upgrade of the application.

    BTW, object name should NEVER contain DATE value; as "NOV14!

    Is not consistent with the normal form of third & must be an additional column in another table!

  • Insufficient privileges in the creation of MV that he select another schema table

    Hello

    Before asking this question, I checked with similar questions in the forum, but I don't see my situation, or I'd say I'm not clear on the solution.

    I got the privileges CREATE MATERIALIZED VIEW and CREATE ANY MATERIALIZED VIEW and I want to create a MV in my schema, but the MV selects data in another schema, and I had the privilege to choose this table. Here is my code

    Create VIEW MATERIALISEE CPY_GL_HANDS_OFF_DTL

    UPDATE THE BEGINNING WITH THE LARGEST (SYSDATE, TO_DATE ('2013.10.30.23.30.00 ',' YYYY.)) MM DD. HH24.MI. THE NEXT SS SYSDATE')) + (50519 /(24*60*60)) FULL

    ENABLES QUERY REWRITE

    SELECT

    *

    Of

    User_a.GL_HANDS_OFF_DTL@dblink;

    I run it, and I get ORA-01031: insufficient privileges. According to my research so far, the schema of the latter requires the CREATE TABLE privilege, even though she already had RESOURCES (which already includes the CREATE TABLE). Is this true? That's my problem. I only have read access to the table of the dblink, I can't control the privileges of this scheme. Advise please if this is the real problem?

    Thanks and greetings

    acquired through ROLE privileges do NOT apply in the PL/SQL name procedures

  • 01031 00000 - "insufficient privileges".

    Dear friends,

    I am getting below error when executing a procedure.

    Error from the 32 in the command line:

    BEGIN ADDTABLEIFNOTEXISTS(); END;

    Error report:

    ORA-01031: insufficient privileges

    ORA-06512: at "BOP. ADDTABLEIFNOTEXISTS', line 6

    ORA-06512: at line 1

    01031 00000 - "insufficient privileges".

    * Cause: An attempt was made to change the user name or password

    without the privilege appropriate. This error also occurs if

    trying to install a database without the need for employment

    access privileges.

    When Trusted Oracle is configure in DBMS MAC, this error may occur

    If the user has been granted the privilege necessary for a higher label

    that the connection is active.

    * Action: Ask the database to perform the operation or grant administrator

    the required privileges.

    For users Trusted Oracle get this error, well that granted the

    the privilege that is suitable for the top label, ask the database

    administrator to grant the privilege to the appropriate label.

    the user contain the ROLE DBA and I tried to RUN a PROCEDURE to this user, but still, I get the same error.

    I tried with "GRANT EXECUTE ANY PROCEDURE TO BOP WITH OPTION ADMIN;"

    'GRANT EXECUTE ANY PROCEDURE to BOP;' but no use

    I have to give other permissions?

    Hello

    You need CREATE TABLE system privilege.  Since it is a procedure of AUTHID DEFINE (by default), all privileges must be granted directly to the owner of the procedure and is not just a role that is the owner.  Roles do not count in the AUTHID DEFINE stored procedures.

  • vCenter 4.1 Guided Consolidation: bad powers or insufficient privileges

    Hello

    After a week of unsuccessful attempts (including harvesting, forums and search engines), I turn to the community for possible help.

    I did the following:

    • installed Guided Consolidation on our machine of vCenter Server 4.1.
    • define two services to run under my high account (domain account / I have administrative rights on all our machines)
    • restart the services for the changes to apply
    • configured the plugin to use the my elevation (domain account)
    • added three sweeping machines - on these machines I have my domain credentials explicitly in local administrators, in addition to having their granted by a security group.

    all exceed the 1st phase of the analysis fails with 'Bad powers or insufficient privileges', although Guided Consolidation is able to correctly report info info CPU and memory. In addition, newspapers report a 'deniedexception' in their path, although I can't work on what goes wrong. All servers are running Windows Server 2003 R2 (32-bit).

    I have seen articles noting that the account used for the detection/race services must have domain administrator privileges. Is this true? I have not one cannot ask such access in my environment. I want to exclude explicitly any comments pertaining to open ports, because computers are in the same network segment and are not protected by Firewall (or windows firewall or hardware fw).

    Your help is greatly appreciated.

    Thank you

    Max

    I don't think that you can upgrade one marked as 'useful' to 'correct '.

    Basically, show you your own thread under your account and there should be a button on each post on 'mark as correct' or 'mark as useful'... not sure of the exact procedure that I usually tell people, to ask questions.

    You can test the process on this post

    Anywho, good to see that you are on the path of consolidation.

    Best regards

    Jon Hemming

  • ORA-01031: insufficient privileges problem

    Hi all

    I am creating the procedure of BOLMIN figure who selects his turn to the data in the tables of the VALMIN diagram below. and I get ORA-01031: insufficient privileges error.

    CREATE OR REPLACE PROCEDURE BOLMIN.prcs_load_data
    IS
    BEGIN
    FOR c
    IN (SELECT DISTINCT AL4. GOAL_TEXT,
    AL5. RESPONSE_TEXT,
    AL7. SAMPLE_ID,
    AL7. ACADEMY_NAME,
    AL8.NAME
    OF VALMIN. PROFIL_UTILISATEUR AL3,
    VALMIN. STUDENT_GOALS AL4,
    VALMIN. STUDENT_QUESTION_DETAILS AL5,
    VALMIN. STUDENT_QUESTION_RESPONSE AL6,
    VALMIN. SAMPLE AL7,
    VALMIN.NAME AL8
    WHERE (AL3. GOAL_ID = AL4. GOAL_ID (+)
    AND AL3. USER_ID = AL6. USER_ID (+)
    AND AL6. QUESTION_TYPE_SUB_ID = AL5. QUESTION_TYPE_SUB_ID (+)
    AND AL7.NAME_ID = AL8.NAME_ID (+)))
    LOOP
    NULL;
    END LOOP;
    END;
    /

    I checked grants each table involved in the associated SQL schema VALMIN & have all grant SELECT (to the BOLMIN schema). In addition, the query SQL itself, when it is run in the schema BOLMIN works perfectly well. The problem only occurs when I enclose the query in a procedure. Isn't it weird? or am I missing something here? Any help on this is appreciated. Thank you.

    BOLMIN schema as CREATE the privilege of the PROCEDURE I've already created other procedures for other purposes.

    Thank you
    Aristides

    Published by: siri_me on October 2, 2010 09:23

    http://asktom.Oracle.com/pls/asktom/asktom.download_file?p_file=6551289900368934430

Maybe you are looking for

  • can not change country

    I've seen other messages that say you need apple support ring to change your country in the middle of a cycle of apple music subscription. It's crazy that you can't cancel your mid-cycle subscription. Surely a refund is possible? Or simply cancel? An

  • iMac G3 stuck power button / stop

    So, I bought a G3 iMac on eBay. It's a PowerMac 2.2 If you need this information.  A few months later, the power button is stuck in. So I have to keep hitting the power button to get it to turn on. And if I shake the computer, you can turn off. All s

  • HP 15-f010dx: need help to find the drivers for Windows 7

    Had to load Windows 7 on my laptop for work. Could not find the drivers for the following items: PCI device SM Bus controllers Ethernet controller USB controller Any help would be greatly appreciated.

  • SanDisk e250 I got a mirco SD card

    I had need of more memory so I got a 4 GB Micro SD card, it is part of the fine, but the memory of the reader does not change. I even tried to charge the card on my computer. It loads fine, but when I put it in my player it is not there to do I need

  • Im just not getting the dual boot I want

    I have a dell that I installed a 2nd HD in 1720. I need to be able to boot either Vista or XP without that dreaded OS drive letter change. When I boot from vista... I get C: OS but when I boot XP I E: XP. A few applications that I have are not well w