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.