Insufficient privs

Hi, Need help in this question -
i have a schema1 and table1 in it.
i have INSERT/DELETE/UPDATE/SELECT privs to table1 from schema2.
when i try to drop an index on table1 from schema2, it throws an error saying "index doesnot exist", i was expecting "insufficient privs error"
am using the following statement in scehma2-
drop index schema1.indx_table1;
please help, thanks.

Schema2 has explicit privileges on the table in schema1, so it can reference schema1.table_name, however there are never any explicit privileges on indexes, so schema2 has no way of explicitly referencing the index, therfore you get the not found instead of insuffivient privileges.  It works the same way with tables if you do not have privileges on the table.
SQL> show user
USER is "OPS$ORACLE"
SQL> desc t
Name                                      Null?    Type
ID                                                 NUMBER
DESCR                                              VARCHAR2(10)
SQL> grant create session to a identified by a;
Grant succeeded.
SQL> connect a/a
Connected.
SQL> select * from ops$oracle.t;
select * from ops$oracle.t
ERROR at line 1:
ORA-00942: table or view does not exist
John

Similar Messages

  • APEX Insufficient Privs errors when trying to use dbms_sql.parse

    Hello,
    I have a simple database procedure that changes are user pswd:
    create or replace
    PROCEDURE chg_pswd_test(p_userid in varchar2,
    p_pswd in varchar2)
    -- Invoker rights allow a user with execute privileges to call a subprogram.
    -- Definer Rights allow programs to execute under the privileges of their
    -- definer / schema owner.
    AUTHID CURRENT_USER as x varchar2(20);
    v_cursor INTEGER;
    v_execute INTEGER;
    begin
    v_cursor := sys.DBMS_SQL.OPEN_CURSOR;
    sys.DBMS_SQL.PARSE(v_cursor, 'ALTER USER '||p_userid||' identified by '||p_pswd, sys.DBMS_SQL.NATIVE);
    v_execute := sys.DBMS_SQL.EXECUTE(v_cursor);
    sys.DBMS_SQL.CLOSE_CURSOR(v_cursor);
    commit;
    end chg_pswd_test;
    I can run this procedure in sqlplus as user x and also as my apex_public_user. I have granted both execute on dbms_sql and alter user privs. It runs for both without problems.
    I then create a validation process in APEX can call this database procedure. I then receive insufficient privs errors.
    If I grant all privs to public, the apex app will then run, if I remove all privs I receive the errors again.
    Does anyone know which database priv I am missing, I cannot grant all privs to public on my production database?
    Thanks

    Odd, as I would think that should work, being the DBA role and all...
    If it works as user X from SQL*Plus, could you try to change the parsing schema to User X and try again?
    Thanks,
    - Scott -
    http://spendolini.blogspot.com
    http://sumnertechnologies.com

  • Insufficient privs error

    create or replace PROCEDURE p_tst
    IS
    v_count number;
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE tmp_tbl as select did from parent ';
    dbms_output.put_line('deleting');
    EXECUTE IMMEDIATE 'DELETE FROM ex WHERE ( did) IN
    ( select did from parent )';
    v_count := SQL%ROWCOUNT;
    COMMIT;
    dbms_output.put_line(v_count);
    dbms_output.put_line('dropping table ');
    EXECUTE IMMEDIATE 'DROP TABLE ex CASCADE CONSTRAINTS';
    END p_tst ;
    the procedure and the tables are in my own schema
    when i try to do this
    begin
    p_tst;
    end;
    i get insufficient privs on this line:
    EXECUTE IMMEDIATE 'CREATE TABLE tmp_tbl as select did from parent ';

    What is the downside to having a table sitting around empty for a month?
    In my mind, it's no different than having a procedure sitting around that is only executed once a month. Yes, it may make it ever so slightly more difficult to find the table/ procedure you're looking for since you have one more object to look at. But that is an exceptionally small overhead. You certainly wouldn't suggest that you should dynamically create, run, and drop the month end procedures, right? So why care about a table that is used once a month sitting unused most of the time?
    Justin

  • Insufficient privs to install OWB as SYSTEM??

    When I try to install this OWB in Windows XP with a version 10? DB I am trying to create the first user and install the repos. I get an error as SYSYEM, insufficient privs to run script ....grantpriv.sql
    This means SYSTEM does not have sufficient privs...and it tells me does not have SYSDBA privs

    To solve this I eventually connected to SqlPlus as SYS and granted SYSDBA to SYSTEM...and now the install has gone thru.....Yeah!!

  • ORA-01031: Insufficient Privs with svrmgrl or DBA Studio. Didnt always happen!

    Hi,
    I'm running Oracle 816 EE on Win2k. All of a sudden, when I log in as svrmgrl and issue: connect internal, I get prompted for a password. I never had to enter a password before! Also, when logging into DBA Studio as system/manager with SYSBDA privs, I get ORA-01031 Insufficient Privs. I never got that error before. I used to be able to log in to DBA Studio and start/shutdown the DB just fine, but now I'm getting locked out for some reason. Aside from recreating a user schema from time to time, I didnt change any system-related info in the DB. Help!
    Rupal

    check these things -
    1) a full import of a database with remote_login_passwordfile=exclusive can cause this problem.
    2) Check your sqlnet.ora file for SQLNET.AUTHENTICATION_SERVICES parameter. Try setting this to (NONE), if that doesn't work, try setting it to (NTS), and if that doesn't work, try commenting it out. A corrupted "sqlnet.ora" file, or one with security options set, will cause a 'connect internal' request to prompt for a password.
    3) Also be sure you have AUTOMATIC_IPC=OFF in the file.
    hope this helps

  • Insufficient privi

    when i execute the below package it gives me error insufficient privi
    i'm using oracle 10g [toad for sql query]
    CREATE OR REPLACE PACKAGE HUMCUST.cs_print_utility
    AS
    -- Useful for Oracle Applications environments
       PROCEDURE print_output(
          p_message   IN   VARCHAR2
        , p_mode      IN   VARCHAR2 DEFAULT 'LOG');
    -- PRINT_OUTPUT
    -- Displays content to DBMS_OUTPUT, but only when g_debug_flag is set to Y .
       PROCEDURE print_output(p_message IN VARCHAR2, p_size IN NUMBER DEFAULT 250);
    -- PRINT_OUTPUT
    -- Displays content to DBMS_OUTPUT,  with optional display input parameter
       PROCEDURE print_output(
          p_display_bit   IN   NUMBER DEFAULT 0
        , p_message       IN   VARCHAR2
        , p_size          IN   NUMBER DEFAULT 250);
       p_print_output_mode   VARCHAR2(10);
       g_debug_flag          CHAR(1)      := 'N';
    END cs_print_utility;
    /when i execute below package then it execute successfully
    CREATE OR REPLACE PACKAGE hum_ftp_utilities
    IS
       PROCEDURE put_remote_file (
          errbuf                     OUT      VARCHAR2
    ,     retcode                    OUT      NUMBER
    ,     p_hostname                 IN       VARCHAR2
    ,     p_localpath                IN       VARCHAR2
    ,     p_filename                 IN       VARCHAR2
    ,     p_remotepath               IN       VARCHAR2
    ,     p_username                 IN       VARCHAR2
    ,     p_password                 IN       VARCHAR2
    ,     p_filetype                 IN       VARCHAR2 DEFAULT 'ASCII'
    ,     p_mainframe                IN       VARCHAR2 DEFAULT 'F'
    ,     p_mainframe_command        IN       VARCHAR2 DEFAULT NULL );
    /* USE THIS PROCEDURE TO REMOVE A FILE FROM A REMOTE SERVER LOCATION */
       END hum_ftp_utilities;
    /plzz help what's the problem

    on the first package that you are trying to execute you implicitly included the schema name in the package when you attempt to compile. but on the second package you attempted to compile a package without the schema name and that will compiled on the schema or account that you are currently using when you logon to the database. this is why you have success on the second package.
    the error that you are getting from compiling the first package is that you do not have privilege to create a package cs_print_utility on the schema HUMCUST. if you try too to create a package hum_ftp_utilities on the schema HUMCUST you will get the same error insufficient privilege.
    to compile the package on schema HUMCUST you need to login as HUMCUST or have a dba account.

  • Insufficient priv error when executing DBMS_ERRLOG through PLSQL

    Hi,
    I shall be grateful if any one of you give me the solution at the earliest.
    I have 2 schemas like A & B those are running on Oracle 10g rel2.
    As per my buz req' I need to create DML Error log table for 'A.T1' table in B schema using DBMS_ERRORLOG package.
    I have granted direct SELECT on A.T1 to B (...not through ROLE as it doesn't work in plsql)
    The problem is when i'm running the procedure,
    DBMS_ERRLOG.CREATE_ERROR_LOG('A.T1', 'err_T1', 'B');
    in SQL*Plus of B schema, it's creating the error log table successfully.
    But the same will get failed when i run this error log procedure with in a procedure owned by B schema.
    It throws 'ORA-01031: insufficient privileges'...
    I hope this is related to privilege issue which is working fine in SQL*Plus but NOT in PLSQL stored procedure.
    Awaiting your earliest reply.
    Thanks.
    - Ela

    >I dont think it's an issue with direct privilege. Actually the
    package is working when i execute it with in a ananymous block,
    but the same get fails when execute it through procedures...
    Role privs work with anonymous PL/SQL blocks. Does not work with stored PL/SQL code.
    SQL> create user user1 identified by user1 default tablespace users quota 2M on users;
    User created.
    SQL> grant create session to user1;
    Grant succeeded.
    SQL> create role user1_role;
    Role created.
    SQL> grant create table, create procedure to user1_role;
    Grant succeeded.
    SQL> grant user1_role to user1;
    Grant succeeded.
    SQL> connect user1/user1
    Connected.
    PL/SQL procedure successfully completed.
    SQL> create table x( n number );
    Table created.
    SQL> begin
    2 execute immediate 'create table y( n number )';
    3* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> create or replace procedure CreateTable is
    2 begin
    3 execute immediate 'create table z( n number )';
    4* end;
    SQL> /
    Procedure created.
    SQL> exec CreateTable
    BEGIN CreateTable; END;
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "USER1.CREATETABLE", line 3
    ORA-06512: at line 1
    SQL>

  • Insufficient priv error when creating a materialised view using DB link!!!!

    Hi,
    I have a two databases db1 and db2.
    I have created a database link from db2 to access user1 schema in db1.
    When i try to create a materialised view by accessing user1 table using user 'user2' in db2 database, i get error "ORA-1031: Insufficient Privilege".
    The user2 has the priviliges "create view", "create any view", "create materialised view" etc.
    I am able to select data, of the table using the database link, but creating materialised view gives this error.
    I want to know if the user "user1" should be granting any privilige to user2, if so how is it possible as user2 dosent exist in db1!
    i.e should i give command something like "grant select on user1.table to user2@db2"(this dosent work as it says user2@db2 dosent exist, obviously as its taking user2@db2 as a username in db1 schema)
    or is this a problem with user2 priviliges in db2 database, if so what are all the priviliges that have to be given to user2 in db2 schema.
    regards,

    Hi,
    User from db1 can not assign any privs to user on db2 database. If user from db1 want to access any object from db2 database, then on local level user2 on db2 should have all the acess to required object. Then you can use user2 on db2 using dblink from db1 user to access those objects residing on remote database.
    If user1 from db1 can grant privs to user2 on db2 database on any objects on db2 database then it is highly security issue. This is not permitted.
    Regards
    e.g.
    conn userx@db2
    grant select on userx.table1 to user2;
    conn user2@db2
    select count(*) from userx.table1;
    conn user1@db1
    select count(*) from userx.table1@db2_dblink;
    Edited by: skvaish1 on Apr 29, 2010 3:57 PM

  • External Table Loads - Insufficient Privs

    Hi...please advise:
    Facts:
    1. I have 2 schemas: SCHEMA_A and SCHEMA_B
    2. I have an oracle directory 'VPP_DIR' created under SCHEMA_A and granted WRITE and READ on the dir to SCHEMA_B.
    3. The physical dir on the unix server to which VPP_DIR points has read, write, execute privs for the Oracle user.
    4. I have a procedure in SCHEMA_A (CET_PROC) which dynamically creates the external table with parameters passed to it like directory_name, file_name, column_definitions, load_when_clause etc.
    5. The CET_PROC also does a grant SELECT on external table to SCHEMA_B once it is created.
    6. SCHEMA_B has EXECUTE privs to SCHEMA_A.CET_PROC.
    7. SCHEMA_B has a proc (DO_LOAD_PROC) that calls SCHEMA_A.CET_PROC.
    At the point where SCHEMA_A.CET_PROC tries to do the EXECUTE_IMMEDIATE command with the create table code, it fails with "ORA-01031: insufficient privileges"
    If I execute SCHEMA_A.CET_PROC from within SCHEMA_A with the same parameters it works fine.
    If I create CET_PROC inside SCHEMA_B and execute this version from within SCHEMA_B it works fine.
    From accross schemas, it fails. Any advice...please?

    Works for me without CREATE ANY TABLE.
    I found it easier to follow the permissions if I replaced SCHEMA_A and SCHEMA_B with OVERLORD and FLUNKY.
    /Users/williamr: cat /Volumes/Firewire1/william/testexttable.dat
    1,Eat,More,Bananas,TodayAs SYS:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Account: SYS@//centosvm.starbase.local:1521/dev10g.starbase.local
    SQL> CREATE USER overlord IDENTIFIED BY overlord                         
      2  DEFAULT TABLESPACE users QUOTA UNLIMITED ON users ACCOUNT UNLOCK;
    User created.
    SQL> CREATE USER flunky IDENTIFIED BY flunky
      2  DEFAULT TABLESPACE users QUOTA UNLIMITED ON users ACCOUNT UNLOCK;
    User created.
    SQL> GRANT CREATE SESSION, CREATE TABLE, CREATE PROCEDURE TO overlord,flunky;
    Grant succeeded.
    SQL> GRANT READ,WRITE ON DIRECTORY extdrive TO overlord;
    Grant succeeded.As OVERLORD:
    Account: OVERLORD@//centosvm.starbase.local:1521/dev10g.starbase.local
    SQL> get afiedt.buf
      1  CREATE OR REPLACE PROCEDURE build_xt
      2      ( p_data OUT SYS_REFCURSOR )
      3  AS
      4      v_sqlstr VARCHAR2(4000) := q'|
      5          CREATE TABLE test_xt
      6          ( id   NUMBER(8)
      7          , col1 VARCHAR2(10)
      8          , col2 VARCHAR2(10)
      9          , col3 VARCHAR2(10)
    10          , col4 VARCHAR2(10) )
    11          ORGANIZATION EXTERNAL
    12          ( TYPE oracle_loader
    13            DEFAULT DIRECTORY extdrive
    14            ACCESS PARAMETERS
    15            ( RECORDS DELIMITED BY newline
    16              BADFILE 'testexttable.bad'
    17              DISCARDFILE 'testexttable.dsc'
    18              LOGFILE 'testexttable.log'
    19              FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    20              ( id, col1, col2, col3, col4 ) )
    21           LOCATION ('testexttable.dat') )
    22           |';
    23  BEGIN
    24      EXECUTE IMMEDIATE v_sqlstr;
    25      OPEN p_data FOR 'SELECT * FROM test_xt';
    26* END build_xt;
    27 
    28  .
    SQL> @afiedt.buf
    Procedure created.
    SQL> grant execute on build_xt to flunky;
    Grant succeeded.
    SQL> -- Prove it works:
    SQL> var results refcursor
    SQL>
    SQL> exec build_xt(:results)
    PL/SQL procedure successfully completed.
            ID COL1       COL2       COL3       COL4
             1 Eat        More       Bananas    Today
    1 row selected.
    SQL> drop table test_xt purge;
    Table dropped.As FLUNKY:
    Account: FLUNKY@//centosvm.starbase.local:1521/dev10g.starbase.local
    SQL> SELECT * FROM user_sys_privs;
    USERNAME                       PRIVILEGE                                ADM
    FLUNKY                         CREATE TABLE                             NO
    FLUNKY                         CREATE SESSION                           NO
    FLUNKY                         CREATE PROCEDURE                         NO
    3 rows selected.
    SQL> var results refcursor
    SQL>
    SQL> exec overlord.build_xt(:results)
    PL/SQL procedure successfully completed.
            ID COL1       COL2       COL3       COL4
             1 Eat        More       Bananas    Today
    1 row selected.

  • SQL exec OK, but trying to put in PLSQL proc gives "insufficient privs" err

    Oracle 9201
    User: ABC
    I have an SQL:
    SELECT * FROM xyz.TableName;
    It runs fine under ABC user.
    Now I try to make a Stored Procedure:
    PROCEDURE TEST(
      O_CURSOR OUT SYS_REFCURSOR
    ) IS 
    BEGIN
      OPEN o_cursor FOR SELECT * FROM xyz.TableName;
    END TEST;Error:
    Line: 5 Column: 39 Error: PL/SQL: ORA-01031: insufficient privileges
    The line/column indicate the ".TableName"
    Why does ABC user not have privs to make a proc that accesses another user's tables? If I make the proc "SELECT * FROM DUAL" the proc compiles okay.
    Please help! :)

    > Oh how perfectly bloody irritating! :)
    If a privilege via a role would be enough, too much invalidations of procedures would happen for each single grant or revoke to that role. Now THAT is what I would find irritating ...
    > ABC does indeed get all its privs via role. It needs
    access to all tables in other user spaces because it
    is the reporting user. Must I write an sql like:
    SELECT 'grant select on ' || table_name ||' to abc;'
    FROM all_tables where owner <> 'ABC'
    No, only the objects needed for the procedure should be granted, not everything in general.
    > and paste the results into my query analyzer, and execute it?
    I am not familiar with that I guess.
    Regards,
    Rob.

  • Database creation - - -insufficient privs

    Hi,
    I am trying to create a database from using a script that I generated using DBCA. And when I run the script, I get the following error:
    startup nomount pfile='/opt/app/oracle/admin/FPRCEDGE/pfile/initFPRCEDGE.ora';
    ORA-01031: insufficient privilegesSQL>
    SQL> set echo on;
    SQL> prompt Creating USERS and TOOLS tablespaces ...
    Creating USERS and TOOLS tablespaces ...
    SQL> prompt
    SQL> connect SYS/oracleadmin as SYSDBA
    ERROR:
    ORA-09925: Unable to create audit trail file
    Message was edited by:
    JrOraDBA

    There are some other errors displayed at the end of your posting which make me think you are connected with a differente user from oracle, and this user doesn't have privileges to write to the oracle's directories.
    Please verify the account you are logged on. I recomend you to keep your original oracle user who performed installation.
    ~ Madrid.

  • Insufficient Priv:  Shutdown Immediate

    I'm trying to shutdown the Oracle database connected using the SYS account as SYSDBA and I'm getting an insufficient privilege error using SHUTDOWN IMMEDIATE.
    What system privilege needs to be granted in order to perform SHUTDOWN IMMEDIATE?
    Thanks,
    Mike

    Hi,
    There are five operations on Oracle that require the user to have SYSDBA privileges in order to perform them:
    * startup a database,
    * shutdown a database,
    * backup a database,
    * recover a database and
    * create a database
    v$pwfile_users lists all users who have been granted sysdba or sysoper privileges.
    SYS@ORACLE10> select * from v$pwfile_users;
    USERNAME                       SYSDB SYSOP
    SYS                            TRUE  TRUESee if this query above return the SYS user.
    Cheers

  • Cannot delete file on TC disk: insufficient permissions

    I copied a folder onto TC's disk as a manual backup, but want to delete it now. Unfortunately finder reports that the folder is alternately "in use" or that I don't have sufficient permissions to delete it. This is so incredibly frustrating. I just want to delete the thing, and I'm unable.
    Any ideas, aside from a disk erase?

    Did anyone ever really figure this out? I've tried the terminal 'rm' and just about everything else with no luck.
    Basically, I've been using my TC as a NAS drive for temporary storage while I'm shuffling drives around, reorganizing, etc. In the process I copied a bunch of folders that had locked files in them to the drive. Once I copied them to their new home I found I could not delete them from the TC. So I com-I'd them, unlocked and deleted all the files. However the folder structure that the files were in REFUSES to be deleted. I have insufficient privs. I've tried any number of freeware/shareware utilities to try and kill them and no luck with any of it.
    I love my MAC but, well, WinXP is not this much hassle 5 hours of screwing around to delete 6 folders is a tad much! Help!
    goose

  • Getting privs error

    Hi all
    I'm learning few mappings and tried running dedup and other transformations, getting error insufficient privs error, I granted select privs on source to target and insert privs on target to source, what I'm missing, It is so annoying not able to deploy and run, Can not figure out.
    Thanks for the help
    Murthy

    I'm deploying mappings to target here my target is topala, source src and both schemas on orcl11.
    select line,text from user_source where name='MAP_EMPL_DEPT_TOT_AGG' and line > 620 and line < 640;
    " EXIT WHEN "DEPT_TOT_i" <= get_bulk_size
    " AND "AGGREGATOR_c"%FOUND AND NOT get_abort;
    " ELSE
    " EXIT WHEN "DEPT_TOT_si" >= "DEPT_TOT_i";
    " END IF;
    " get_rowid.DELETE;
    " BEGIN
    " FORALL i IN "DEPT_TOT_si".."DEPT_TOT_i" - 1
    " INSERT
    " /*+ APPEND PARALLEL("DEPT_TOT") */
    " INTO
    " "TOPALA"."DEPT_TOT"
    " ("DEPT_TOT"."DNO",
    " "DEPT_TOT"."SAL"
    " VALUES
    " ("DEPT_TOT_0_DNO"(i),
    " "DEPT_TOT_1_SAL"(i)
    topala-> target
    src-> source
    mapping deployed to orcl11, target and what privs, I'm missing, What am I doing wrong.
    Thanks for the help in advance
    "

  • What privs r required to run Alter table truncate partition update indexes?

    I rebuilt the indexes on the table. Know my problem is that when I truncate a partition on the table the unique index whic consist of the primary key fields becomes unusable which causes my to have to rebuild it after each truncate. I tried to runm the following statement from the master schema on but get
    an insufficient privs error when I use "update indexes":
    Alter table schema_name.table_name truncate partition partition_name storage update indexes;
    What priv does master need to perform statement successfully when there's data in it?
    Does using 'update indexes' needs extra priveleges?
    Thanks in Advance
    Gagan

    Hi Its Oracle 10.2.0.4 64 Bit on HP UX.
    I dont have the exact error as I got this much information only from the end user....It will be couple of hours more then he will be available again
    ok so for Truncate we need 'Drop any' privs but to use clause 'update indexes' alongwith do we need some extra privelege?
    Thanks again
    Gagan

Maybe you are looking for