ORA-01031 insufficient privilege when updating a table join

Update (select a.f1, b.f2 FROM tableA a join tableB b using (fk))
Set f1 = f2

the user connection enough readonly privilege for tableB, but sql never update the tableB, why Oracle triggers the error?

How can I implement the logic to update?

UPDATE tablea a
SET (f1, col) = (SELECT b.f2, b.col
FROM tableb b
WHERE = a.key b.key)

If one given by Danish works, then you can simplify this in writing as it... even that request that eliminating two claims her...

Ravi Kumar

Published by: user10164479 on July 24, 2009 11:16

Tags: Database

Similar Questions

  • 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 EA

    JSebastian 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 when granted access privileges to a new user

    Hello.

    When you are connected to a SYSTEM, I'm trying to create a new user and give him all the system privileges, but do so always the following error message appears:

    Cannot process the SQL command

    -

    Error at startup to the line: 123 to orders.

    SYSDBA GRANT TestUser

    Error report-

    SQL error: ORA-01031: insufficient privileges

    01031 00000 - "insufficient privileges".

    * Cause: An attempt was made to execute a database operation without

    the necessary privileges.

    * Action: Ask your database or the designated security administrator

    administrator to grant you the required privileges

    After clicking OK, the user is still being created, but it lacks many privileges to access.

    How can I solve this problem?

    I use Oracle SQL Developer version 4.1.2.20 and Oracle database 11g of the express edition.

    Connect as SYS, not SYSTEM to grant this priv

    Give him with extreme prejudice - it is powerful

    Note in the 12 c database we have stopped a lot of the administrative bits of the SYSDBA role in less powerful. This gives you more flexibility on who can do what in your database

    https://docs.Oracle.com/database/121/DBSEG/authorization.htm#DBSEG578

  • Download "error: ORA-01031: insufficient privileges" when try to add relief of database

    Hi all

    I get insufficient privileges error when I added a standby database to dg configuration. I read some blog and he said that dgmgrl does not support os authentication, which means that I need to connect with sys and password. But I found that if I keep standby and primary SIDs are the same, the error will not occur even if I don't provide a password. Anyone know the reason? And no workaround?

    The process as follows:

    main SID: orcl ensures sid: prxx

    connect to "dgmgrl / '.

    Run ' add the database ' prxx_stby "as an identifier of connection is"prxx_stby"

    Download:

    Error: ORA-01031: insufficient privileges

    Failed.

    But if sid main: orcl ensures sid: orcl

    connect to "dgmgrl / '.

    Run ' add the database ' orcl_stby "as an identifier of connection is"orcl_stby"

    Download:

    Database "orcl_stby" added

    Liz

    I think still you can connect as "dgmgrl /", but its recommended to use "dgmgrl sys / * '.

    As rchem has said, there can be question of password. It doesn't matter whether the SID is the same or not primary and standby so different locations. So the best practice is to connect to the database from the primary server before using Oracle net service and test whether you connect or not.

    Ex: Prim_host > sqlplus sys/***@stby as sysdba

    There are a lot of possible issues

    -Missing or invalid password file

    -Service name is not registered with earphone

    -service incorrect, mentioned in the tns names

    and so many things, overlaps with these things.

  • 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 PROCEDURE

    I 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

  • ORA-01031: insufficient privileges when connecting as SYSDBA

    I am trying to connect to the database and receiving "ORA-01031: insufficient privileges". Database version is 11.2.0.3 (standalone) on Linux.

    [oracle@dbserv admin] $ echo $ORACLE_HOME

    /U01/app/Oracle/product/11.2.0.3/db1

    [oracle@dbserv admin] $

    [oracle@dbserv admin] $ which sqlplus

    /U01/app/Oracle/product/11.2.0.3/db1/bin/sqlplus

    [oracle@dbserv dbs] $ sqlplus sys/oracle@newdb as sysdba

    SQL * more: Production release 11.2.0.3.0 Wed Aug 26 20:38:13 2015

    Copyright (c) 1982, 2011, Oracle.  All rights reserved.

    ERROR:

    ORA-01031: insufficient privileges

    Enter the user name:

    Password file has been created and is in $ORACLE_HOME/dbs location.

    [oracle@dbserv dbs] $ pwd

    /U01/app/Oracle/product/11.2.0.3/db1/DBS

    [oracle@dbserv dbs] $ ls - lrt * orapw *.

    -rw - r - 1 oracle oinstall 1536 26 August to 20:38 orapwnewdb

    To be clear, there is a version of GI 11.2.0.2 already installed with 11.2.0.2 RDBMS version on the same server (standalone).

    In addition, 11.2.0.3 has been installed on the same machine and a new listening port has been created on 11.2.0.3 home for databases residing on this House.

    Here are the details:

    [oracle@dbserv dbs] $ ps - ef | grep tns

    Oracle 4226 1 0 20:20?        00:00:00 /u01/app/oracle/product/11.2.0.2/grid/bin/tnslsnr EARPHONE-inherit

    Oracle 4239 1 0 20:20?        00:00:00 /u01/app/oracle/product/11.2.0.3/db1/bin/tnslsnr LISTENER_NEWDB-inherit

    Oracle 4599 3734 0 20:44 pts/2 00:00:00 grep tns

    [oracle@dbserv dbs] $ lsnrctl status LISTENER_NEWDB

    LSNRCTL for Linux: Version 11.2.0.3.0 - Production on August 26, 2015 20:44:32

    Copyright (c) 1991, 2011, Oracle.  All rights reserved.

    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=dbserv.mydomain) (PORT = 1526)))

    STATUS of the LISTENER

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

    Alias LISTENER_NEWDB

    Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production

    Start date August 26, 2015 11:20:20

    Uptime 0 days 0 h 24 min 21 sec

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    Parameter Listener of the /u01/app/oracle/product/11.2.0.3/db1/network/admin/listener.ora file

    The listener log file /U01/app/Oracle/diag/tnslsnr/dbserv/listener_newdb/alert/log.XML

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=dbserv.mydomain) (PORT = 1526)))

    (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1526)))

    Summary of services...

    Service 'SLAVE_PORT_NUM' has 1 instance (s).

    Instance of 'SLAVE_PORT_NUM', status UNKNOWN, has 1 operation for this service...

    The command completed successfully

    My bad. OP has already validated the status of the listener. I just forgot.

    I suspected to be an incompatibility with SID in regard to upper and lower case letters and now seem to be confident.

    The listener status indicates the name of the instance as SLAVE_PORT_NUM but OP said as slave_port_num lowercase. Let's take a look in the file of the listener.

    TNS ADMIN could also be a cause, but in this case, it could lift error related to the listener (TNS).

    OP, please send the contents of listener.ora crossing 11.2.0.3 House.

    -Jonathan Rolland

  • 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 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;

  • ORA-01031: insufficient privileges with user SYS when I try to log

    Hello

    When I try to connect to our database with the user SYS via TOAD he gives below error.
    ORA-01031: insufficient privileges

    If I use SQLPLUS "/ as sysdba" it's conningting but if I try to use another tool like TOAD I can't connect.

    You could someone help me what is the problem andhow can I connect the user SYS with TOAD.
    version of database is 9.2.0.8.

    Thank you and best regards,

    You set remote_login_passwordfile exclusive.

  • ORA-01031: insufficient privileges on run immediately 'create a table... '. »

    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.00

    user4501018 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 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.

  • 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.

    >

  • 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 you

    Hello
    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 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;
    
  • 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 you

    This 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.

Maybe you are looking for

  • Problems with many websites (Jolt, Reddit, Yahoo, etc)

    Hello This morning, I experienced problems using several websites via Firefox. Well, all these sites seem to be working through IE and Chrome. I tried a few maintenance base (restart, virus scan, clear the caches), but the problem persists: Issues in

  • Why apple does not feel the need to restrict the use of the fan on a laptop?

    The macbook pro for a reason any waits until the thing is 65 degrees to get even the fan moving. Its bad that enough they insist on the use of passive cooling through the aluminum cover on PEOPLES TOWERS LOCATED. His obvious 'artists' download design

  • Old nVidia Display Driver on Toshiba Download Driver download

    Hello In recent days, theer is a new entry in the download display driver for example for Qosmio G30-series with update on 5. October 2007. If you click on the link to activate the download, the old driver is displayed (display - 20070719123323.zip)

  • Can I download product I bought via the Internet? (BOX)

    Hi guys,.I Heve bought BOX in the store of the internet (Adobe Creative Suite 6 Design and Web Premium PL KITTY Student Edition)I moved to another apartment and lost CD! Is is possible to recover this softwere?I receive a link downlowad?

  • Editing the text in the pdf

    Am, change the text in a full color book large pdf file of 296 pages.  Each page has a mix of text and images-I can edit text on each page, but on some pages that the text edit tool won't let me select the text I want to change - as if it isn't there