ORA-01031: insufficient privileges while selectin view belongs to another schema in oracle database 11g
Hello
DB version 11.2.0.3.0
We have a few views resides in the application schema, we cerated user and granted select on the view through the roles.
but the user becomes ORA-01031: insufficient privileges when accessing the content view
appreciated inputs
BR
Praaksh GR
> I issued a grant select on Z.table - X with the option grant.
This isn't what you need - you should
Grant select on Z.table y with the option grant.
Grant select on Y.view to X;
Tags: Database
Similar Questions
-
RMAN-04006: auxiliary database error: ORA-01031: insufficient privilege
To clone physical db Eve, during the implementation of custody of data I am getting following error. How can I solve this problem.
Recovery Manager: Release 11.2.0.1.0 - Production on Mon May 2 15:01:50 2011 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. RMAN> connect target sys target database Password: connected to target database: TMDB (DBID=1592716922) RMAN> connect auxiliary sys@tbdb auxiliary database Password: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-04006: error from auxiliary database: ORA-01031: insufficient privileges
Small link will help
http://forums.Oracle.com/forums/thread.jspa?threadID=920605
-
ORA-01031: insufficient privileges, what is the solution?
[oracle@ora-lab2 ~] $ sqlplus/nolog
SQL * more: version 11.1.0.6.0 - Production on Fri Sep 18 14:01:43 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL > connect virtue sysdba;
ERROR:
ORA-01031: insufficient privileges
SQL > connect sys/test as sysdba;
Connected.
SQL > show the distance parameter
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
remote_dependencies_mode string TIMESTAMP
remote_listener chain
Remote_login_passwordfile string EXCLUSIVE
REMOTE_OS_AUTHENT Boolean TRUE
remote_os_roles boolean FALSE
result_cache_remote_expiration integer 0
[oracle@ora-lab2 ~] $ rman
Recovery Manager: release 11.1.0.6.0 - Production on Fri Sep 18 14:02:24 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN > Connect target;
RMAN-00571: ===========================================================
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
RMAN-00571: ===========================================================
ORA-01031: insufficient privileges
RMAN > Connect target sys/test@prim01;
connected to target database: PRIM01 (DBID = 2934738896)
RMAN > exit
Complete recovery manager.
[oracle@ora-lab2 admin] $ cat sqlnet.ora
NAMES. DIRECTORY_PATH = (TNSNAMES)
SQLNET. AUTHENTICATION_SERVICE = (NONE)
#NAMES. DOMAINE_PAR_DEFAUT = EVERYONE
TRACE_LEVEL_CLIENT = OFF
SQLNET. EXPIRE_TIME = 30Pavan Kumar says:
Refer to http://www.psoug.org/reference/net_services.htmlPavan - Please note this is a library of Dan Morgan's more hosted psoug. Your reference is a copy of archive that is still available but is no longer maintained.
Please change your links to replace www.psoug.org by www.morganslibrary.com to get the latest wonderful resource of Dan thye. The correct link would be http://www.morganslibrary.com/reference/net_services.html
-
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 despite belonging to group DBA oracle
DB version: 10.2.0.4.0
Version of the operating system: Solaris 5.10
OS user Oracle already belongs to the DBA group.
But, I get the following error$ id -a uid=1001(oracle) gid=1100(oinstall) groups=1100(oinstall),1800(dba)
Value of the parameter remote_login_passwordfile$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.4.0 - Production on Mon Nov 29 14:33:59 2010 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. ERROR: ORA-01031: insufficient privileges Enter user-name: ^C $ $ $ sqlplus sys/password as sysdba SQL*Plus: Release 10.2.0.4.0 - Production on Mon Nov 29 09:34:13 2010 Copyright (c) 1982, 2007, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, Data Mining and Real Application Testing options SQL>
What could be the reason?SQL> show parameter password NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ remote_login_passwordfile string EXCLUSIVE
Make sure that /network/admin/sqlnet.ora
does not: SQLNET.AUTHENTICATION_SERVICES=NONE
-
ORA-01031: insufficient privileges when you try to run a proc
I have a procedure called KILL_MY_SESSION that is defined with a value of DEFINE AUTHID
The schema JOHN belonged procedure. The procedure makes several calls to PL/SQL DBMS_SQL package.
The last thing that not with DBMS_SQL proceedings concern an ALTER SYSTEM KILL SESSION statement.
Schema JOHN has privileges to kill a session in the database.
If I log in the scheme of JOHN, I can issue the statement ALTER SYSTEM KILL SESSION successfully.
Also, when you are logged in the scheme of JOHN, I can run the KILL_MY_SESSION procedure.
Now I have the ISTO schema. I got ISTO privileged EXECUTE on the JOHN. Procedure KILL_MY_SESSION.
Since JOHN. KILL_MY_SESSION is a privilege of rights DEFINERs, if RIGHTS shouldn't be able to execute the procedure correctly and kill a session?
This is an output of the session of the ISTO when you try to run JOHN. KILL_MY_SESSION:
SQL > conn oifs@dbname
Enter password: *.
Connected.
SQL > 500 fixed lines
SQL > select username, osuser, sid, serial #.
2 session $ v
3 where username = "OIFS."
USERNAME OSUSER SID SERIAL #.
------------------------------ ------------------------------ ---------- ----------
OIFS administrator 142 325
OIFS administrator 139 613
SQL > exec ('142 ', 325') john.kill_my_session
BEGIN john.kill_my_session ('142 ', 325'); END;
*
ERROR on line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS." DBMS_SYS_SQL", line 1204
ORA-06512: at "SYS." DBMS_SQL", line 323
ORA-06512: at "EIADBA. KILL_MY_SESSION', line 20
ORA-06512: at line 1
Someone at - he a clue as to what I'm doing wrong?
View DBA_PROCEDURES, here's the record for KILL_MY_SESSION
OWNER
------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE AUTHID
------------------- ------------
JOHN
KILL_MY_SESSION
DEFINE PROCEDUREI mean the privilege of system alter directly, not through roles.
GRANT ALTER SYSTEM TO JOHN;
Please read the articles below, you should restrict the sessions that can be killed, according to what will be your implementation.
It could be useful.
http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:226613885088
http://DBA-Oracle.com/t_granting_alter_system_kill_session.htm -
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;
-
Hi all
I created mail.jar is correctly loaded in the database, but while loading activation.jar I get the following error.
Version of Oracle 11.2.0.4.0 database.
loadjava.bat u sys / * o - r - v f - noverify-synonym g public D:\EXCEL_ORACLE_DIR\activation.jar
arguments: '-u' ' sys / *' 'o' '-r' '-v' '-f' '-noverify' '-synonym ' "-g' 'Public' 'D:\EXCEL_ORACLE_DIR\activation.jar'"
creation: resource META-INF/MANIFEST. MF
loading: resource META-INF/MANIFEST. MF
creation: resource META-INF/mailcap.default
loading: resource META-INF/mailcap.default
creation: resource META-INF/mimetypes.default
loading: resource META-INF/mimetypes.default
creation: javax/activation/ActivationDataFlavor class
loading: javax/activation/ActivationDataFlavor class
Error when creating class javax/activation/ActivationDataFlavor
ORA-01031: insufficient privileges
ORA-06512: at line 1
creation: class javax/activation/CommandInfo
load: class javax/activation/CommandInfo
Error when creating class javax/activation/CommandInfo
ORA-01031: insufficient privileges
ORA-06512: at line 1
Something that I missed.
Thank you all for your response.
I connect sys as sysdba.
I checked the sys schema which classes activation.jar is already there that is why it is showing error.
-
Hello
Everything was running as a result with the exception of a question with ENTERPRISE MANAGER I posted on the discussion. So following the favorable response of the discussion, what I did is I tried to change the listening port, and then I got this error message ORA-01031: insufficient privileges . Then after I uninstalled the database again and tried to remove all the listener again and tried to add the listener again, but has no wok. I have the grid installed in my pc. I already uninstalled dbca database so I wonder how I could resolve the question above? I have oracle grid in my pc and here is some information that you might need.
[grid@example admin] $ echo $ORACLE_SID
+ ASM
[grid@example admin] $ echo $ORACLE_HOME
/U01/app/11.2.0/grid
[grid@example admin] $ su - oracle
Password:
[oracle@example ~] $ echo $ORACLE_SID
ORCL
[oracle@example ~] $ echo $ORACLE_HOME
/U01/app/Oracle/product/11.2.0/Db_1
[oracle@example ~] $ echo $ORACLE_UNQNAME
ORCL
[oracle@example ~] $
[grid@example admin] $ vi sqlnet.ora
#NAMES. DIRECTORY_PATH = (TNSNAMES, HOSTNAME, EZCONNECT)
SQLNET. AUTHENTICATION_SERVICES = (ALL)
NAMES. DIRECTORY_PATH = (TNSNAMES, HOSTNAME, EZCONNECT)
ADR_BASE = / u01/app/grid
Thanks Hemant K Chitale. According to your suggestion, I went through CRSCTL view of ALL... http://docs.oracle.com/cd/E11882_01/rac.112/e16794/crsref.htm#CWADD92153 ... AND it solved my problem thank you very much
CRSCTL overview
CRSCTL is an interface between you and Oracle Clusterware, analysis and requesting objects Oracle Clusterware Oracle Clusterware APIs.
Oracle Clusterware 11 g release 2 (11.2) introduced controls compatible with the cluster with which you can perform the check, start and stop operations on the cluster. You can run these commands from any node in the cluster to another node in the cluster, or on all nodes of the cluster, depending on the operation.
You can use the CRSCTL commands to perform several operations on Oracle Clusterware, such as:
- Start and stop Oracle Clusterware resources
- Activation and deactivation of the Oracle Clusterware demons
- Check the status of the cluster
- Management of the resources that are third-party applications
- Integration of Intelligent Platform Management Interface (IPMI) with Oracle Clusterware of failure isolation support and ensure the integrity of clusters
- Debug Oracle Clusterware components
[grid@example bin] $ crsctl start resources-all
CRS-2501: resource "ora.ons" is disabled
CRS-2672: attempt to start 'ora.evmd' on 'example '.
CRS-2672: attempt to start 'ora.cssd' on 'example '.
CRS-2672: attempt to start 'ora.diskmon' on 'example '.
CRS-2676: beginning of "ora.diskmon", the successful "example"
CRS-2676: beginning of "ora.evmd", the successful "example"
CRS-2676: beginning of "ora.cssd", the successful "example"
CRS-2672: attempt to start 'ora.asm' on 'example '.
CRS-2676: beginning of "ora.asm", the successful "example"
CRS-2672: attempt to start ' ora. DATA.dg' on 'example '.
CRS-2672: attempt to start ' ora. FRA.dg' on 'example '.
CRS-2676: beginning with ' ora. DATA.dg' on successful "example"
CRS-2676: beginning with ' ora. FRA.dg' on successful "example"
CRS-2672: attempt to start 'ora.orcl.db' on 'example '.
CRS-5017: the action "ora.orcl.db start" resource has met the following error:
ORA-01078: failure in the treatment of system settings
ORA-01565: error in the identification of file "+ DATA/orcl/spfileorcl.ora".
ORA-17503: ksfdopn:2 could not open the file +DATA/orcl/spfileorcl.ora
ORA-27140: attach to post/wait installation failed
ORA-27300: OS dependent operating system: invalid_egid failed with status: 1
ORA-27301: OS Error Message: operation not permitted
ORA-27302: an error occurred at: skgpwinit6
ORA-27303: additional information: current startup egid = 504 (oinstall), egid = 501 (asmadmin)
. For details, refer to "(:CLSN00107:))" "in ' / u01/app/11.2.0/grid/log/example/agent/ohasd/oraagent_grid/oraagent_grid.log '.
CRS-2674: beginning of 'ora.orcl.db', 'example' failed
CRS-2679: attempt to clean the 'ora.orcl.db' on 'example '.
CRS-2681: clean "ora.orcl.db" on successful "example"
CRS-4000: Start command has failed, or completed with errors.
[grid@example bin] $
ASM IS WATCH NOW TO THE LISTENING PORT
[grid@example bin] $ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on July 15, 2015 09:03:11
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=example.castrading.com) (PORT = 1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start date July 15, 2015 07:30:34
Uptime 0 days 1 h 32 min 36 sec
Draw level off
Security ON: OS Local Authentication
SNMP OFF
Parameter Listener of the /u01/app/11.2.0/grid/network/admin/listener.ora file
The listener log file /U01/app/grid/diag/tnslsnr/example/listener/alert/log.XML
Summary of endpoints listening...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=example.castrading.com) (PORT = 1521)))
Summary of services...
Service '+ ASM' a 1 instance (s).
Instance '+ ASM' READY State, has 1 operation for this service...
Service "orcl" has 1 instance (s).
Instance "orcl", status UNKNOWN, has 1 operation for this service...
The command completed successfully
[grid@example bin] $
-
DGMGRL - ORA-01031 insufficient privileges
Hello
I created the DGMGRL configuration but unable to add standby database.
DGMGRL > create the DG AS PRIMARY DATABASE configuration IS "db1" CONNECT IDENTIFIER IS "db1".
"Dg" configuration created with the primary database 'db1 '.
I get the error while trying to add intelligence - db2 below
DGMGRL > see Configuring
Configuration - dg
Protection mode: MaxPerformance
Databases:
Db1 - primary
Fast-Start Failover: DISABLED
The configuration status:
PEOPLE WITH DISABILITIES
DGMGRL > add DATABASE 'db2' AS the CONNECT IDENTIFIER IS db2;
Error: ORA-01031: insufficient privileges
Failed.
can someone help me... where the problem is...
Can we copy the password manually from the primary to the standby and try again
-
SQL error: ORA-01031: insufficient privileges
I am trying to create a view. I logged as a DBA. Please suggest.
create or replace view tspace_vw as
SELECT tablespace_name,
Total_Size 'Total_Size (MB).
Free_space "Free_Space (MB).
(Total_size - free_space) "USED_SPACE (MB).
round (((Total_size-Free_Space)/Total_size) * 100, 2) | ' %' "% USED.
DE)
SELECT a.tablespace_name,
Round(sum(a.bytes)/1024/1024,2) Total_Size,.
Round(sum(b.free_bytes)/1024/1024,2) free_space
FROM dba_data_files a, (SELECT file_id, SUM (bytes) free_bytes
FROM dba_free_space
GROUP BY file_id
) b
WHERE a.file_id = b.file_id
and nom_tablespace not in ('SYSTEM', 'SYSAUX', 'UNDOTBS1', 'TEMP')
GROUP BY a.tablespace_name
)
ORDER BY nom_tablespace;
================================================
SQL error: ORA-01031: insufficient privileges
01031 00000 - "insufficient privileges".
978487 wrote:
I am trying to create a view. I logged as a DBA. Please suggest.
SQL error: ORA-01031: insufficient privileges
01031 00000 - "insufficient privileges".
You must grant the right to SELECT user views the two system.
>
Grant select on dba_data_files Scott;
Grant select on dba_free_space Scott;
>
I'm assuming that "connected is a DBA" means that you granted the DBA role to the user. But you need to grant privileges directly so that they are able to create a view.
See CREATE VIEW in the doc of the SQL language
http://docs.Oracle.com/CD/B28359_01/server.111/b28286/statements_8004.htm
>
The owner of the schema containing the view must have the necessary privileges to either select, insert, update, or delete rows from all tables or views on which the opinion is based. The owner must grant these privileges directly, rather than through a role.
>
-
ORA-01031: insufficient privileges in the work of snapshot
Hello
10 gr 2 on Win 2003, I have the following error in alertlog:
I'm looking for which snapshot or whose employment has been? We have so many shots. I have querried dba_jobs but:Wed Jan 25 21:00:01 2012 Errors in file t:\oradba\admin\pods\bdump\DB_j001_3836.trc: ora-12012 error on auto execute of job 4111 ORA-01031: insufficient privileges ORA-06512: à "SYS.DBMS_SNAPSHOT", ligne 2254 ORA-06512: à "SYS.DBMS_SNAPSHOT", ligne 2460 ORA-06512: à "SYS.DBMS_IREFRESH", ligne 683 ORA-06512: à "SYS.DBMS_REFRESH", ligne 195 ORA-06512: à ligne 1
Select * from all_jobs of employment where = 4111
no selected line.
Thank you.Wed Jan 25 21:00:01 2012
Errors in the t:\oradba\admin\pods\bdump\DB_j001_3836.trc file:
error ORA-12012 on auto work 4111
ORA-01031: insufficient privileges
ORA-06512: at "SYS. DBMS_SNAPSHOT", line 2254
ORA-06512: at "SYS. DBMS_SNAPSHOT", line 2460
ORA-06512: at "SYS. DBMS_IREFRESH', line 683
ORA-06512: at "SYS. DBMS_REFRESH", line 195
ORA-06512: at line 1Check also any planned Mview job or not
SQL > select master, mview_name, dba_mviews LAST_REFRESH_DATE;
If you find this job, check the query in the same point of view, if she has privileges to select/change according to the application.
Thank you.
-
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 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
-
ORA-01031: insufficient privileges during the activation of a unique constraint
Hello
DB is Oracle 10 g.
I have a problem, which allows a unique constraint on a table using a stored procedure.
The procedure travels a few queried from the view all_constraints primary key constraints allowing them without any problem.
Then, on the first unique constraints, it throws the exception
ORA-01031: insufficient privileges
The sql line built at the source of the problem is
run immediately ' alter table 'My_Schema_Name '. "' My_TableName ' enable the 'UNIQUE_Myconstraint_UQ' CONSTRAINT '.
What confuses me, is that the same line (without "immediate execution") run from the console window of the sql developers, which was used to make the appeal process that has failed, will succeed.
The user used to make the call is not owner of the scheme, but has Alter_Any_Table system permissions (and, as mentioned above, the call will succeed if entered directly in the sql developer worksheet).
Stored procedures running in a different (limited) security context (sorry if the setting isn't right) than that of the calling user?
Or what is the problem here?
Any help is appreciated.
Markus.
Note:
Before, I don't have the name of constraint in quotes and allowing the primary key failed with error ORA-02430: impossible to enable the constraint (PK_ConstraintName) - no such constraint 02430. 00000 - "could not activate constraint (%s): no such constraint ', which is an interesting problem in itself, but now fixed. In any case, thoughtI would mention itHello
This means that alter table system privilege is given to the user through certain roles. If it's true that the roles has no effect when executing stored procedures. You must give the direct privilege to this user and not by role.
With regard to your note:
This means that you created the constraint in lower case or mix of lower and upper case in quotes. Therefore you should now always return in the same case in quotes each time you reference any object. So it is always advisable to create objects on top of case (if the use of the quotes) or do not use quotation marks.Concerning
Anurag
Maybe you are looking for
-
How can I add a new desktop PC to my Apple iTunes account?
My old desktop PC crashed and had to be trashed. I bought a new desktop PC and can not find directions add to my Apple iTunes account so I can download music to my iTunes Store account. HELP Please!
-
LabWindows tcp client server generic
I did a program fom the customer sample in the example TCP file. Now, I want this program to communicate to a generic server that does not have labwindows running on it. Is this possible with only a few minor changes or do I need to start from scratc
-
AMD Catalyst Control Center not opening
My laptop model is HP Envy 6 1178 - hisI just updated my graphics (AMD 7670HD series driver 13.251.0.0) and now the Catalyst application control center does not open at all, not even a pop error registerWhat should I do?
-
I have somehow blocked a contact by mistake. How can I reverse that?
I have somehow blocked a contact by mistake. How can I reverse that? Make sure not to be too technical. I am in my seventies and not fully computer. Thank you
-
Civilization 3 Complete is not compatible with my PC
I installed civilization 3 full on my pc. I have windows vista. civilization 3 complete is not compatible with windows vista. I uninstalled it eventually. I have computer problems? is there anything else I should worry? is there anything else I shoul