Skip to Main Content

Data Science & Machine Learning

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insufficient privileges error on running Create Model in a stored procedure

SrikanthGHSep 17 2013 — edited Sep 18 2013

Hi,

I am getting the Insufficient privileges error on running the DBMS_DATA_MINING.CREATE_MODEL script in a stored procedure.

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

I am able to create a model successfully, but if I do the same after storing the script in stored procedure, it is throwing out Insufficient Privileges error.

Scripts:

  BEGIN

          DBMS_DATA_MINING.CREATE_MODEL(

        model_name          => <model name>

        mining_function     => dbms_data_mining.CLASSIFICATION,

        DATA_TABLE_NAME     => <Train 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 above works fine, and creates a Model with the given model successfully.

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

create or replace procedure MINING_TESTING as

  BEGIN

          DBMS_DATA_MINING.CREATE_MODEL(

        model_name          => <model name>

        mining_function     => dbms_data_mining.CLASSIFICATION,

        DATA_TABLE_NAME     => <Train 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 fine.

On executing - EXEC MINING_TESTING;

Throws error message on Insufficient privileges.

The full error message 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 current username or password

           without the appropriate privilege. This error also occurs if

           attempting to install a database without the necessary operating

           system privileges.

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

           if the user was granted the necessary privilege at a higher label

           than the current login.

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

           the required privileges.

           For Trusted Oracle users getting this error although granted the

           the appropriate privilege at a higher label, ask the database

           administrator to regrant the privilege at the appropriate label.

This post has been answered by Mark Kelly-Oracle on Sep 17 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2013
Added on Sep 17 2013
2 comments
4,236 views