STATSPACK.SNAP GOT ORA-1652 ON 11.1

Hi,
This is related to bug BUG:8323663/8226792 in 11.1 and Oracle support has confirmed that this is fixed in 11.2. They have not provided any fix in 11.1.
However, if you are stuck with 11.1 database, you can use the following solution as a fix to this issue:
1. Connect to the database as sys
2. Recreate the following view with the below command:
create or replace view STATS$V_$FILESTATXS as
select /*+RULE */ ts.name      tsname
, df.name filename
, fs.phyrds
, fs.phywrts
, fs.readtim
, fs.writetim
, fs.singleblkrds
, fs.phyblkrd
, fs.phyblkwrt
, fs.singleblkrdtim
, fw.count wait_count
, fw.time time
, df.file#
from x$kcbfwait fw
, v$filestat fs
, v$tablespace ts
, v$datafile df
where ts.ts# = df.ts#
and fs.file# = df.file#
and fw.indx+1 = df.file#;
3. Run the statspack.snap procedure and it should run quicker.
Enjoy...
Pranilesh Chand

hello,
running now a snap as perfstat user I get this error
SQL> exec statspack.snap;
BEGIN statspack.snap; END;
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_SHARED_POOL" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"SYS.DBMS_SHARED_POOL"
ORA-06512: at "PERFSTAT.STATSPACK", line 5767
ORA-06512: at line 1
In fact
SQL> select owner,object_name,object_type from dba_objects where status='INVALID
2 order by object_name;
OWNER OBJECT_NAME OBJECT_TYPE
SYS DBMS_SHARED_POOL PACKAGE BODY
PUBLIC STATSPACK SYNONYM
Trying to recompile as sysdba I get
Connected to:
Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
SQL> alter package dbms_shared_pool compile body;
Warning: Package Body altered with compilation errors.
SQL> show errors
Errors for PACKAGE BODY DBMS_SHARED_POOL:
LINE/COL ERROR
87/13 PLS-00323: subprogram or cursor 'PURGE' is declared in a package
specification and must be defined in the package body
Could it be that t was my first 10.2.0.3 spcreate.sql putting the package in this state?
I don't suppose so and that the package was already invalid before... but not sure...
How to correct? I found similar cases where Oracle oly suggested catalog/catproc runs... but I would like to avoid if possible...
Thanks in advance

Similar Messages

  • Unique Constraint error while executing statspack.snap procedure

    The following is the error which popped up when i was trying to execute statspack.snap procedure from perfstat user:
    ORA-00001: unique constraint (PERFSTAT.STATS$LATCH_CHILDREN_PK) violated
    ORA-06512: at "PERFSTAT.STATSPACK", line 1619
    ORA-06512: at "PERFSTAT.STATSPACK", line 71
    ORA-06512: at line 1
    How could i resolve such a problem, as all the constraints and objects for this user are created while running the oracle supplied script 'spcreate.sql'.
    If any 1 knows how to handle such a situation , can come forward n please help me out.

    SQL> execute statspack.snap (i_snap_level=>10);
    ERROR at line 1:
    ORA-00001: unique constraint (PERFSTAT.STATS$LATCH_CHILDREN_PK) violated
    ORA-06512: at "PERFSTAT.STATSPACK", line 1619
    ORA-06512: at "PERFSTAT.STATSPACK", line 71
    ORA-06512: at line 1
    Cause
    -- Its because of the bug # 2384758.
    "STATSPACK.SNAP GIVES ORA-1 ON STATS$LATCH_CHILDREN_PK WHEN I_SNAP_LEVEL=>10"
    -- The STATS$LATCH_CHILDREN table has a primary key constraint on (snap_id, dbid, instance_number, latch#, child#).
    Fix
    -- This is fixed in 9.0.2 and will not be backported to earlier versions because the level 10 is not a normal level to be setting unless requested by oracle support.

  • ORA-1652: unable to extend temp

    Hi,
    We faced a problem with one of r billing process which normally takes 25-30 min was running for over 5 hrs and in the end gave a rollback error....when the process was re-started it got completed in 35 min....
    Tue Jan 1 22:48:33 2008
    ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
    Tue Jan 1 22:48:37 2008
    GATHER_STATS_JOB encountered errors. Check the trace file.
    Tue Jan 1 22:48:37 2008
    Errors in file /oracle/databases/bluedart/bdump/bluedart_j001_19817.trc:
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP

    Hi,
    Which version ?
    R u using LMTS or DMTS ?
    How much space u have allocated for your Temp Tbsp?
    Generate the statspack report or V$ tables which query or process involved in that report?
    Regards,
    Suresh

  • Getting error while running statspack.snap

    Hi,
    I am getting the following error while running statspack.snap:
    ERROR at line 1:
    ORA-00001: unique constraint (PERFSTAT.STATS$SQL_SUMMARY_PK) violated
    ORA-06512: at "PERFSTAT.STATSPACK", line 1361
    ORA-06512: at "PERFSTAT.STATSPACK", line 2471
    ORA-06512: at "PERFSTAT.STATSPACK", line 91
    ORA-06512: at line 1
    If anyone can help me out on this issue...then please write me.
    Thanks
    Nikhil.

    What is your Oracle version? environment? operating system?
    How was the perfstat schema created?
    If you have access to Metalink, there are a lot of documents which address similar issues for various versions of Oracle.

  • Uniques constraint violation error while executing statspack.snap

    Hi,
    I have configured a job to run the statspack snap at a interval of 20 min from 6:00 PM to 3:00 AM . Do perform this task , I have crontab 2 scripts : one to execute the job at 6 PM and another to break the job at 3 AM. My Oracle version is 9.2.0.7 and OS env is AIX 5.3
    My execute scripts look like:
    sqlplus perfstat/perfstat <<EOF
    exec dbms_job.broken(341,FALSE);
    exec dbms_job.run(341);
    The problem is , that the job work fine for weekdays but on weekend get aborted with the error :
    ORA-12012: error on auto execute of job 341
    ORA-00001: unique constraint (PERFSTAT.STATS$SQL_SUMMARY_PK) violated
    ORA-06512: at "PERFSTAT.STATSPACK", line 1361
    ORA-06512: at "PERFSTAT.STATSPACK", line 2471
    ORA-06512: at "PERFSTAT.STATSPACK", line 91
    ORA-06512: at line 1
    After looking on to metalink , I came to know that this is one listed bug 2784796 which was fixed in 10g.
    My question is , why there is no issue on weekdays using the same script. There is no activity on the db on weekend and online backup start quite late at night.
    Thanks
    Anky

    The reasons for hitting this bug are explained in Metalink, "...cursors with same sql text (at least 31 first characters), same hash_value but a different parent cursor...", you can also find the workaround in Note:393300.1.
    Enrique

  • How to create a database trigger for automatic run statspack.snap

    Hi,
    I want to create a database trigger to run statspack.snap at startup.
    connect /as sysdba
    grant create any trigger to perfstat;
    connect perfstat/perfstat
    create or replace trigger auto_snap
    after startup on database
    begin
    statspack.snap;
    end;
    after startup on database
    error at line 2:
    ora-01031: insufficient privileges
    connect /as sysdba
    create or replace trigger perfstat.auto_snap
    after startup on database
    begin
    statspack.snap;
    end;
    Trigger created.
    after shutdown and startup the database, the trigger has not been run. (no statspack snapshot)
    What I have done wrong?

    981145 wrote:
    hi... I have created a database link but it is showing some error. Can you please tell me, do we have to update the details in TNSNAMES.ora file regarding the database which i am creating now before creating database link?????
    awaiting for your response,
    Thanks in advanceI'm sorry, but "showing some error" is NOT an actionable error message. Why do you think we can solve your error if you don't tell us what the error is?
    Yes you will need to adjust your tnsnames. When a process in a database_A accesses database_B via a dblink in database_A, the database_A is acting as a client to database_B. At that point database_A is just like sqlplus or sqldeveloper, and all tns considerations are the same.

  • Oracle Alert - ORA-1652 Unable to extend the Temp Segment

    Hi Team,
    During our DB Reorg we have received the Oracle Alert - ORA-1652 Unable to extend the Temp Segment by 15485 in tablespace :PSAPBTABI.
    Our DBReorg got cancelled..
    We would like to know how we can resolve the above error so that we can reschedule the DB Reorg activity..
    Regds,
    Satyanarayana N

    Hi,
    If you are using UNIX OS, the temp files are created as sparse file due to the OS functionality.
    Altough you have assigned 49 GB the actual size will be very very less.
    You can check the actula file size with du or df command. To remove these sparse condition you will need to perform certain steps.
    Read this note and execute the steps given and then see the file size difference.
    548221 - Temporary Files are created as sparse files
    Do update the message if the OS is different.
    Regards,
    Nilesh

  • ORA-1652

    Hi,
      We are running SAP on ECC 5.0 , Oracle 10.2 and windows 2003 x-64 bit. We have tried to export the production system and getting failed several times. The log is as follows.
    DbSl Trace: ORA-1652 occurred when executing SQL statement (parse error offset=754)
    (EXP) ERROR: DbSlExeRead failed
      rc = 99, table "COEP"
      (SQL error 1652)
      error message returned by DbSl:
    ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP
    (DB) INFO: disconnected from DB
    We had run the DB verify and corrected the corrupted datablocks through re-org. The re-org went sucess fully. Again we had run the export and got failed at the same place. This happend several times. We have turned the auto extend on for the tablespace 'PSAPTEMP'. Still no use. Appreciate your help on this.
    Thanks,
    Krishna.

    Hi Krishna,
    ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP
    We have turned the auto extend on for the tablespace 'PSAPTEMP'. Still no use.
    Even if you put the auto extend ON, it has a max size value.. the export still requires more PSAPTEMP, if you've more space at OS level, you should increase the max size of PSAPTEMP so that it can grow more.
    Regards,
    Debasis.

  • ORA-1652: Index creation error

    At the time of table re-organisation, Index creation got aborted for the secondary index creation. then we have continued our activity leaving the index creation due to short of System downtime.
    Again we have run the sql statment when the sap system is up, then it has thrown an error:
    ORA-1652 unable to extend temp segment by 128 in tablespace PSAPTEMP.
    In the current system, we are not ready to increase the size of datafile or resizing.where it leads to the increase the size of database.
    Here we have option to create a new temp tablespace, will delete after index creation, but while doing this how do we point the new tablespace which is created for this activity.
    SAP 4.6c oracle 9 sun solaris.
    Kindly advise what can be done. reply ASAP

    Martin,
    We have discussed with the team like,
    1. Create new temporary tablespace with desired Size which should be minimum 25GB
                CREATE temporary tablespace PSAPTEMP1......
        2. If the original tablespace is a default temporary tablespace, set the new tablespace as default temporary tablespace in the database.
                 SQL> alter database default temporary tablespace PSAPTEMP1;
        3. Perform the index creation
        4. Make the old tablespace PSAPTEMP as the default temporary tablespace.
                 SQL> alter database default temporary tablespace PSAPTEMP
       5. Drop the new tablespace.
                 SQL> drop tablespace temp including contents.
    Here I have a question, while switching the default temporary tablespace from PSAPTEMP to the much bigger new PSAPTEMP1Tablespace whether this will affect the running transaction.
    Any impact on switching the tablespace online..?
    We are performing this activity in the online system(running sap system)
    Thanks,

  • ORA-1652: unable to extend temp segment by 128 in tablespace   TEMP

    Hi All,
    Today in we have faced the below issue in our production database
    ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP
    ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP
    when we checked we are having 99% of free space in temp tablespace,we are not able to understand why we got this error.
    earlier also we got the same issue adding datafile to the tablespace solved the issue. wanted to know if free space exsists why we getting this error.
    Thanks....

    Hi,
    Please check Oracle support id : TROUBLESHOOTING GUIDE (TSG) : ORA-1652: unable to extend temp segment (Doc ID 1267351.1)
    and OTN Form :
    https://forums.oracle.com/thread/457771?start=0&tstart=0
    https://forums.oracle.com/thread/703095?start=0&tstart=0
    Thank you

  • ORA-1652: unable to extend temp segment by 699912 in tablespace ##PSAPTEMP

    Dear Expert
    I found this error ORA-1652: unable to extend temp segment by 699912 in tablespace ##PSAPTEMP. How can I fix this problem. Anyone help me...pls
    best regards

    Hi,
    We had the same error in our Production system.
    That basically occured when there were a lot of Background jobs that were running.
    As more than 5 jobs were running which were utisiling PSAPTEMP to the fullest invariably the jobs got cancelled with a dump and the error u have mentioned
    Though we tried adding 3 datafiles the error kept repeating..
    We finally added almost 20 GB to PSAPTEMP for  those jobs to get completed.

  • ORA-1652: unable to extend temp segment by 128 in tablespace

    HI,
    i am getting an error in alert log file.....
    Thread 1 advanced to log sequence 1758
      Current log# 2 seq# 1758 mem# 0: /dev/vx/rdsk/racdg/orcl_raw_log12
    Mon Sep  8 12:34:16 2008
    ARC1: Evaluating archive   log 1 thread 1 sequence 1757
    ARC1: Beginning to archive log 1 thread 1 sequence 1757
    Creating archive destination LOG_ARCHIVE_DEST_1: '/arch/log/1_1757.dbf'
    ARC1: Completed archiving  log 1 thread 1 sequence 1757
    Mon Sep  8 13:04:26 2008
    Completed checkpoint up to RBA [0x6de.2.10], SCN: 0x0000.6c1f757f
    Mon Sep  8 13:49:16 2008
    ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMPI don';t want to add datafile
    SQL> select bytes,maxbytes,increment_by from dba_temp_files;
         BYTES   MAXBYTES INCREMENT_BY
    6134169600          0            0
    SQL> select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;
    TABLESPACE_NAME                BYTES_USED BYTES_FREE
    TEMP                           6037700608   96468992i have also referred metalink note: 19047.1
    Is there any way to avoid this problem without adding any datafile........

    how to find out which session is using temp tablespace
    SQL> select * from v$sort_usage;
    USERNAME                       USER                           SESSION_ADDR
    SESSION_NUM SQLADDR             SQLHASH TABLESPACE
    CONTENTS  SEGTYPE     SEGFILE#    SEGBLK#    EXTENTS     BLOCKS   SEGRFNO#
    DATA3                        DATA3                        000000044D84F558
          25860 00                        0 TEMP
    TEMPORARY DATA             201     183561          1        128          1pls correct me if the above query is worng to find out the no. of session s using temp tablespace
    i think we have already allocated good amt of space to pga_aggregate_target
    SQL> show parameter pga
    NAME                                 TYPE        VALUE
    pga_aggregate_target                 big integer 524288000
    SQL>Edited by: user00726 on Sep 8, 2008 2:29 AM

  • Occasionally got ORA-12545 error

    I have 2-node Oracle 10g RAC set up. From a remote client, i run my sample program to retrieve scott.emp data. Occasionally i got ORA-12545 connection error. Using cpp app and Perl DBI app for tested it. And I got the same problem.
    ./mysample
    Environment and Connection created
    Result Set:
    7369 SMITH CLERK 7902 17-DEC-80 800 0 20
    7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
    7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
    7566 JONES MANAGER 7839 02-APR-81 2975 0 20
    7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
    7698 BLAKE MANAGER 7839 01-MAY-81 2850 0 30
    7782 CLARK MANAGER 7839 09-JUN-81 2450 0 10
    7788 SCOTT ANALYST 7566 19-APR-87 3000 0 20
    7839 KING PRESIDENT 0 17-NOV-81 5000 0 10
    7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
    7876 ADAMS CLERK 7788 23-MAY-87 1100 0 20
    7900 JAMES CLERK 7698 03-DEC-81 950 0 30
    7902 FORD ANALYST 7566 03-DEC-81 3000 0 20
    7934 MILLER CLERK 7782 23-JAN-82 2300 0 10
    Environment and Connection terminated
    ./mysample
    Aborted
    ./select.pl
    DBI connect('lot','scott',...) failed: ORA-12545: Connect failed because target host or object does not exist (DBD ERROR: OCIServerAttach) at ./select.pl line 6
    Here is the sqlnet.log:
    Fatal NI connect error 12545, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XXXXXXXX)(PORT=1521))(LOAD_BALANC
    VERSION INFORMATION:
    TNS for Linux: Version 10.1.0.2.0 - Production
    TCP/IP NT Protocol Adapter for Linux: Version 10.1.0.2.0 - Production
    Time: 15-NOV-2004 10:30:22
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12545
    TNS-12545: Connect failed because target host or object does not exist
    ns secondary err code: 12560
    nt main err code: 515
    TNS-00515: Connect failed because target host or object does not exist
    nt secondary err code: 2
    nt OS err code: 0
    Anyone knows what went wrong?
    thanks,
    qicheng

    I have same problem :-( When I try to connect from client station, but when Im connecting from one of nodes it is OK :-(
    Ales

  • Help on Merge Statement ,I got 'ORA-00904: invalid column name' Error

    Pls help
    In Oracle 9i i implement the following qry
    MERGE INTO jobs A
    USING (select order_no,jOB_SEQ_NO from jobs_dlt) B
    ON (A.ORDER_NO = B.ORDER_NO and A.JOB_SEQ_NO =B.JOB_SEQ_NO )
    WHEN MATCHED THEN
    UPDATE SET
              A.ORDER_NO= B.ORDER_NO ,
              A.JOB_SEQ_NO= B.JOB_SEQ_NO           
    WHEN NOT MATCHED THEN
    INSERT (
              A.JOB_SEQ_NO ,
              A.ORDER_NO
    VALUES (
              B.JOB_SEQ_NO ,
              B.ORDER_NO
    but i got 'ORA-00904: invalid column name' Error
    JOBS table Contain the above Column
    how i implement the Merge Statment
    Thanks in advance
    By
    Sekar

    I seem to recall this error being spuriously (well unhelpfully) thrown if you tried to UPDATE a key that you used in the ON clause, but I could be mistaken.
    For us to recreate this you would need to supply the exact version and scripts to create the tables in question.

  • Ora - 1652 error

    hi,
    today in one of the database alert log i found this error.
    Thu Apr 29 05:46:22 2010
    ORA-1652: unable to extend temp segment by 1504 in tablespace TEMP
    I checked the space availabily of TEMP tablespace,but it is having 1GB free space in it.
    I m not sure of this error.could anybody help me on this.

    Now may be there free space,but if you use long runnig queries with order by clause or create index statement on big tables then there is not enough free space .
    And this time you can check free space as
    select sum(free_blocks) from v$sort_segment where tablespace_name='TEMP';
    Edited by: admin on Apr 29, 2010 11:40 PM

Maybe you are looking for