Compile via object browser gives ORA-01031 insufficient privileges but...

Hello,
Last week I upgraded my APEX version from 2.2 to 3.01; I didn't find any problems up to now. Via the home>SQL Workshop>object browser screen, packages then edit package I modified a package. When I hit the 'compile' button, I got the message: ORA-01031: insufficient privileges.
When I do 'alter package <package_name> compile [body]' via the home>SQL workshop>SQL commands screen the package is compile succesfully.
To me this looks like a bug... same (apex) user, same priviliges...
Has anybody an idea why I can't compile via the object browser screen, receiving the ORA-01031 message, but why I can compile the same package via sql-commands screen.
The user I am logged on with in APEX is the owner of the package.
Thanks in advance for your assistance.
best regards,
Jan.
Message was edited by: jan
J. Hulsing

Linda,
Connect as SYSTEM and:
grant create procedure to XXXXXXX;
...where XXXXXXX is the schema name. A DBA would need to do this, of course.
Scott

Similar Messages

  • "Create User" gives ORA-01031: insufficient privileges for user sys

    I am on Oracle 11g db, 11.1.0.6 and login successfully using sys/password as sysdba. This login is successful.
    [oracle@RH5-32-OR bin]$ ./sqlplus sys/abcd1234 as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jan 21 06:06:51 2010
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    However, I cannot create a new user, getting error about insufficient privileges. I though since this is a sys login with role DBA, it should be allowed to create user.
    I also logged in to enterprise manager console using the same credentials, and navigated to: Security->Sys.
    - Under the system tab, and can see "Create User" granted.
    - Under the role tab, there is DBA granted.
    SQL> create user myuser identified globally;
    create user myuser identified globally
    ERROR at line 1:
    ORA-01031: insufficient privileges
    Where to check for previleges? And how to debug. I am really very surprised.
    Thanks.

    I don't have first hand experience of using Database Vault myself, but according the manual the default setup prevents SYSDBA from creating users when Database Vault is enabled (which I would guess is the case based on the banner posted above) This behaviour can be modified by the Vault administrator.
    http://download.oracle.com/docs/cd/B28359_01/server.111/b31222/db_objects.htm#BEIJIFGA

  • ORA-01031: insufficient privileges While trying / as sysdba

    I have an Oracle user (jjcdba) through which I login to the database.
    From today morning, I am unable to login to the database and I am getting this error.
    $=> id
    uid=123(jjcdba) gid=3203(jjcdba)
    [jjcdba@jjcprd04:/jjc/orasw10/oracle/product/10.2.4]
    $=> sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 5 04:22:31 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    ERROR:
    ORA-01031: insufficient privileges
    Enter user-name:Could someone please tell me how to troubleshoot this issue. I need to get into the database urgently!
    Edited by: user9104898 on Oct 5, 2010 1:43 AM

    $=> sqlplus "/as sysdba"
    SQL*Plus: Release 9.2.0.5.0 - Production on Tue Oct 5 04:51:22 2010
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.5.0 - Production
    SQL> sho parameter db_name
    NAME                                 TYPE        VALUE
    db_name                              string      JJCSHRP2
    $=> sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.3.0 - Production on Tue Oct 5 04:53:17 2010
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> sho parameter db_name
    NAME                                 TYPE        VALUE
    db_name                              string      JJCSHRP5
    SQL> exit
    $=> sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.3.0 - Production on Tue Oct 5 04:57:26 2010
    Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> sho parameter db_name
    NAME                                 TYPE        VALUE
    db_name                              string      JJCSHRP7
    $=> sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 5 04:58:01 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
    and Real Application Testing options
    SQL> sho parameter db_name
    NAME                                 TYPE        VALUE
    db_name                              string      JJCSHRP8
    SQL>Only when I am connecting to this database, I am facing issue.
    $=> sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.4.0 - Production on Tue Oct 5 06:36:24 2010
    Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
    ERROR:
    ORA-01031: insufficient privileges
    But I can connect to this database by giving the password.
    Enter user-name: sys/xxxxxxxx as sysdba
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL>

  • ORA-01031: insufficient privileges after changing group.

    I installed oracle 10g with oracle:oinstall as owner and I was able to connect using "sqlplus / as sysdba".
    But today I chaged owner of 10g software owner to oracle:dba.
    Now when I am trying "sqlplus / as sysdba".
    ERROR:
    ORA-01031: insufficient privileges
    But I am able to connect with "sqlplus sys/password as sysdba".
    linux1:(oracle):DEV +-> id
    uid=175(oracle) gid=115(dba) groups=115(dba)
    What to do to have OS authen working?
    Thanks

    Most probably this is what the user means :-
    1. Installation was done with oracle:oinstall a year back.
    oracle as the user and oinstall as the group owner.
    At that time sqlplus "/ as sysdba" was working fine for him
    2. He probably wanted his setting to be oracle:dba and he issued the following command:-
    chown -R oracle:dba $ORACLE_HOME
    Now the issue is that he cannot use sqlplus "/ as sysdba" however sqlplus sys/connpass works just fine.
    He probably wants to know why his settings are not working now.
    Have you read metalink for that error ORA-1031, there is a whole set of document available to diagonise this issue.

  • Backup via Cron job - SQL ERROR: ORA-01031: insufficient privileges

    Hi,
    We are Using Oracle RAC - linux - SAP EP . We have scheduled online backup through crontab .
    Always we are getting below error when the backup job runs via crontab
    ================
    BR0278E Command output of '/usr/sap/EP1/SYS/exe/run/brtools -f printcmd -U /oracle/EP1/sapbackup/.begpjvay.003 'archive log list;' 'exit;' | /oracle/EP1/102_6
    4/bin/sqlplus /nolog':
    SQL*Plus: Release 10.2.0.5.0
    Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
    SQL> ERROR:
    ORA-01031: insufficient privileges
    SQL> ORA-01012: not logged on
    SQL>
    BR0280I BRBACKUP time stamp: 2011-08-22 02.00.12
    BR0279E Return code from '/usr/sap/EP1/SYS/exe/run/brtools -f printcmd -U /oracle/EP1/sapbackup/.begpjvay.003 'archive log list;' 'exit;' | /oracle/EP1/102_64
    /bin/sqlplus /nolog': 0
    BR0302E SQLPLUS call for database instance EP12 failed
    =====================
    whereas if i trigger the same commend
    brbackup -u / -c force -t online -m all -p <init*.sap> manually it end successfully.
    Kindly can anyone help over below issue.
    Regards,
    Ayyappan

    Hi Ayyappan,
    Thanks in Advance,
    We are also having same scenario with RAC and Linux, we are trying to configure backup and getting the same error could you please guide me how u resolved the issue, please help....
    Regards,
    Sumeesh

  • Error ORA-01031: insufficient privileges when backup via DB13

    Hi expert,
    Currently, I have system on SuSE 10 SP2 with ECC6 and Oracle 10.2 installed.
    Database backup works fine when using BRTOOLS from command line.
    Error like this :
    BR0278E Command output of 'SHELL=/bin/sh /oracle/I20/920_32/bin/rman
    nocatalog':
    Recovery Manager: Release 9.2.0.4.0 - Production
    Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.
    RMAN>
    RMAN> connect target /;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    ORA-01031: insufficient privileges
    RMAN> *end-of-file*
    happened when I try to schedule backup through DB13.
    I try to solved this with SAP Note 776505 but still doesn't work.
    Any suggestion ?
    ardhian

    Hi,
    Execute the following command at sql prompt.
    grant dba,resource,connect,sapdba to OPS$<SID>ADM  OPS$ORA<SID>
    grant dba,resource,connect,sapdba to O OPS$ORA<SID>
    grant dba,resource,connect,sapdba to  SAPSR3 or SAP<SID>(YOUR SCHEMA NAME)
    Also check owner of SAPUSER table
    SELECT OWNER FROM DBA_TABLES WHERE TABLE_NAME = 'SAPUSER';
    If it returns value OPS$<SID>ADM than its ok, otherwise you have to drop this & recreate with command
    CREATE TABLE "OPS$QASADM".SAPUSER
           (USERID VARCHAR2(256), PASSWD VARCHAR2(256));
            INSERT INTO "OPS$<sid>ADM".SAPUSER VALUES ('<sapowner>',
    '<password>');
    For more info go through the snote 400241
    [https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=400241]
    Thanks & Regards
    Karan

  • ORA-01031: insufficient privileges in PL/SQL but not in SQL

    I have problem with following situation.
    I switched current schema to another one "ban", and selected 4 rows from "ed"
    alter session set current_schema=ban;
    SELECT * FROM ed.PS WHERE ROWNUM < 5;
    the output is OK, and I get 4 rows like
    ID_S ID_Z
    1000152 1
    1000153 1
    1000154 1
    1000155 1
    but following procedure is compiled with warning
    create or replace
    procedure proc1
    as
    rowcnt int;
    begin
    select count(*) into rowcnt from ed.PS where rownum < 5;
    end;
    "Create procedure, executed in 0.031 sec."
    5,29,PL/SQL: ORA-01031: insufficient privileges
    5,2,PL/SQL: SQL Statement ignored
    ,,Total execution time 0.047 sec.
    Could you help me why SELECT does work in SQL but not in PL/SQL procedure?
    Thanks.
    Message was edited by:
    MattSk

    Privs granted via a role are only valid from SQL - and not from/within stored PL/SQL code.
    Quoting Tom's (from http://asktom.oracle.com) response to this:I did address this role thing in my book Expert one on one Oracle:
    <quote>
    What happens when we compile a Definer rights procedure
    When we compile the procedure into the database, a couple of things happen with regards to
    privileges.  We will list them here briefly and then go into more detail:
    q    All of the objects the procedure statically accesses (anything not accessed via dynamic SQL)
    are verified for existence. Names are resolved via the standard scoping rules as they apply to the
    definer of the procedure.
    q    All of the objects it accesses are verified to ensure that the required access mode will be
    available. That is, if an attempt to UPDATE T is made - Oracle will verify the definer or PUBLIC
    has the ability to UPDATE T without use of any ROLES.
    q    A dependency between this procedure and the referenced objects is setup and maintained. If
    this procedure SELECTS FROM T, then a dependency between T and this procedure is recorded
    If, for example, I have a procedure P that attempted to 'SELECT * FROM T', the compiler will first
    resolve T into a fully qualified referenced.  T is an ambiguous name in the database - there may be
    many T's to choose from. Oracle will follow its scoping rules to figure out what T really is, any
    synonyms will be resolved to their base objects and the schema name will be associated with the
    object as well. It does this name resolution using the rules for the currently logged in user (the
    definer). That is, it will look for an object owned by this user called T and use that first (this
    includes private synonyms), then it will look at public synonyms and try to find T and so on.
    Once it determines exactly what T refers to - Oracle will determine if the mode in which we are
    attempting to access T is permitted.   In this case, if we as the definer of the procedure either
    owns the object T or has been granted SELECT on T directly or PUBLIC was granted SELECT, the
    procedure will compile.  If we do not have access to an object called T by a direct grant - the
    procedure P will fail compilation.  So, when the object (the stored procedure that references T) is
    compiled into the database, Oracle will do these checks - and if they "pass", Oracle will compile
    the procedure, store the binary code for the procedure and set up a dependency between this
    procedure and this object T.  This dependency is used to invalidate the procedure later - in the
    event something happens to T that necessitates the stored procedures recompilation.  For example,
    if at a later date - we REVOKE SELECT ON T from the owner of this stored procedure - Oracle will
    mark all stored procedures this user has that are dependent on T, that refer to T, as INVALID. If
    we ALTER T ADD  some column, Oracle can invalidate all of the dependent procedures. This will cause
    them to be recompiled automatically upon their next execution.
    What is interesting to note is not only what is stored but what is not stored when we compile the
    object. Oracle does not store the exact privilege that was used to get access to T. We only know
    that procedure P is dependent on T. We do not know if the reason we were allowed to see T was due
    to:
    q    A grant given to the definer of the procedure (grant select on T to user)
    q    A grant to public on T (grant select on T to public)
    q    The user having the SELECT ANY TABLE privilege
    The reason it is interesting to note what is not stored is that a REVOKE of any of the above will
    cause the procedure P to become invalid. If all three privileges were in place when the procedure
    was compiled, a revoke of ANY of them will invalidate the procedure - forcing it to be recompiled
    before it is executed again. Since all three privileges were in place when we created the procedure
    - it will compile successfully (until we revoke all three that is). This recompilation will happen
    automatically the next time that the procedure is executed.
    Now that the procedure is compiled into the database and the dependencies are all setup, we can
    execute the procedure and be assured that it knows what T is and that T is accessible. If something
    happens to either the table T or to the set of base privileges available to the definer of this
    procedure that might affect our ability to access T -- our procedure will become invalid and will
    need to be recompiled.
    This leads into why ROLES are not enabled during the compilation and execution of a stored
    procedure in Definer rights mode. Oracle is not storing exactly WHY you are allowed to access T -
    only that you are. Any change to your privileges that might cause access to T to go away will cause
    the procedure to become invalid and necessitate its recompilation. Without roles - that means only
    'REVOKE SELECT ANY TABLE' or 'REVOKE SELECT ON T' from the Definer account or from PUBLIC. With
    roles - it greatly expands the number of times we would invalidate this procedure. If some role
    that was granted to some role that was granted to this user was modified, this procedure might go
    invalid, even if we did not rely on that privilege from that role. ROLES are designed to be very
    fluid when compared to GRANTS given to users as far as privilege sets go. For a minute, let's say
    that roles did give us privileges in stored objects. Now, most any time anything was revoked from
    ANY ROLE we had, or any role any role we have has (and so on -- roles can and are granted to roles)
    -- many of our objects would become invalid. Think about that, REVOKE some privilege from a ROLE
    and suddenly your entire database must be recompiled! Consider the impact of revoking some system
    privilege from a ROLE, it would be like doing that to PUBLIC is now, don't do it, just think about
    it (if you do revoke some powerful system privilege from PUBLIC, do it on a test database). If
    PUBLIC had been granted SELECT ANY TABLE, revoking that privilege would cause virtually every
    procedure in the database to go invalid. If procedures relied on roles, virtually every procedure
    in the database would constantly become invalid due to small changes in permissions. Since one of
    the major benefits of procedures is the 'compile once, run many' model - this would be disastrous
    for performance.
    Also consider that roles may be
    q    Non-default: If I have a non-default role and I enable it and I compile a procedure that
    relies on those privileges, when I log out I no longer have that role -- should my procedure become
    invalid -- why? Why not? I could easily argue both sides.
    q    Password Protected: if someone changes the password on a ROLE, should everything that might
    need that role be recompiled?  I might be granted that role but not knowing the new password - I
    can no longer enable it. Should the privileges still be available?  Why or Why not?  Again, arguing
    either side of this is easy. There are cases for and against each.
    The bottom line with respect to roles in procedures with Definer rights are:
    q    You have thousands or tens of thousands of end users. They don't create stored objects (they
    should not). We need roles to manage these people. Roles are designed for these people (end users).
    q    You have far fewer application schema's (things that hold stored objects). For these we want
    to be explicit as to exactly what privileges we need and why. In security terms this is called the
    concept of 'least privileges', you want to specifically say what privilege you need and why you
    need it. If you inherit lots of privileges from roles you cannot do that effectively. We can manage
    to be explicit since the number of development schemas is SMALL (but the number of end users is
    large)...
    q    Having the direct relationship between the definer and the procedure makes for a much more
    efficient database. We recompile objects only when we need to, not when we might need to. It is a
    large efficiency enhancement.
    </quote>

  • Java.sql.SQLException: ORA-01031: insufficient privileges

    Hi I'm using oracle 8.1.6 here is a small code
    import java.sql.*;
    import oracle.jdbc.driver.*;
    class JDBCVersion
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver
    (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@DEV","test","test");
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData ();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    it gives an exception
    java.sql.SQLException: ORA-01031: insufficient privileges
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1597)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:354)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at JDBCVersion.main(JDBCVersion.java:12)
    has anyone got an idea.. what's happening..TNS is set .. and if i use thin driver.. instead of oci.. it runs fine.. infact on oracle user env .. it runs ok.. but with any other unix user.. it gives this exception.. i tried .. using the same env variables in oracle user too..
    thanks a lot
    -alok

    I think it's not oracle privileges ... as i have tried with dba privilege and without dba privileges, the same thing runs as oracle (unix) user.. but not by any other user.... any clues??
    -alok
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alok Gupta:
    Hi I'm using oracle 8.1.6 here is a small code
    import java.sql.*;
    import oracle.jdbc.driver.*;
    class JDBCVersion
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver
    (new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@DEV","test","test");
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData ();
    // gets driver info:
    System.out.println("JDBC driver version is " + meta.getDriverVersion());
    it gives an exception
    java.sql.SQLException: ORA-01031: insufficient privileges
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1597)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:354)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at JDBCVersion.main(JDBCVersion.java:12)
    has anyone got an idea.. what's happening..TNS is set .. and if i use thin driver.. instead of oci.. it runs fine.. infact on oracle user env .. it runs ok.. but with any other unix user.. it gives this exception.. i tried .. using the same env variables in oracle user too..
    thanks a lot
    -alok<HR></BLOCKQUOTE>
    null

  • ORA-01031: insufficient privileges and SAP license issue

    Hi,
    We have successfully installed the NW7.31 with ORACLE 11.2.0.4 on AIX.
    Its a fresh installed system, after installation we have applied the saplicense through SLICENSE and after that upgrade the kernel(We have run the ./saproot.sh <SAPSID> with root user).
    Kernels are upgraded successfully, we have checked the disp+work, kernel patch level is upgraded successfully.
    SAP is started normally, but now we are facing two issues on OS level.
    1. Issue is regarding to the saplicense command....
    abcadm 4> saplicense -show
    saplicense: no license entries found
    abcadm 5> saplicense -number
    saplicense: read installation number failed
    *** Can not read profile parameter SAPSYSTEMNAME
    Start saplicense with -number NAME=<sid>
    abcadm 6> saplicense -number NAME=ABC
    Read installation number for SAP SYSTEM: ABC
    INSTALLATION NO = INITIAL
    2. When we are trying to run the Update statistics on database with DB13 command following error occurs. Even i have tried via brtools but still following error occures.
    BR0301E SQL error -1031 at location BrLicCheck-12, SQL statement:
    'SELECT MAX(SYSTEMNAME), MAX(SYSID) FROM SAP_MLICHECK WHERE EXPIRATION_DATE = (SELECT MAX(EXPIRATION_DATE) FROM SAP_MLICHECK)'
    ORA-01031: insufficient privileges
    I have checked the R3trans -d it working fine.
    oraabc 15> R3trans -d
    This is R3trans version 6.24 (release 721 - 08.05.14 - 16:50:00).
    unicode enabled version
    R3trans finished (0000).
    In SLICENSE tcode it showing the license entries but when we are run the command from os level "saplicense", it didnt found any license entry.
    Kindly suggest.
    regards,
    amit

    Hi Deepak,
    NW SP level as follows.............
    SAP_BASIS
    731
    0011
    SAP_ABA
    731
    0011
    PI_BASIS
    731
    0011
    ST-PI
    2008_1_710
    0010
    SAP_BW
    731
    0011
    SAP Kernel as follows....................
    kernel release                721
    kernel make variant           721_EXT_REL
    compiled on                   AIX 1 6 00CFADC14C00 for rs6000_64
    compiled for                  64 BIT
    compilation mode              UNICODE
    compile time                  May 27 2014 03:48:09
    update level                  0
    patch number                  300
    source id                     0.300
    DBATOOLS level as follows...............
    oraabc 12> brtools
    BR0651I BRTOOLS 7.20 (36)
    regards,
    amit

  • Resolving problem with ORA-01031: insufficient privileges

    hello i just to write a few word about my installation of oracle database 9i
    My installation is on a Red Hat AS3
    I have a problem with the error :ORA-01031: insufficient privileges
    The one who read this know what about i tell.
    The authorization is only for the user which Group is DBA as you can read everywhere.
    but me when i tried groupadd dba => it tells group already exist.
    but i can't find the group dba in the file /etc/group.
    So i tried to make my user 'oracle' works with the 'already group exist' dba .
    useradd -g dba oracle
    but when i tried to start the database i create i have the message. : ORA-01031: insufficient privileges
    i tried to add manualy the group dba to /etc/group (as i can read in websites)
    and add a user manualy (/etc/passwd).
    But does works.
    I try all i can during 1 days long.
    I was really upset because nothing that i read work.
    finaly I go to the RedHat Menu (things i don't really do normaly on LINUX) and go to 'SYSTEM SETTINGS' and choose 'User and Group'
    Here i can see my user 'Oracle' I get the property of the user .
    there is a tab group ( 'select the group that the user will be member of:')
    None of them where name DBA so i decidied to select all of them and tried.
    MAGIC!!! then it works!!!
    ps: after when i see the list of the group I saw that one of them is named 'SYS' . I really think that it is the one group i had to select. but don't know.
    Now It is working for me so... And good luck for you. bye.

    Errors
    ORA-01031 "insufficient privileges"
    Symptoms
    During database upgrade phase using DBUA , it fails with error
    ORA-1031 Insufficient privileges
    Connection from sqlplus also fails with same error
    $ sqlplus /nolog
    SQLPLUS "conn / as sysdba"
    ORA-1031 Insufficient privileges
    Changing the REMOTE_LOGIN_PASSWORDFILE to SHARED / NONE does not make differen
    Cause
    ORACLE_HOME owner oramigts is part of OS group "dba" ,but config.s shows group "g680"
    The 'OSDBA' and 'OSOPER' groups are chosen at installation time and usually both default to the group 'dba'.
    These groups are compiled into the 'oracle' executable and so are the same for all databases running from a given ORACLE_HOME directory.
    The actual groups being used for OSDBA and OSOPER can be checked thus:
    cd $ORACLE_HOME/rdbms/lib
    cat config.[cs]
    Solution
    To implement the solution, please execute the following steps:
    1. Checked the ORACLE_HOME owner.
    echo $ORACLE_HOME
    /h02/app/oracle/product/9.2.0_64
    cd / h02/app/oracle/product/
    ls -l
    drwxr-xr-x 58 oramigts dba 1024 Jan 2 2004 9.2.0_64
    2.ORACLE_HOME software owner "oramigts" is part of group "dba"
    3.Checked file $ORACLE_HOME/rdbms/lib/config.s
    [If your platform has config.c:
    Due to the way different compilers under different architectures generate
    assembler code, it's not possible to give a universal rule.]
    It shows dba group as "g680" where software owner is part of "dba" group
    You can more find detail on config.s / config.c in the following doc.
    Note 50507.1 SYSDBA and SYSOPER Privileges in Oracle
    4. Modified the config.s for correct group.
    .ascii "g680\0"
    to
    .ascii "dba\0"
    7. mv config.o config.o.bak
    8. make -f ins_rdbms.mk config.o ioracle
    9. Checked the file config.o is created at $ORACLE_HOME/rdbms/lib
    10. Connected / as sysdba thru Sqlplus from 9.2 Home, which connected sucessfully.

  • ORA-01031: insufficient privileges While Trying to Create a Trigger

    Hi
    I am trying to create a trigger on one of the table in the database schema :
    CREATE OR REPLACE TRIGGER Trigger_Name
    BEFORE INSERT ON table_name
    FOR EACH ROW
    ---Trigger Body...
    However I am getting the following error : ORA-01031: insufficient privileges
    I have tried to check the status of the trigger with the following script :
    SELECT object_name
    FROM dba_objects
    WHERE object_type = 'TRIGGER'
    AND status = 'INVALID';
    and it is showing its status as "INVALID".
    Can anybody please suggest me how to proceed on this?

    Hi,
    If the trigger exists than you have privilieges to create trigger but you need some privilieges needed to compile it.
    Check all commands and objects you are referring to inside trigger body. Maybe you are trying select table without proper priviliege...?
    Bartek

  • Facing error (ORA-01031: insufficient privileges)

    Hi All,
    I am facing a strange error as mentioned in the subject.
    I googled and found that I dont have proper privileges to execute.
    But my scenario is as follows
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE TEST1(X NUMBER)';
    END;
    PL/SQL procedure successfully completed.
    CREATE PROCEDURE PR_TEST
    IS
    BEGIN
    EXECUTE IMMEDIATE 'CREATE TABLE TEST2(X NUMBER)';
    END;
    EXEC PR_TEST;
    ORA-01031: insufficient privileges
    ORA-06512: at "SCMSA_HIST.PR_TEST", line 4
    ORA-06512: at line 1
    Appreicate your valuable response.
    Thanks,
    MK.

    Maddy wrote:
    I googled and found that I dont have proper privileges to execute.
    It is good that you have found the cause of issue. So, did you give proper privileges to resolve the error?
    What is that you expect from the Forums?
    Just give "Grant Create table to user" and resolve the issue. :)
    Just wanted to add, Creating Objects on-the-go is not a very good approach.
    Another, you might want to handle the exception, in case the Table/Object already exists. Else your Code Execution may be interrupted (Just with the thought that you may have code following the Dynamic Create Table statement; If you do not have then no issues.)
    Edited by: Purvesh K on Jul 27, 2012 10:36 AM

  • ORA-01031:Insufficient Privileges error when I am trying to use ALERT_QUE

    Hi,
    I am working on SYS.ALERT.QUE for getting system alerts. I am using ODP in C# for connecting to Oracle database with username = SYSTEM, but when I am trying to enque or deque any message from SYS.ALERT.QUE, its gives an error ORA-01031:Insufficient Privileges. I am not able to understand how to assign SYSDBA privileges to SYSTEM and access ALERT_QUE for getting system alerts. I am posting my code below, plz have a look and let me know whats wrong with the code. I am able to connect to databse using SYSTEM, do I need to use username = SYS for accesing ALERT_QUE of database? Plz let me know whats the solution.
    OracleConnection con = new OracleConnection(constr);
    // Create queue
    OracleAQQueue queue = new OracleAQQueue("sys.alert_que", con);
    // Open connection
    con.Open();
    // Begin txn for enqueue
    OracleTransaction txn = con.BeginTransaction();
    // Set message type for the queue
    queue.MessageType = OracleAQMessageType.Raw;
    // Prepare message and RAW payload
    OracleAQMessage enqMsg = new OracleAQMessage();
    byte[] bytePayload = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    enqMsg.Payload = bytePayload;
    OracleAQAgent[] agent = new OracleAQAgent[1];
    agent[0] = new OracleAQAgent("SUBSCRIBER1");
    enqMsg.Recipients = agent;
    enqMsg.SenderId = new OracleAQAgent("SENDER1");
    // Prepare to Enqueue
    queue.EnqueueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
    // Enqueue message
    queue.Enqueue(enqMsg);
    The code throws exception at line "queue.Enqueue(enqMsg);" saying ORA-01031:Insufficient Privileges
    Edited by: 916462 on Feb 27, 2012 3:31 AM

    Hi Sudheendra,
    Thanks a lot, that worked. Now I am facing one more new issue, when I am trying to deque message from ALERT_QUE which is oracle maintained queue for alerts, I am getting an error "ORA-25215:User data type and queue type do not match". Is there something wrong with my code like Message type, payload and all. I am very new to Oracle database so I don't have idea about this details. Can u plz help me in solving this.
    OracleTransaction txn = con.BeginTransaction();
    // Set message type for the queue
    queue.MessageType = OracleAQMessageType.Raw;
    // Prepare message and RAW payload
    OracleAQMessage enqMsg = new OracleAQMessage();
    byte[] bytePayload = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
    enqMsg.Payload = bytePayload;
    OracleAQAgent[] agent = new OracleAQAgent[1];
    agent[0] = new OracleAQAgent("SUBSCRIBER1");
    enqMsg.Recipients = agent;
    enqMsg.SenderId = new OracleAQAgent("SENDER1");
    // Begin txn for Dequeue
    txn = con.BeginTransaction();
    // Prepare to Dequeue
    queue.DequeueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
    queue.DequeueOptions.Wait = 10;
    queue.DequeueOptions.ConsumerName = "SUBSCRIBER1";
    // Dequeue message
    OracleAQMessage deqMsg = queue.Dequeue();
    txn.Commit();
    Edited by: 916462 on Feb 28, 2012 9:55 PM

  • ORA-01031: insufficient privileges problem

    Hi all,
    I am trying to create the below procedure in the BOLMIN schema which in turn selects data from the tables of VALMIN schema. 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
    FROM VALMIN.USER_PROFILE 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 the grants of each of the VALMIN schema tables involved in the associated sql query & they all have SELECT grant (to BOLMIN schema). Also, the SQL query itself, when executed in BOLMIN schema runs perfectly fine. The problem is occurring only when I enclose the query in a procedure. Isn't that weird? or am I missing something here? Any help regarding this issue is appreciated. Thanks.
    The BOLMIN schema as CREATE PROCEDURE privilege as I have already created other procedures for other purposes.
    Thanks,
    Sirisha
    Edited by: siri_me on Oct 2, 2010 9:23 AM

    siri_me wrote:
    All Roles are disabled in PL/SQL and explicit privileges are needed right from creating procedures to the accessing the underlying tables.WRONG. Roles are disabled in definer rights stored objects - stored procedures, functions, packages triggers. Stored procedures, functions, packages with authid current user and anonymous PL/SQL block honor roles.
    SY.

  • Check database with error "ORA-01031: insufficient privileges"

    Dear Gurus,
            I ran "Check database" in DB13 but I got error "ORA-01031: insufficient privileges"
    BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
    BR0301E SQL error -1031 at location BrDbdiffRead-1, SQL statement:
    'PREPARE stmt_5 STATEMENT FROM'
    'SELECT OBJNAME FROM "SAPSR3".DBDIFF WHERE DBSYS IN ('ORACLE', ' ') AND OBJTYPE = 'TABL' AND DIFFKIND IN ('02', '61', '99') ORDER BY OBJNAME'
    ORA-01031: insufficient privileges
    BR0806I End of BRCONNECT processing: cecxekdh.chk 2010-03-31 12.37.00
           Note I try to execute sapdba_role.sql (with command "sqlplus /nolog @sapdba_role.sql SR3") as Note 134592 both login 'oradev' and 'devadm' but it seem to do nothing (not found sapdba_role.log)
          Please advice.
    Best regards,
    Choosak B.
    Ps.
    detailed log of /oracle/DEV/sapcheck/cecxekdh.chk
    BR0801I BRCONNECT 7.00 (40)
    BR0477I Oracle pfile /oracle/DEV/102_64/dbs/initDEV.ora created from spfile /oracle/DEV/102_64/dbs/spfileDEV.ora
    BR0805I Start of BRCONNECT processing: cecxekdh.chk 2010-03-31 12.30.53
    BR0484I BRCONNECT log file: /oracle/DEV/sapcheck/cecxekdh.chk
    BR0101I Parameters
    Name                           Value
    oracle_sid                     DEV
    oracle_home                    /oracle/DEV/102_64
    oracle_profile                 /oracle/DEV/102_64/dbs/initDEV.ora
    sapdata_home                   /oracle/DEV
    sap_profile                    /oracle/DEV/102_64/dbs/initDEV.sap
    system_info                    devadm/oradev sapdev SunOS 5.10 Generic_142900-03 sun4v
    oracle_info                    DEV 10.2.0.4.0 8192 7465 94896497 sapdev UTF8 UTF8
    sap_info                       701 SAPSR3 0002LK0003DEV0011N11827599290015Maintenance_ORA
    make_info                      sun_64 OCI_102 Feb 21 2009
    command_line                   brconnect -u / -jid CHECK20100331123000 -c -f check
    alert_log                      /oracle/DEV/saptrace/background/alert_DEV.log
    BR0280I BRCONNECT time stamp: 2010-03-31 12.30.56
    BR0813I Schema owners found in database DEV:
    DBSNMP, DIP, OPS$DEVADM, OPS$ORADEV, OPS$SAPSERVICEDEV, ORACLE_OCM, OUTLN, SAPSR3*, SYS, SYSTEM,
    TSMSYS
    BR0118I Tablespaces and data files
    Tablespace     Status     File                                               Status     Id.        Size      MaxSize     IncrSize  BlkSize      Device  Type  Link
    PSAPSR3        ONLINE+    /oracle/DEV/sapdata2/sr3_1/sr3.data1               ONLINE+     4   2411732992  10485760000     20971520     8192    16777219  FILE  NOLINK
    SYSTEM         ONLINE+    /oracle/DEV/sapdata1/system_1/system.data1         SYSTEM+     1   1017126912  10485760000     20971520     8192    16777219  FILE  NOLINK
    BR0119I Redo log files
    File                                          Status  Group       Size       Device  Type  Link
    /oracle/DEV/origlogA/log_g11m1.dbf            INUSE      1    52429312     16777218  FILE  NOLINK
    /oracle/DEV/mirrlogA/log_g11m2.dbf            INUSE      1    52429312     16777218  FILE  NOLINK
    /oracle/DEV/origlogB/log_g12m1.dbf            INUSE      2    52429312     16777218  FILE  NOLINK
    /oracle/DEV/mirrlogB/log_g12m2.dbf            INUSE      2    52429312     16777218  FILE  NOLINK
    /oracle/DEV/origlogA/log_g13m1.dbf            INUSE      3    52429312     16777218  FILE  NOLINK
    /oracle/DEV/mirrlogA/log_g13m2.dbf            INUSE      3    52429312     16777218  FILE  NOLINK
    /oracle/DEV/origlogB/log_g14m1.dbf            INUSE      4    52429312     16777218  FILE  NOLINK
    /oracle/DEV/mirrlogB/log_g14m2.dbf            INUSE      4    52429312     16777218  FILE  NOLINK
    BR0120I Control files
    File                                                Size       Device  Type  Link
    /oracle/DEV/origlogA/cntrl/cntrlDEV.dbf         15024128     16777218  FILE  NOLINK
    /oracle/DEV/origlogB/cntrl/cntrlDEV.dbf         15024128     16777218  FILE  NOLINK
    /oracle/DEV/sapdata1/cntrl/cntrlDEV.dbf         15024128     16777219  FILE  NOLINK
    BR0982I Database disk volumes
    Directory / Raw disk                          Device      Total[KB]      Free[KB]    Used[%]   MaxNeed[KB]   MaxMiss[KB]
    /oracle/DEV/102_64                          16777218     480700086     404332206      15.89             0             0
    /oracle/DEV                                 16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/mirrlogA                        16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/mirrlogB                        16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/origlogA                        16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/origlogB                        16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/sapdata1                        16777219     591212116     404332206      31.61     240019884             0
    /oracle/DEV/sapdata2                        16777219     591212116     404332206      31.61     240019884             0
    /oracle/DEV/sapdata3                        16777219     591212116     404332206      31.61     240019884             0
    /oracle/DEV/sapdata4                        16777219     591212116     404332206      31.61     240019884             0
    /oracle/DEV/saparch                         16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/sapbackup                       16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/sapcheck                        16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/sapreorg                        16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/saptrace                        16777218     480700086     404332206      15.89             0             0
    /oracle/DEV/oraarch                         16777218     480700086     404332206      15.89             0             0
    BR0280I BRCONNECT time stamp: 2010-03-31 12.31.29
    BR0814I Number of tables in schema of owner SAPSR3: 74582
    BR0836I Number of info cube tables found for owner SAPSR3: 49
    BR0814I Number of tables/partitions in schema of owner SYS: 625/189
    BR0814I Number of tables/partitions in schema of owner SYSTEM: 134/27
    BR0280I BRCONNECT time stamp: 2010-03-31 12.32.28
    BR0815I Number of indexes in schema of owner SAPSR3: 89159
    BR0815I Number of indexes/partitions in schema of owner SYS: 678/199
    BR0815I Number of indexes/partitions in schema of owner SYSTEM: 175/32
    BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
    BR0816I Number of segments in schema of owner DBSNMP: 25
    BR0816I Number of segments in schema of owner OPS$DEVADM: 1
    BR0816I Number of segments in schema of owner OUTLN: 9
    BR0816I Number of segments/LOBs in schema of owner SAPSR3: 168369/2314
    BR0816I Number of segments/LOBs in schema of owner SYS: 1831/87
    BR0816I Number of segments/LOBs in schema of owner SYSTEM: 353/22
    BR0816I Number of segments in schema of owner TSMSYS: 4
    BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
    BR0961I Number of conditions found in DBCHECKORA: 118
    BR0983I Tablespace fragmentation
    Tablespace    Files   Tables  Indexes    Extents     Total[KB]   Used[%]     Free[KB]   FreeExt.   MaxSize[KB]   MaxAlloc[KB]   Used[%]       Free[KB]       Largest[KB]
    PSAPSR3          16    74248    88689     209864     54138880     94.51      2970752        240     163840000+     109701120+    31.23+     112671872+       9246720:7966720:7946240:7905280:7905280+
    PSAPSR3701       14        0        0          0     54466560      0.00     54465664         20     143360000+      88893440+     0.00+     143359104+       9021440:8192000:8192000:8192000:8192000+
    PSAPSR3701X       4      310      445      12190     68342784     94.20      3962240          7      68342784              0     94.20        3962240        1298432:1191936:979968:163776:163776
    PSAPSR3USR        1       24       25         51        51200      6.50        47872          1      10240000+      10188800+     0.03+      10236672+      10188800+:47872:0:0:0
    PSAPTEMP          1        0        0          0      1433600      0.00      1433600          0      10240000+       8806400+     0.00+      10240000+       8806400+:0:0:0:0
    PSAPUNDO          1        0        0          0      7823360      0.00      7823296        406      10240000+       2416640+     0.00+      10239936+       2416640+:2041792:1814464:1433536:603072
    SYSAUX            1      254      284       2059       307200     93.35        20416         16      10240000+       9932800+     2.80+       9953216+       9932800+:13248:3072:1024:640
    SYSTEM            1      505      569       2926       993280     98.91        10816          2      10240000+       9246720+     9.59+       9257536+       9246720+:10176:640:0:0
    Total:           39    75341    90012     227090    187556864     62.29     70734656        692     426742784      239185920     27.38      309920576       60157952:19463744:18936384:17695616:16864768
    BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
    BR0301E SQL error -1031 at location BrDbdiffRead-1, SQL statement:
    'PREPARE stmt_5 STATEMENT FROM'
    'SELECT OBJNAME FROM "SAPSR3".DBDIFF WHERE DBSYS IN ('ORACLE', ' ') AND OBJTYPE = 'TABL' AND DIFFKIND IN ('02', '61', '99') ORDER BY OBJNAME'
    ORA-01031: insufficient privileges
    BR0806I End of BRCONNECT processing: cecxekdh.chk 2010-03-31 12.37.00
    BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
    BR0804I BRCONNECT terminated with errors

    Hi,
           It solved after change permission of directory that sapdba_role.sql kept to oradev:dba after that it can write sapdba_role.log.
          Thank you for your guideline.
          Now, I can ran 'Check database' via DB13 without that error.
    Best regards,
    Choosak B.

Maybe you are looking for

  • Trying to re-install original OS X 10.3 but get iDVDTheme error

    Hi I am losing my mind... I tried to do a clean install of my Mac OS 10.3 on my mac mini 1.25ghz G4. I firstly tried to boot up from the install disk and got kernel panic errors. After some time and forcing a restart I was able to startup with my ori

  • Saving a booklet as a PDF to print?

    So in InDesign CS4 I've made a 24 page booklet on my Mac. Each  page is of an A5 size and horizontal, so when you see the spread, there  are 2 A5 pages to be printed onto each A4 piece of paper. So 24 A5 pages  in total means 12 A4 pages. In the InDe

  • NSMutableString getCString misbehaves, does not show some characters

    Hi everyone, This is my first time here. I have written a small tool for Cocoa / MacOSX 10.5 and I am trying to save a text to a file, but some characters such as # appear as hex 0x0. Source: ----- int len = [results length] * sizeof(char); char *buf

  • Help with setting a 2nd Standby Database

    Hi, I have an active DataGuard 11gR2 with a physical standby actively running on Linux. Now, I need to add a 2nd physical Standby database (for reads only) to this environment, can someone please point to a resource/document which discusses the steps

  • How to cache external resource bundles?

    Hi, I am using Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923 on Windows 7. We have used external resource bundle for our ADF application using loadbundle which extends java.util.ListResourceBundle. Is there any way to cache these external resourc