ORA-01031 Unsufficient privileges

Hello,
I'm facing a weird issue.
When logging with a specific user onto sqlplus, i'm able to issue a request which give me output.
However when the very same request is issued from the web server i get the ORA-01031 error.
I'm running Oracle 11.2.0.1.0.
Regards,

Ok, hereunder some more details:
On the Dtabase itself:
sqlplus TSTR@oratest
select ORGANIZATION_CODE, ORGANIZATION_NAME, ROOT_ID, ACCOUNT_NUMBER, STATUS_CODE, EXTERNAL_ID, ORGANIZATION_TYPE, SITE_ID, GDS_BUSINESS_PROFILE, COMPANY_RESOURCE_ID, COMPANY_RULE_ID, COM_COMPANY_RESOURCE_ID, COM_COMPANY_RULE_ID, LOGO_URL, BILLING_ACCOUNT_ID from COMPANY_ORGANIZATION where COMPANY_ORGANIZATION_ID = 1 and EXPIRY_DATE is null ;
And it works.
On the web server:
Pool is configured for the jboss using the very same information, configuration is done like this:
<Resource name="tstrPool" auth="Container" type="javax.sql.DataSource" maxActive="20" maxIdle="3" maxWait="20" username="TSTR" password="password" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@ip:1521:oratest"/>
The same request is issued, and we get ORA-01031 error.
If i tried once more on the db itself, the request is still workable...
After some investigations, i found that when the error is raised through the web server, i'm not able to kill TSTR session on the db anymore.
Restarting the database solved the problem for the web server, but i know that will not last long.
Any insight?

Similar Messages

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

  • ORA-01031: insufficient privileges and shared memory realm does not exist

    Hi all,
    I came to a dead end to start oracle 10.2 database. I have searched on google and this forum, none of these solutions work for me. PS, I have installed 11g on my machine too.
    I have set up ORACLE_SID,ORACLE_HOME to 10.2 database based on the tnsnames.ora.
    follow is error message:
    sqlplus sys as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 3 02:09:54 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    ERROR:
    ORA-01031: insufficient privileges
    sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Apr 3 02:10:55 2013
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn / as sysdba
    ERROR:
    ORA-01031: insufficient privileges
    SQL> conn scott/tiger
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    First I thought the instance has been start yet, but since I can't login with sysdba. I don't know what other options.
    For 10.2, the tnsnames.ora
    ORA102 =
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST =XXX)(PORT = 1523))+
    +(CONNECT_DATA =+
    +(SERVER = DEDICATED)+
    +(SERVICE_NAME = ora102)+
    +)+
    +)+
    LISTENER_ORA102 =
    +(ADDRESS = (PROTOCOL = TCP)(HOST =XXX)(PORT = 1523))+
    EXTPROC_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))+
    +)+
    +(CONNECT_DATA =+
    +(SID = PLSExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    listener.ora:
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /data/oracle/ora102)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
    (ADDRESS = (PROTOCOL = TCP)(HOST =XXXXX)(PORT = 1523))
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )

    try do this steps on server side:
    1) sqlplus sys as sysdba
    2) select open_mode from v$database;
    show result 2 step

  • Error while Creating Master Repository: ORA-01031: insufficient Privileges

    Hi,
    I'm trying to install ODI into my VM.
    I have done the installation and while creating Master Repository, I'm getting following error:
    ORA-01031: insufficient Privileges
    I'm using Oracle & have created user as ODI_MASTER with Admin Privileges.
    I'll be using it to load metadata onto planning (Version 11.1.2)
    Is there anything that I'm missing out on.
    Jitendra.

    Seems missing grants on the user you are using to create Master Repository.
    you are using Oracle .. grant connect, resource to <your_user>. These two rolesa have sufficient access to db to create the master repository.
    execuute the sql from sys user
    Regards,
    Amit
    Edited by: amitgupta1202 on 20 Aug, 2009 10:42 PM

  • ORA-01031: insufficient privileges

    Hi Everyone,
    I am facing a weird scenario. In this I am creating a test user and after creating and granting the required privilieges I am executing a procedure in this user.
    The steps are as follows:
    SQL> REM ***
    SQL> connect sys/**** as sysdba
    Connected.
    SQL> REM ****
    SQL> REM grant privileges to the test user
    SQL> grant connect, resource, create table, create view, alter session,
    2 create sequence, create session, create procedure to tester ;
    Grant succeeded.
    SQL> grant unlimited tablespace to tester ;
    Grant succeeded.
    SQL> grant execute on dbms_lock to tester ;
    Grant succeeded.
    SQL> grant create any procedure to tester ;
    Grant succeeded.
    SQL>
    SQL> connect tester/tester
    ERROR:
    ORA-01031: insufficient privileges
    Warning: You are no longer connected to ORACLE.
    SQL> set serveroutput on
    SQL> REM ******
    SQL> declare
    <block of code>
    SP2-0640: Not connected
    SQL> SQL>
    I am executing this process in loop for about 4 times and each time the test user is connected successfully in 1st and 4th run while in 2nd and 3rd run it throws privileges error? Any idea why this error is ocurring?

    SQL> create user test identified by test ;
    User created.
    SQL> grant connect, resource, create table, create view, alter session,create sequence, create session, create procedure to test;
    Grant succeeded.
    SQL> conn test/test ;
    Connected.
    SQL>

  • ORA-01031: insufficient privileges when creating a table in other schema

    Dear all,
    I appreciate your help please in this issue :
    when i try to issue the below statement to create a table in an another schema than the user i am connected in
    CREATE TABLE SCHEMA_NAME_B.HST_ARCH nologging AS
    SELECT *
    FROM HST
    WHERE 1 = 0;
    I always get ORA-01031: insufficient privileges error, even if i have granted the create table privilege to the user i am connected in.
    What other privileges should i grant also,
    Please if you have any idea.

    user562674 wrote:
    Dear all,
    I appreciate your help please in this issue :
    when i try to issue the below statement to create a table in an another schema than the user i am connected in
    CREATE TABLE SCHEMA_NAME_B.HST_ARCH nologging AS
    SELECT *
    FROM HST
    WHERE 1 = 0;
    I always get ORA-01031: insufficient privileges error, even if i have granted the create table privilege to the user i am connected in.
    What other privileges should i grant also,
    Can you show us a cut/paste from the sql*plus of session of yours which should show that you have given the privilege directly to this user and after that the command fails?
    Aman....

  • Ora-01031: Insufficient Privileges error during 10g install on Suse 9.1

    I have tried installing Oracle 10g on Suse 9.1 Professional several times. Although I have tried to carefully follow the instructions in the installation guide, I get the following error.
    When the Database Configuration Assistant start during the initial installation, I receive the error -> Ora-01031: Insufficient Privileges.
    I created the oinstall and dba group according to the installation guide and made oracle a member with oinstall being the primary group. I also ran -> chown -R oracle:oinstall -> on the Oracle_Base folder to which I want to install the software and oradata files. Similarly, I ran -> chmod -R 775 -> on that folder. During the install I ran the script -> oracle_base/oraInventory/orainstRoot.sh -> during the installation when prompted.
    I would really appreciate any help that any of you could provide. Thank you so much in advance.
    -Daniel

    I'm logged in as oracle when I perform the installation but as soon as the database configuration assistant tries to create the database I get this error. I had made oracle a member of oinstall and dba just as it was desribed in the instructions. (At one point I even tried giving oracle root, which didn't seem to work either. I have since reinstalled the OS.)
    Thank you for helping me with this!

  • Ora-01031: Insufficient Privileges during 10g install on Suse 9.1

    I have tried installing Oracle 10g on Suse 9.1 Professional several times. Although I have tried to carefully follow the instructions in the installation guide, I get the following error.
    When the Database Configuration Assistant start during the initial installation, I receive the error -> Ora-01031: Insufficient Privileges.
    I created the oinstall and dba group according to the installation guide and made oracle a member with oinstall being the primary group. I also ran -> chown -R oracle:oinstall -> on the Oracle_Base folder to which I want to install the software and oradata files. Similarly, I ran -> chmod -R 775 -> on that folder. During the install I ran the script -> oracle_base/oraInventory/orainstRoot.sh -> during the installation when prompted.
    I would really appreciate any help that any of you could provide. Thank you so much in advance.
    -Daniel

    I'm logged in as oracle when I perform the installation but as soon as the database configuration assistant tries to create the database I get this error. I had made oracle a member of oinstall and dba just as it was desribed in the instructions. (At one point I even tried giving oracle root, which didn't seem to work either. I have since reinstalled the OS.)
    Thank you for helping me with this!

  • Logical standby: ORA-01031: insufficient privileges

    Dear Colleagues,
    Today in my Logical Standby don't apply archivelogs and I see an error in alert.log:
    ORA-26808: Apply process AS01 died unexpectedly.
    ORA-01031: insufficient privileges
    Also I see next logs in trace files:
    h4.
    1)
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Data Mining and Real Application Testing options
    ORACLE_HOME = /ora/Ora11203
    System name: Linux
    Node name: base
    Release: 2.6.18-308.20.1.el5
    Version: #1 SMP Tue Nov 6 04:38:29 EST 2012
    Machine: x86_64
    Instance name: oracle
    Redo thread mounted by this instance: 1
    Oracle process number: 43
    Unix process pid: 16634, image: oracle@base (AS01)
    *** 2013-04-04 16:58:47.062
    *** SESSION ID:(146.16811) 2013-04-04 16:58:47.062
    *** CLIENT ID:() 2013-04-04 16:58:47.062
    *** SERVICE NAME:(SYS$USERS) 2013-04-04 16:58:47.062
    *** MODULE NAME:(Streams) 2013-04-04 16:58:47.062
    *** ACTION NAME:( - Apply Server) 2013-04-04 16:58:47.062
    knasplcr: eager error was not rolled back
    ++ LCR Dump Begin: 0x2b0cf2a6d168 - ddl
    op: 5, Original op: 5, baseobjn: 0, objn: 0, objv: 0
    DF: 0x00000002, DF2: 0x00000010, MF: 0x00020810, MF2: 0x00000000
    PF: 0x00000000, PF2: 0x08000000
    MergeFlag: 0x00, FilterFlag: 0x00
    Id: 0, iotPrimaryKeyCount: 0, numChgRec: 1
    NumCrSpilled: 0
    RedoThread#: 1, rba: 0x0213d7.00023455.01ac
    scn: 0x0002.fc0f8769, (scn: 0x0000.00000000, scn_sqn: 0, lcr_sqn: 0)xid: 0x0019.00e.0007f8d9, parentxid: 0x0019.00e.0007f8d9, proxyxid: 0x0000.000.00000000
    ncol: 0 newcount: 24, oldcount: 0
    LUBA: 0x4.1000ad1.e.0.0
    ++ LCR Dump Begin: 0x59b1afdc8 - commit
    op: 7, Original op: 7, baseobjn: 0, objn: 0, objv: 0
    DF: 0x00000002, DF2: 0x00000010, MF: 0x00220000, MF2: 0x02000000
    PF: 0x00100000, PF2: 0x08040000
    MergeFlag: 0x03, FilterFlag: 0x00
    Id: 3, iotPrimaryKeyCount: 0, numChgRec: 0
    NumCrSpilled: 0
    RedoThread#: 1, rba: 0x0213d7.00023456.0108
    scn: 0x0002.fc0f876b, (scn: 0x0002.fc0f876b, scn_sqn: 1, lcr_sqn: 1)xid: 0x0019.00e.0007f8d9, parentxid: 0x0019.00e.0007f8d9, proxyxid: 0x0000.000.00000000
    ncol: 0 newcount: 0, oldcount: 0
    LUBA: 0x4.1000ad1.e.0.0
    Apply Slave is exiting due to error ORA-1031KSV 1031 error in slave process
    *** 2013-04-04 16:58:47.067
    ORA-01031: insufficient privileges
    OPIRIP: Uncaught error 447. Error stack:
    ORA-00447: fatal error in background process
    ORA-01031: insufficient privileges
    h4.
    2)
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Data Mining and Real Application Testing options
    ORACLE_HOME = /ora/Ora11203
    System name: Linux
    Node name: base
    Release: 2.6.18-308.20.1.el5
    Version: #1 SMP Tue Nov 6 04:38:29 EST 2012
    Machine: x86_64
    Instance name: oracle
    Redo thread mounted by this instance: 1
    Oracle process number: 30
    Unix process pid: 16404, image: oracle@base (LSP0)
    *** 2013-04-04 16:41:58.401
    *** SESSION ID:(294.35251) 2013-04-04 16:41:58.401
    *** CLIENT ID:() 2013-04-04 16:41:58.401
    *** SERVICE NAME:(SYS$BACKGROUND) 2013-04-04 16:41:58.401
    *** MODULE NAME:() 2013-04-04 16:41:58.401
    *** ACTION NAME:() 2013-04-04 16:41:58.401
    knahcapplymain: encountered error=26808
    *** 2013-04-04 16:41:58.401
    dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x0, level=0, mask=0x0)
    ----- Error Stack Dump -----
    ORA-26808: Apply process AS02 died unexpectedly.
    ORA-01031: insufficient privileges
    KNACDMP: *******************************************************
    KNACDMP: Dumping apply coordinator's context at 25487cb0
    KNACDMP: Apply Engine # 0
    KNACDMP: Apply Engine name
    KNACDMP: Coordinator's Watermarks ------------------------------
    KNACDMP: Apply High Watermark = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Apply Low Watermark = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Recovery Low Watermark = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Fetch Low Watermark = 0002fc0f876b (SCN=0x0002.fc0f876b)
    KNACDMP: Fetch Low Watermark Time = 811857327
    KNACDMP: Oldest SCN = (SCN=0x0000.00000000)
    KNACDMP: Oldest XID =
    KNACDMP: Oldest Create Time = 0
    KNACDMP: Last replicant syncpoint SCN = 0x0000.00000000
    KNACDMP: Last syncpoint at primary SCN = 0x0002.fc0f875f
    KNACDMP: First partition max pos = 0002fc10fab4 (SCN=0x0002.fc10fab4)
    KNACDMP: Last partition max pos = 0002fc10fab4 (SCN=0x0002.fc10fab4)
    KNACDMP: Last processed = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Conservative pos = 0002fc0f8cb2 (SCN=0x0002.fc0f8cb2)
    KNACDMP: Recovery start pos = (SCN=0x0000.00000000)
    KNACDMP: Recovery high watermark = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Spill LWM = (SCN=0x0000.00000000)
    KNACDMP: Spill LWM Create Time = 0
    KNACDMP: Coordinator's constants -------------------------------
    KNACDMP: number of apply slaves = 5
    KNACDMP: min number of apply slaves = 5
    KNACDMP: max number of apply slaves = 5
    KNACDMP: safety level (K) = 1
    KNACDMP: max txns in memory = 400
    KNACDMP: max constraints per table = 620
    KNACDMP: hash table size (in entries) = 10000000
    KNACDMP: Coordinator's intervals -------------------------------
    KNACDMP: syncpoint interval (ms) = 0
    KNACDMP: write low watermark interval(ms)= 1
    KNACDMP: Coordinator's timers/counters -------------------------
    KNACDMP: current time = 1365082918
    KNACDMP: low watermark timer = 0
    KNACDMP: syncpoint timer = 1365082918
    KNACDMP: txnbufsize timer = 1365082220
    KNACDMP: Coordinator's txn counts -------------------------
    KNACDMP: total txns applied = 0
    KNACDMP: number of unassigned comp txns = 0
    KNACDMP: number of unassigned incomp txns= 0
    KNACDMP: avg number of unassigned txns = 0.00
    KNACDMP: total applied at last plwm write= 0
    KNACDMP: apply prog. entries below plwm = 0
    KNACDMP: total unassigned lcrs = 0
    KNACDMP: Coordinator's State/Flags -----------------------------
    KNACDMP: Coordinator's State = KNACST_APPLY_UNTIL_END
    KNACDMP: Coordinator's Flags = 0x408004
    KNACDMP: Slave counts ------------------------------------------
    KNACDMP: number of reserved slaves = 0
    KNACDMP: number of admin slaves = 0
    KNACDMP: number of slaves in wait cmt = 1
    KNACDMP: number of slaves suspended = 0
    KNACDMP: number of safe slaves = 1
    KNACDMP: avg number of idle slaves = 0.00
    KNACDMP: number of slaves initializing = 0
    KNACDMP: number of slaves terminating = 0
    KNACDMP: Slave Lists -------------------------------------------
    KNACDMP: Dumping All Slaves :-
    Slave id = 0, State = 8, Flags = 0, Not Assigned 0 txns 0 lcrs
    Slave id = 1, State = 9, Flags = 2, Assigned Xid = 0x001e.006.0005d213 1 txns 0 lcrs
    Slave id = 2, State = 5, Flags = 1, Assigned Xid = 0x0019.00e.0007f8d9 1 txns 0 lcrs
    Slave id = 3, State = 0, Flags = 0, Not Assigned 0 txns 0 lcrs
    Slave id = 4, State = 0, Flags = 0, Not Assigned 0 txns 0 lcrs
    Slave id = 5, State = 0, Flags = 0, Not Assigned 0 txns 0 lcrs
    KNACDMP: End dumping all slaves
    KNACDMP: syncdep slaves = { }
    KNACDMP: cont chunk slaves = { }
    KNACDMP: cont slaves = { }
    KNACDMP: exec txn slaves = { }
    KNACDMP: Active slaves (2) = { 1 2 }
    KNACDMP: Idle slaves (3) = { 3 4 5 }
    KNACDMP: Txn Lists ---------------------------------------------
    KNACDMP: Dumping all txns :-
    XID = 0x001e.006.0005d213 Commit pos = 0002fc06718c (SCN=0x0002.fc06718c) State = 0
    Lcr cnt = 0
    Assigned to slavid = 1
    Fetched chunks = 142
    depslaves = { } wm depslaves = { }
    XID = 0x0019.00e.0007f8d9 Commit pos = 0002fc0f876b (SCN=0x0002.fc0f876b) State = 1
    Lcr cnt = 0
    Assigned to slavid = 2
    Fetched chunks = 1
    depslaves = { } wm depslaves = { }
    KNACDMP: End dumping all txns.
    KNACDMP: Complete txns = { 0x0019.00e.0007f8d9 ** NO UNASS ** }
    KNACDMP: Unassigned txns = { }
    KNACDMP: *******************************************************
    Warning: Apply error received: ORA-26714: User Error encountered during apply process. Clearing.
    knahcapplymain: encountered error=26808
    *** 2013-04-04 16:58:47.073
    dbkedDefDump(): Starting a non-incident diagnostic dump (flags=0x0, level=0, mask=0x0)
    ----- Error Stack Dump -----
    ORA-26808: Apply process AS01 died unexpectedly.
    ORA-01031: insufficient privileges
    KNACDMP: *******************************************************
    KNACDMP: Dumping apply coordinator's context at 25487cb0
    KNACDMP: Apply Engine # 0
    KNACDMP: Apply Engine name
    KNACDMP: Coordinator's Watermarks ------------------------------
    KNACDMP: Apply High Watermark = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Apply Low Watermark = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Recovery Low Watermark = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Fetch Low Watermark = 0002fc0f876b (SCN=0x0002.fc0f876b)
    KNACDMP: Fetch Low Watermark Time = 811857327
    KNACDMP: Oldest SCN = (SCN=0x0000.00000000)
    KNACDMP: Oldest XID =
    KNACDMP: Oldest Create Time = 0
    KNACDMP: Last replicant syncpoint SCN = 0x0000.00000000
    KNACDMP: Last syncpoint at primary SCN = 0x0002.fc0f875f
    KNACDMP: First partition max pos = 0002fc10fab4 (SCN=0x0002.fc10fab4)
    KNACDMP: Last partition max pos = 0002fc10fab4 (SCN=0x0002.fc10fab4)
    KNACDMP: Last processed = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Conservative pos = 0002fc0f8cb2 (SCN=0x0002.fc0f8cb2)
    KNACDMP: Recovery start pos = (SCN=0x0000.00000000)
    KNACDMP: Recovery high watermark = 0002fc0f875f (SCN=0x0002.fc0f875f)
    KNACDMP: Spill LWM = (SCN=0x0000.00000000)
    KNACDMP: Spill LWM Create Time = 0
    KNACDMP: Coordinator's constants -------------------------------
    KNACDMP: number of apply slaves = 5
    KNACDMP: min number of apply slaves = 5
    KNACDMP: max number of apply slaves = 5
    KNACDMP: safety level (K) = 1
    KNACDMP: max txns in memory = 400
    KNACDMP: max constraints per table = 620
    KNACDMP: hash table size (in entries) = 10000000
    KNACDMP: Coordinator's intervals -------------------------------
    KNACDMP: syncpoint interval (ms) = 0
    KNACDMP: write low watermark interval(ms)= 1
    KNACDMP: Coordinator's timers/counters -------------------------
    KNACDMP: current time = 1365083926
    KNACDMP: low watermark timer = 0
    KNACDMP: syncpoint timer = 1365083926
    KNACDMP: txnbufsize timer = 1365083218
    KNACDMP: Coordinator's txn counts -------------------------
    KNACDMP: total txns applied = 0
    KNACDMP: number of unassigned comp txns = 0
    KNACDMP: number of unassigned incomp txns= 1
    KNACDMP: avg number of unassigned txns = 0.00
    KNACDMP: total applied at last plwm write= 0
    KNACDMP: apply prog. entries below plwm = 0
    KNACDMP: total unassigned lcrs = 0
    KNACDMP: Coordinator's State/Flags -----------------------------
    KNACDMP: Coordinator's State = KNACST_APPLY_UNTIL_END
    KNACDMP: Coordinator's Flags = 0x8204
    KNACDMP: Slave counts ------------------------------------------
    KNACDMP: number of reserved slaves = 0
    KNACDMP: number of admin slaves = 0
    KNACDMP: number of slaves in wait cmt = 0
    KNACDMP: number of slaves suspended = 0
    KNACDMP: number of safe slaves = 1
    KNACDMP: avg number of idle slaves = 0.00
    KNACDMP: number of slaves initializing = 0
    KNACDMP: number of slaves terminating = 0
    KNACDMP: Slave Lists -------------------------------------------
    KNACDMP: Dumping All Slaves :-
    Slave id = 0, State = 8, Flags = 0, Not Assigned 0 txns 0 lcrs
    Slave id = 1, State = 5, Flags = 1, Assigned Xid = 0x0019.00e.0007f8d9 1 txns 0 lcrs
    Slave id = 2, State = 0, Flags = 0, Not Assigned 0 txns 0 lcrs
    Slave id = 3, State = 0, Flags = 0, Not Assigned 0 txns 0 lcrs
    Slave id = 4, State = 0, Flags = 0, Not Assigned 0 txns 0 lcrs
    Slave id = 5, State = 0, Flags = 0, Not Assigned 0 txns 0 lcrs
    KNACDMP: End dumping all slaves
    KNACDMP: syncdep slaves = { }
    KNACDMP: cont chunk slaves = { }
    KNACDMP: cont slaves = { }
    KNACDMP: exec txn slaves = { }
    KNACDMP: Active slaves (1) = { 1 }
    KNACDMP: Idle slaves (4) = { 2 3 4 5 }
    KNACDMP: Txn Lists ---------------------------------------------
    KNACDMP: Dumping all txns :-
    XID = 0x001e.006.0005d213 Commit pos = 0002fc06718c (SCN=0x0002.fc06718c) State = 0
    Lcr cnt = 0
    Not Assigned
    Fetched chunks = 142
    depslaves = { } wm depslaves = { }
    XID = 0x0019.00e.0007f8d9 Commit pos = 0002fc0f876b (SCN=0x0002.fc0f876b) State = 1
    Lcr cnt = 0
    Assigned to slavid = 1
    Fetched chunks = 1
    depslaves = { } wm depslaves = { }
    KNACDMP: End dumping all txns.
    KNACDMP: Complete txns = { 0x0019.00e.0007f8d9 ** NO UNASS ** }
    KNACDMP: Unassigned txns = { 0x001e.006.0005d213 }
    KNACDMP: *******************************************************
    *** 2013-04-04 16:58:47.513
    Warning: Apply error received: ORA-26714: User Error encountered during apply process. Clearing.
    I watched this link http://docs.oracle.com/cd/E11882_01/server.112/e17069/strms_trapply.htm#i1014714 and I checked grants of schemas owners. These grants identical as on Primary DB Server.
    I don't know what I need to do. It's very critical Server. Please help me.

    So, my problem is solved very easy.
    Logical Standby didn't work because I added grant SYSDBA to temporary user and revoked this grant at once and I didn't change orapwSID file on Logical Standby from Primary.
    http://docs.oracle.com/cd/E11882_01/server.112/e25608/create_ps.htm#SBYDB00424Note:
    Whenever you grant or revoke the SYSDBA or SYSOPER privileges or change the login password of a user who has these privileges, you must replace the password file at each physical or snapshot standby database in the configuration with a fresh copy of the password file from the primary database.
    >
    So, I deleted temporary user on Logical Standby and it solved the problem.
    Thanks a lot to all who helped me!

  • 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

  • Oracle does not start automatically ORA-01031: insufficient privileges

    Hi,
    OS WS2008R2.
    ORACLE 11gR2.
    Oracle Instance does not start with oracle services but if i stop and restart the services it comes up clean.
    Moreover if i change service ownership to Domain\Administrator it again works well.
    Checked registery and all ok. No error in alert.log. Only clue found in Oradim.log.
    ORADIM.LOG....
    C:\Oracle\Ora11g\bin\oradim.exe -startup -sid ptdb -usrpwd * -log oradim.log -nocheck 0
    Thu Nov 15 15:16:15 2012
    ORA-01031: insufficient privileges
    Please help
    Thanks

    1- startup type- Auto
    2- Group to user- ORA_DBA
    3 - you can check log on tab in the service properties and set the username and password who responsible about this services
    As i already stated 3 works. but i want it to work under Local System and not under any user.
    Thanks

  • Execute immediate on DBMS_METADATA.GET_DDL with error of ORA-01031: insufficient privileges

    I want to mirror a schema to a existing schema by creating DDL and recreate on the other schema with same name.
    I wrote the code below:
    create or replace
    PROCEDURE                                    SCHEMA_A."MAI__DWHMIRROR"
    AS
    v_sqlstatement CLOB:='bos';
    str varchar2(3999);
    BEGIN
      select
        replace(
          replace(replace(
          replace(DBMS_METADATA.GET_DDL('TABLE','XXXX','SCHEMA_A'),'(CLOB)',''),';','')
        ,'SCHEMA_A'
        ,'SCHEMA_B'
      into v_sqlstatement
      from dual;
      select  CAST(v_sqlstatement AS VARCHAR2(3999)) into str from dual;
      execute immediate ''||str;
    END;
    And Executing this block with below code:
    set serveroutput on
    begin
    SCHEMA_A.MAI__DWHMIRROR;
    end;
    But still getting the following error code:
    Error report:
    ORA-01031: insufficient privileges
    ORA-06512: at "SCHEMA_A.MAI__DWHMIRROR", line 47
    ORA-06512: at line 2
    01031. 00000 -  "insufficient privileges"
    *Cause:    An attempt was made to change the current username or password
               without the appropriate privilege. This error also occurs if
               attempting to install a database without the necessary operating
               system privileges.
               When Trusted Oracle is configure in DBMS MAC, this error may occur
               if the user was granted the necessary privilege at a higher label
               than the current login.
    *Action:   Ask the database administrator to perform the operation or grant
               the required privileges.
               For Trusted Oracle users getting this error although granted the
               the appropriate privilege at a higher label, ask the database
               administrator to regrant the privilege at the appropriate label.

    user5199319 wrote:
    USER has DBA Role
    when all  else fails Read The Fine Manual
    DBMS_METADATA

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

  • Not able to Start the oracle db error "ORA-01031: insufficient privileges"

    Hi experts,
    I have oracle 11g setup on so solaris. i changed the db_cache_size
    & processes values and stopped the DB services after that i am not able to start the oracle DB. Listener is running.
    when i start the db server its giving the below error(startup.log)
    ./dbstart: Starting up database "orcl"
    Mon Sep 27 04:31:08 MDT 2010
    SQL*Plus: Release 11.1.0.7.0 - Production on Mon Sep 27 04:31:08 2010
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    SQL> ERROR:
    ORA-01031: insufficient privileges
    SQL> ORA-01031: insufficient privileges
    SQL>
    ./dbstart: Database instance "orcl" warm started.
    Please help me to ressolve this issue.
    Thanks
    Krishna

    yes, password file is there in /etc/passwd
    here are the contents:
    root:x:0:0:Super-User:/:/sbin/sh
    lroot:x:0:0:Super-User:/:/sbin/sh
    daemon:x:1:1::/:
    bin:x:2:2::/usr/bin:/bin/false
    sys:x:3:3::/:
    adm:x:4:4:Admin:/var/adm:/bin/false
    lp:x:71:8:Line Printer Admin:/usr/spool/lp:/bin/false
    uucp:x:5:5:uucp Admin:/usr/lib/uucp:/bin/false
    nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
    listen:x:37:4:Network Admin:/usr/net/nls:/bin/false
    nobody:x:60001:60001:Nobody:/:/bin/false
    noaccess:x:60002:60002:No Access User:/:/bin/false
    nobody4:x:65534:65534:SunOS 4.x Nobody:/:/bin/false
    itunix:x:50000:14:IT Unix Account:/export/home/itunix:/bin/csh
    hharika:x:765:38:Harpal Harika:/export/home/hharika:/bin/csh
    prsingh:x:795:38:Pradeep Singh:/export/home/prsingh:/bin/csh
    mmir:x:1229:21:Mir Monis Ali:/export/home/mmir:/bin/csh
    bogunnai:x:1207:21:Bose Ogunnaike:/export/home/bogunnai:/bin/ksh
    mpokala:x:2117:21:Mahesh Pokala:/export/home/mpokala:/bin/ksh
    apopov:x:2385:38:Anton Popov:/export/home/apopov:/bin/csh
    kkeith:x:2629:227:Kevin Keith:/home/kkeith:/usr/bin/ksh
    sshd:x:22:22:SSH Privsep:/var/empty:/bin/false
    patrol:x:2784:10:Patrol User:/opt/bmc:/usr/bin/ksh
    smmsp:x:25:25:Sendmail Submission user:/none:/bin/false
    ldap:x:50001:1002::/export/home/ldap:/bin/sh
    perfuser:x:884:268::/export/home/perfuser:/bin/csh
    webservd:x:80:80::/home/webservd:/bin/pfsh
    oracle:x:156:40:Oracle Software Owner:/export/home/oracle:/bin/bash
    perfuser_idc:x:64383:1::/home/perfuser_idc:/bin/sh
    idc_perf:x:64384:292::/home/idc_perf:/bin/sh

  • 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

Maybe you are looking for

  • Shuttle like region with two leading lists

    I need to create a shuttle like region on a custom OAF page for users to dynamically build a formula . The user should be able to select from two lists, one list has list of fields like width, gauge, weight etc The second list has list of mathematica

  • How to design model for staging layer.

    Hi expert,      what is the rule when design staging layer? such as how much layer needed for staging? and what objects used in staging? why different layers needed for staging .etc.?

  • What java editor do you suggest?

    What do you think is best? I'm currently using NotePad and JBuilder but I don't really like JBuilder.

  • Programmatic Skinning Button

    I have created button inside a class. I want to skin it using image. I have written following line btn.setStyle("upSkin","img.jpg"); But it gives error. Can some body please help me .

  • Getting Error in b2b.log AIP-50075: Cannot find Document Exchange Plugin

    Hi Gurus, I have a configuration in which Oracle B2B has to pick messages from a filesystem. I have created IDCs to pick messages from the path configured. But Oracle B2B is not picking up the file from the path specified. When I went to b2b.log to l