ALTER drop partition table for ORA-01031: insufficient privileges
HelloSelect * from version of v$.
BANNER
--------------------------------------------------------------------------------
Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE Production 11.2.0.2.0
AMT for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
I have a table in the schema Y whose partition based on the value should be removed from schema X.
For example, ALTER TABLE DROP PARTITION Y.TAB_NAME FOR (4853);
I guess I gave almost all the privileges. Any thoughts?
Select * from DBA_TAB_PRIVS where table_name = 'Table_name' and recipient = 'X '.
DEALERSHIP OWNER TABLE_NAME GRANTOR PRIVILEGE HIERARCHY
------------------------------ ------------------------------ ------------------------------ ------------------------------ ---------------------------------------- --------- --------------------- --------- ---------------------
X Y TABLE_NAME Y ALTER YES NO
X Y TABLE_NAME DELETE YES NO
X Y TABLE_NAME Y INSERT YES NO
X Y TABLE_NAME SELECT YES NO
UPDATE TABLE_NAME Y Y X YES NO
INDEX OF TABLE_NAME Y Y X YES NO
6 selected lines
Additional Prerequisites for Partitioning Operations
If you are not the owner of the table, then you need the DROP ANY TABLE privilege in order to use the drop_table_partition or truncate_table_partition clause.
reference - http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_3001.htm
* That said I think seriously to give such a privilege [DROP ANY TABLE] to another schema.*
I hope this helps!
Published by: Sri on April 6, 2011 14:12
Tags: Database
Similar Questions
-
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;
-
Hello. I created a stored procedure that starts an immediate execution "create table..." Responses to Oracle with the message ' ORA-01031: insufficient privileges.
I solved the problem adding 'authid current_user is' in the procedure declaration.
Unfortunately, if I try to plan his by DBMS_JOB, responses to oracle with the same error again.
Why? And how can I avoid it?
Thank you very much in advance
Published by: user4501018 on 6-mag-2010 4.00user4501018 wrote:
Unfortunately, if I try to plan his by DBMS_JOB, responses to oracle with the same error again.
Add:
run immediately "role play all THE ';"
before immediate 'create table..."
SY.
-
ORA-01031: insufficient privileges
Hi all;
U1 > grant u1.emp to scott references;
Grant succeeded.
SCOTT > alter table u1.emp change (emp_id number constraint emp_c1_pk_eid primary key);
ALTER table u1.emp change (emp_id number constraint emp_c1_pk_eid primary key)
*
ERROR on line 1:
ORA-01031: insufficient privileges
To create a primary key or foreign in the object on the other, what a privilege devrais I need?
Thank you
To create a primary key or foreign in the object on the other, what a privilege devrais I need?
This is generally NOT a good idea.
Why do you need a primary key in a different schema from the owner of the table. If you do this, you will ALWAYS have a dependency between these two patterns.
You must be able to alter the table and create indexes of the other schema...
For the ALTER statement:
http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_3001.htm
Prerequisites
The table must be in your own schema or you must have
ALTER
privileges of objects on the table, or you must haveALTER
ANY
TABLE
system privilege.For indexes
http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_5011.htm#i2062403
Prerequisites
To create an index in your own schema, one of the following conditions must be true:
- The table or cluster be indexed must be in your own schema.
- You must have the
INDEX
object privilege on the table to be indexed. - You must have the
CREATE
ANY
INDEX
system privilege.
To create an index in another schema, you must have the
CREATE
ANY
INDEX
system privilege. In addition, the owner of the schema to contain the index must have either theUNLIMITED
TABLESPACE
quota privilege or space of the system on the storage space to store the index or index partitions. -
ORA-01031: insufficient privileges on the addition of constraints
Hello
I'm working on Oracle 11.2.0.2.0 and AIX.
I'm just trying to alter a table to add the foreign key constraint by using...
ALTER TABLE USER1. TAB1 ADD CONSTRAINT TAB1_TAB2_FK FOREIGN KEY (CUST_ID) REFERENCES USER2. TAB2 (TAB1_ID) ACTIVE;
TAB1
Cust_id (child table FK)
TAB2
TAB1_ID (PK)
but I'm getting
ORA-01031: insufficient privileges
I gave all select, insert, update for the USER1 user on all the tables of the verse even vise user2...
even, I gave grant dba to user1 and user2... as well...
I tried to run sql even as sysdba but getting same message...
Any idea what I can do... where I need to make changes...?Try
grant references on user2.tab2 to user1;
-
Error ORA-01031 insufficient privilege when selecting a view
OK, I think it's maybe a stupid question, but I can't understand it:
The user John won the right to SELECT (directly, not by a database role) to the FRED.table1 schema.
John user can issue select * from FRED.table1; and it works very well.
User John then got the right to SELECT (directly, without going through a database role) to the schema
MARK.view1;
MARK.view1 selects only FRED.table1. No other table is in the View1.
Schema MARK questionable views successfully. SELECT * FROM View1 returns results.
I also checked the MARK scheme to ensure that she got the select on FRED.table1 directly that he has.
Now, when you're logged in schema John, I try SELECT * to SCORE. VIEW1; and I get error ORA-01031 insufficient privileges.
I don't know how to solve this. If John is granted SELECT a TABLE, it works of course but I don't want John to have this powerful private.
As a reminder, SELECT these two brands a John. View1 and the table View1 selects from (FRED. (TABLE 1).
John can select FRED. Table1: no problem but does not receive a privilege error even if John has SELECT on the BRAND. VIEW1.
Any thoughts?
Oh, Oracle 10.2.0.4 EAJSebastian wrote:
OK, I think it's maybe a stupid question, but I can't understand it:The user John won the right to SELECT (directly, not by a database role) to the FRED.table1 schema.
John user can issue select * from FRED.table1; and it works very well.User John then got the right to SELECT (directly, without going through a database role) to the schema
MARK.view1;MARK.view1 selects only FRED.table1. No other table is in the View1.
Schema MARK questionable views successfully. SELECT * FROM View1 returns results.
I also checked the MARK scheme to ensure that she got the select on FRED.table1 directly that he has.Now, when you're logged in schema John, I try SELECT * to SCORE. VIEW1; and I get error ORA-01031 insufficient privileges.
I don't know how to solve this. If John is granted SELECT a TABLE, it works of course but I don't want John to have this powerful private.
As a reminder, SELECT these two brands a John. View1 and the table View1 selects from (FRED. (TABLE 1).
John can select FRED. Table1: no problem but does not receive a privilege error even if John has SELECT on the BRAND. VIEW1.Any thoughts?
Oh, Oracle 10.2.0.4 EA
Are you sure that John was granted select on Mark.view1? In order for that to work, Mark would have had to select on the WITH GRANT OPTION Fred.table1... otherwise the grant to fail and then John would not be able to select the view because the grant was never issued successfully.
Here is a basic test case (which I think is consistent with what you said) to make it work.
drop user u1 cascade; drop user u2 cascade; drop user u3 cascade; create user u1 identified by u1; grant connect, resource to u1; create user u2 identified by u2; grant connect, resource, create view to u2; create user u3 identified by u3; grant connect, resource to u3; connect u1/u1@orcl create table test1 (col1 number); grant select on test1 to u2 with grant option; --> this is the important part grant select on test1 to u3; connect u2/u2@orcl create view test2 as select * from u1.test1; grant select on test2 to u3; connect u3/u3@orcl select * from u2.test2;
-
ORA-01031: insufficient privileges in a LOGIN TRIGGER
Connected to db as SYS (SYSDBA) and created:
CREATE OR REPLACE TRIGGER SYSTEM.trace_login
AFTER LOGON
WE DATABASE
BEGIN
IF SYS_CONTEXT ('USERENV', "SESSION_USER") LIKE '% TS_PROD_OGE_70803A % '.
THEN
-EXECUTE IMMEDIATE ' alter session set sql_trace = TRUE ";
DBMS_SESSION.session_trace_enable (expected = > TRUE, lie = > FALSE);
EXECUTE IMMEDIATE 'alter session set tracefile_identifier = LOCTRACE';
END IF;
END;
When the TS_PROD_OGE_70803A user (logon)
Trace file C:\oracle\app\tsadmin\diag\rdbms\wptsora11g\wptsora1\trace\wptsora1_ora_2444.TRC
Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
Windows NT Version 6.0 Service Pack 2
CPU: type 4-8664, 4 physical cores
Process affinity: 0 x 0000000000000000
Memory (success/Total): Ph: 793 M / 4094 M, Ph + FCP: 4981 M / 8437 M
Instance name: wptsora1
Redo thread mounted by this instance: 1
Oracle process number: 21
Windows thread ID: 2444, image: ORACLE. EXE (SHAD)
2010-12-29 16:50:52.723
SESSION ID: (54.2012) 2010-12-29 16:50:52.723
CUSTOMER ID :() 16:50:52.723 2010-12-29
SERVICE NAME: (WPTSORA11G) 2010-12-29 16:50:52.723
MODULE NAME:(SQL Developer) 2010-12-29 16:50:52.723
ACTION NAME :() 16:50:52.723 2010-12-29
Ignored the error 604 while SYSTEM is running. TRACE_LOGIN
2010-12-29 16:50:52.723
-Error stack dump-
ORA-00604: an error has occurred at the SQL level 1 recursive
ORA-01031: insufficient privileges
ORA-06512: at "SYS." DBMS_SESSION", line 269
ORA-06512: at line 5
I tried a number of grants to the user, but I always get the same answer
(Oracle 10.2.x and also on Oracle 11)
Thanks for the tipsOK, if people helped you that you can still give their answers as correct or useful.
Nice day
-
Service_name problem->; ORA-01031: insufficient privileges error!
I installed the database Oracle 11.2.0.1 on Oracle Linux 6.6, Virtualbox to test replication of the database.
I have oracle11g and grid of two users. User network is set to infrastructure grid on ASM.
When I prepare the database for duplication, I created a service_name as neworcl. When I connect to new oracle_sid with service name neworcl the following error has occurred!
[oracle11g@orcl11g dbs] $ sqlplus sys/222333@neworcl as sysdba
SQL * more: Production release 11.2.0.1.0 on Sun Oct 13 15:00:35 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
BUT WHEN I want TO CONNECT locally without service_name then it is OK as follows
Enter the user name: sys as sysdba
Enter the password:
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL > select instance_name, status from v$ instance;
STATUS INSTANCE_NAME
---------------- ------------
neworcl START
My tnsnames.ora file located in oracle11g user home as below
tnsnames.ora # Network Configuration file: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
= ORA11G
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl11g) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora11g)
)
)
NEWORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl11g) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = neworcl)
)
)
Listener.ora file located user to network as below
listener.ora # Network Configuration file: /u01/app/grid/product/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ora11g)
(ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = ora11g)
)
(SID_DESC =
(GLOBAL_DBNAME = neworcl)
(ORACLE_HOME = u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = neworcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl11g) (PORT = 1521))
)
)
ADR_BASE_LISTENER = / u01/app/grid
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = WE
QUESTION: Why I can't connect to the new database with service_name = neworcl?
Net Oracle connections as sysdba usually require a password file. Have you created a password file for your database?
You can check the content of $ORACLE_HOME/dbs and see if you have a file named "orapwneworcl". If you do not, you can create it using the orapwd utility. Change your password for SYS in sqlplus must automatically synchronize the password in the password file. The password file is necessary for remote connections, since you cannot authenticate using the OSDBA group and the database may in fact not even begin to verify your password.
For more details, see https://docs.oracle.com/cd/B28359_01/server.111/b28310/dba007.htm
BTW, when you connect AS SYSDBA using Protocol inheritance, you can use any user name and password and will always connect to the SYS schema, which case authentication is made by the OSDBA group identifier. For example, you can use any user name and password, such as "humptydumpy/blablaba sqlplus as sysdba".
-
create returns user ORA-01031: insufficient privileges
Hi all
I am trying to create user on Oracle 11.2.0.4 windows db.
I get the following error
create the user one identified by a
Error in the command line column: 6:28
Error report:
SQL error: ORA-01031: insufficient privileges
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.
Please may I know how to solve.
I disabled Database Vault Account Management.
This allowed me to grant privileges as user sys.
C:\Users\rbastawa>sqlplus / as sysdba
SQL * more: Production release 11.2.0.4.0 on sea 12 Nov 09:56:40 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
With partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL > grant connect to one.
grant connect to a
*
ERROR on line 1:
ORA-47410: Violation of Kingdom for GRANT on CONNECT
SQL > grant connect to one.
Grant succeeded.
SQL >
Thanks for the help.
-
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
If I run the script directly in TOAD sqleditor, it works great!
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...
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.
-
EXPDP: ORA-01031: insufficient privileges
Hello
When I add the QUERY clause in the settings file, get the following errors.
ERROR:
ORA-31693: Data Table object 'TESTDB '. "' ACCOUNT ' could not load/unload and being ignored because of the error:
ORA-01031: insufficient privileges
Version: Export: Release 10.2.0.4.0 - Production 64-bit
Parameter:
DIRECTORY = USER_DATA_PUMP_DIR
CONTENT = ALL
PARALLEL = 4
ESTIMATE = STATISTICS
INCLUDE = TABLE: 'IN (SELECT EXP_TABLE_NAME FROM EXPDP. '. EXP_TABLES).
QUERY = TESTDB. ACCOUNT: ' IF ADDED_OPRID NOT IN (SELECT OPRID FROM EXCLUDE_OPRID).
FLASHBACK_TIME = "to_timestamp (to_char (sysdate, 'YYYY-MM-DD HH24:MI:SS'),"YYYY-MM-DD HH24:MI:SS").
The following grants have been created on the user of datapump EXPDP export.
GRANT PERMISSION TO EXPDP
GRANT 'CONNECT' TO THE EXPDP
GRANT CREATE SESSION EXPDP
GRANT CREATE TABLE TO EXPDP
GRANT SELECT ANY TABLE TO EXPDP
Can you help me solve this problem?
Thank youHello
you do an export with the return of flame parameter.
Try to give your user FLASHBACK ANY TABLE export.I have several problems in the past, the permission is not enough for the return of flame.
concerning
Peter -
ORA-01031: insufficient privileges error?
Hello
I changed the password for user SYS and SYSTEM. I can connect before changing
sqlplus "/ as sysdba" automatically.
but now I can not connect and it gives me ORA-01031: insufficient privileges error.
But if I type SYS user name and his password I can connect.
for example:
-------------------
oradw@trdw1test:/ORCL/bin > sqlplus "/ as sysdba".
SQL * more: version 9.2.0.8.0 - Production Thursday, May 26, 16:21:17 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter the user name: sys as sysdba
Enter the password:
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production
With partitioning, OLAP and Oracle Data Mining options
Release 9.2.0.8.0 - Production jserver
SQL >
-------------------------------
I created the new password file, but still I can not connect. I checked the user of the OS, but we never touch any configuration.
Could you please help me how can I solve this problem?
DB version: 9.2.0.8
greetings and thanksCheck your sqlnet.ora file in ...db_1\NETWORK\ADMIN (default)
If in file
# This file is actually generated by netca. But if customers choose to # install "Software Only", this file wont exist and without the native # _authentication, they will not be able to connect to the database on NT._ SQLNET.AUTHENTICATION_SERVICES = (NT)
to take
SQLNET.AUTHENTICATION_SERVICES = (NTS)
-
ORA-01031: insufficient privileges from a function
Deploy_ctl.fun_stg_raw (NO_DAYS in NUMBER, of the FUNCTION to CREATE or REPLACE
col_date DATE)
RETURN NUMBER
AS
RTN_SUCCESS CONSTANT NUMBER (1): = 0;
RTN_FAILURE CONSTANT NUMBER (1): = 1;
RTN_NON_FATAL NUMBER (1) CONSTANT: = 2;
CURSOR stg_raw_cur IS
SELECT RAW_STG_ID,
DEVICE_CD,
MODEL_VERSION,
PLATFORM_CD,
PROFILE_COOKIE,
LOCATION_CD,
SAMPLE_RATE,
EVENT_TYPE_CD,
EVENT_DATE_TIME,
EVENT_SPECIFIC,
BATCH_ID,
DWH_ARVL_DT,
DWH_ARVL_DT_ID,
Dwh_stg.stg_raw DWH_CREATE_DT
When trunc (to_date (EVENT_DATE_TIME, "YYYYMMDD"T"hh24:mi:ss"Z"')) = to_date (' 04/28/2014 ',' mm/dd/yyyy')
order of batch_id CSA;
TYPE stgrawarr IS TABLE OF stg_raw_cur % ROWTYPE;
stg_raw_rec stgrawarr;
l_batch_id NUMBER: = 0;
v_ctr NUMBER: = 1;
l_temp_batch_id number: = 0;
l_date VARCHAR2 (2000);
BEGIN
run immediately 'truncate table t_stg_raw;
OPEN stg_raw_cur.
LOOP
Get the stg_raw_cur COLLECT LOOSE stg_raw_rec LIMIT 100;
OUTPUT
WHEN stg_raw_cur % NOTFOUND;
END LOOP;
CLOSE Stg_raw_cur;
I'm in stg_raw_rec.first... stg_raw_rec. Last
loop
-dbms_output.put_line (' batch code is ' | .batch_id stg_raw_rec (i));
IF l_temp_batch_id! = stg_raw_rec (i) .batch_id
then
l_batch_id: = stg_raw_rec (i) .batch_id - v_ctr;
l_temp_batch_id: = stg_raw_rec (i) .batch_id;
* dbms_output.put_line ('Différent' |) "v_ctr" |
v_ctr | ' ' || l_batch_id |
' ' || stg_raw_rec (i) .batch_id | ' ' ||
stg_raw_rec (i). EVENT_DATE_TIME) ;*/
v_ctr: = v_ctr + 2;
end if;
1.no_days j
loop
l_date: = to_char (to_date (to_date (substr (stg_raw_rec (i). (EVENT_DATE_TIME, 1, 8), 'YYYYMMDD')-j |
'T' ||
substr (stg_raw_rec (i). EVENT_DATE_TIME, 10, 8).
('Z', "DD-MON-RR"T"HH24:MI:SS 'Z'"), "YYYYMMDDYY"T"HH24:MI:SS 'Z'");
dbms_output.put_line (' l_batch_id ' | l_batch_id |)
"stg_raw_rec (i) .batch_id | stg_raw_rec (i) .batch_id |
"l_date" | l_date);
end loop;
l_temp_batch_id: = stg_raw_rec (i) .batch_id;
commit;
end loop;
RETURN RTN_SUCCESS;
EXCEPTION
WHILE OTHERS THEN
-Insert in the (current) error log table
DBMS_OUTPUT. PUT_LINE ('SQLCODE' |) SQLCODE. ' '|| SQLERRM);
RETURN RTN_FAILURE;
END fun_stg_raw;
/
DISPLAY ERRORS;
/
I can execute SQL statements on its own as a user DEPLOY_CTL but when compiling the function, he throws ORA-01031: insufficient privileges error.
Thank youThis may be infamous granting by the issue of the role. You need the explicit subsidies. For more information see Re: compile errors
You can use the VALUE NO ROLE and then try to run the SQL to check. -
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:23http://asktom.Oracle.com/pls/asktom/asktom.download_file?p_file=6551289900368934430
-
Nice day
I am trying to execute an interface in which data from a csv file must be loaded into a target table. I managed to debone the flat file and map all fields. But come running, I get this error message:
1031: 42000: java.sql.SQLException: ORA-01031: insufficient privileges
java.sql.SQLException: ORA-01031: insufficient privileges
I have already given modify and insert the user access.
Thanks in advanceLooks like your problem is solved. Why don't you close the message and give different points as useful for each answer and replied to the right answer to other users that have helped you.
Maybe you are looking for
-
Disable the animation full screen by scanning
On my MacBook, I love using the function "drag between apps full screen (with four fingers). Unfortunately the animation slide slows down the whole process. Previously, I used the soft areas that has a parameter to disable this animation. On El Capit
-
How to take and save a screenshot or capture
How to take and save a screenshot or capture a video that plays?
-
Re: Windows 7 will work on a Satellite L30-134?
I'll be upgrading the ram to 2 GB and install a new hard drive in my old satellite phone soon. I would like to upgrade to windows 7 32 bit if possible. Can someone tell me if it will run this OS? Thank you.
-
Volume control icon on the toolbar disappeard
I am connected to the computer and the volume control icon had disappeared. I googled and they said got check the setting of the volume-pane and there is an option "add to the toolbar. The option was not there... Thanks for your help!
-
Dear all, Hello, hope you are doing well. My thinkpad t42 machine with xp sp3 OEM has a problem, unfortunately. Task Manager is not running. A small timer appears when ctrl + alt + delete is pressed. nothing happens. Taskmgr.exe fact exists in the