Recompiling SYS Objects

Hi,
I am running a patch on one of our DB's so I am trying to ensure that I have no INVALID objects under the SYS schema.
SQL> select object_type, count(*) from dba_objects where status='INVALID' and owner='SYS'
2 group by object_type;
OBJECT_TYPE COUNT(*)
PACKAGE BODY 11
VIEW 12
So looking at this I know I have to recompile some objects here. I would like to do this all at one so from reading a posting here in the forum, I executed the utlrp.sql script located under the $ORACLE_HOME dir.
SQL> @utlrp.sql
PL/SQL procedure successfully completed.
So far so good...right??? wrong. When I query the DBA_OBJECTS again, I get the same results.
SQL> select object_type, count(*) from dba_objects where status='INVALID' and owner='SYS'
2 group by object_type;
OBJECT_TYPE COUNT(*)
PACKAGE BODY 11
VIEW 12
So when I go into each object I try to recomplile them manually and I notice the error is referring to some DBA_*** table that does not exists. I look further into this and I notice that the DBA_*** is not there infact. Here are some of tables it is looking for.
-system.repcat$_template_objects
-dba_repgenerated
-system.repcat$_flavors
There are many others and I can not seem to find these and I really need to compile these objects before I can apply my patch. Has anyone ran into this problem before. Can someone please help me out????

Actually I got a hold of the old DBA and they did an upgrade. They left out the Advanced Replication. I simply ran the catrep.sql script and everything worked out perfect. Thanks for your reply :)

Similar Messages

  • Oracle Internal error while executing sys objects

    Hi,
    I recently restored an oracle 9i database from datafiles I received from client.
    I am consistently getting the following error whenever I try to open a new sqlplus session.
    bash-2.03$ sqlplus $IQ_DBLOGON
    SQL*Plus: Release 9.2.0.6.0 - Production on Thu Mar 27 20:30:09 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    ERROR:
    ORA-06553: PLS-801: internal error [56319]
    ERROR:
    ORA-06553: PLS-801: internal error [56319]
    Error accessing package DBMS_APPLICATION_INFO
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production
    SQL>
    After search I found some references to recreate the sys objects by running standard sqls like CATALOG.SQL, CATPPROC.SQL etc. While running these SQLs as well I am getting oracle "Internal Errors".
    I tries re-creating many sys packages and am consistently getting these errors. It looks to me I have problem while accessing procedures in all sys packages. I checked, all the packages are valid and have EXECUTE priviledge to PUBLIC.
    See an example of the error below.
    bash-2.03$ sqlplus /nolog
    SQL*Plus: Release 9.2.0.6.0 - Production on Thu Mar 27 20:37:13 2008
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    SQL> connect /as sysdba
    Connected.
    SQL>
    SQL>
    SQL> execute dbms_stats.delete_database_stats;
    BEGIN dbms_stats.delete_database_stats; END;
    ERROR at line 1:
    ORA-06553: PLS-801: internal error [56319]
    SQL>
    Kindly let me know the solution for the problem. Please let me know in case you need any more details.
    Regards,
    Ullhas

    ORA-06553: PLS-801: internal error [56319] usually occurs,when there was a switch between bit sizes (source is 32 bit,target 64 bit and vice versa) . In such a case script utlirp.sql has to be run ($ORACLE_HOME/rdbms/admin).
    Werner

  • PERFORMANCE PROBLEM - SYS OBJECTS

    Hi all,
    I'm having something strange here! The performance of queries that run against SYS objects like view DBA_OBJECTS , DBA_SEGMENTS, DBA_EXTENTS are VERY SLOWLY!! It's hang everytime and i need to kill the session and the PID process.
    One example is the following:
    SELECT owner, object_name, object_type FROM sys.all_objects
    WHERE object_type IN ('PACKAGE', 'PROCEDURE', 'SEQUENCE', 'TABLE', 'TYPE',
    'VIEW', 'FUNCTION') ORDER BY owner, object_name;
    The objects of schema SYS was analyzed recently.
    I have run the query with trace and nothing was found on that trace. The trace says the the query runs in few seconds but it didn't.
    Any help?
    Tks,
    Paulo Portugal

    Please take a look at the DBMS_XPLAN for the query to determine if there is a problem, and see if you are able to use DBA_OBJECTS rather than ALL_OBJECTS.
    For example, on one of my databases, querying ALL_OBJECTS:
    | Id  | Operation                                               | Name       | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    |*  1 |  TABLE ACCESS BY INDEX ROWID                            | SUM$       |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |*  2 |   INDEX UNIQUE SCAN                                     | I_SUM$_1   |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |   3 |  SORT ORDER BY                                          |            |      1 |    294 |   7329 |00:00:01.10 |     151K|   407K|   407K|  361K (0)|
    |*  4 |   FILTER                                                |            |      1 |        |   7329 |00:00:01.07 |     151K|       |       |          |
    |*  5 |    HASH JOIN                                            |            |      1 |  14668 |  14672 |00:00:00.09 |     196 |  1155K|  1155K| 1175K (0)|
    |   6 |     TABLE ACCESS FULL                                   | USER$      |      1 |    157 |    157 |00:00:00.01 |      15 |       |       |          |
    |*  7 |     TABLE ACCESS FULL                                   | OBJ$       |      1 |  14668 |  14672 |00:00:00.02 |     181 |       |       |          |
    |*  8 |    TABLE ACCESS BY INDEX ROWID                          | IND$       |   2575 |      1 |   2409 |00:00:00.04 |    5157 |       |       |          |
    |*  9 |     INDEX UNIQUE SCAN                                   | I_IND1     |   2575 |      1 |   2575 |00:00:00.02 |    2577 |       |       |          |
    |  10 |     NESTED LOOPS                                        |            |   9134 |     28 |   4291 |00:00:00.83 |     145K|       |       |          |
    |  11 |      FIXED TABLE FULL                                   | X$KZSRO    |   9134 |     26 |  68239 |00:00:00.13 |       0 |       |       |          |
    |* 12 |      INDEX RANGE SCAN                                   | I_OBJAUTH1 |  68239 |      1 |   4291 |00:00:00.55 |     145K|       |       |          |
    |* 13 |       FIXED TABLE FULL                                  | X$KZSPR    |      1 |     14 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 14 |        FIXED TABLE FULL                                 | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 15 |         FIXED TABLE FULL                                | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 16 |          FIXED TABLE FULL                               | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 17 |           FIXED TABLE FULL                              | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 18 |            FIXED TABLE FULL                             | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 19 |             FIXED TABLE FULL                            | X$KZSPR    |      1 |     11 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 20 |              FIXED TABLE FULL                           | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 21 |               FIXED TABLE FULL                          | X$KZSPR    |      0 |     14 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 22 |                FIXED TABLE FULL                         | X$KZSPR    |      1 |     11 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 23 |                 FIXED TABLE FULL                        | X$KZSPR    |      1 |     11 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 24 |                  FIXED TABLE FULL                       | X$KZSPR    |      1 |      3 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 25 |                   FIXED TABLE FULL                      | X$KZSPR    |      1 |      3 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 26 |                    FIXED TABLE FULL                     | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 27 |                     FIXED TABLE FULL                    | X$KZSPR    |      1 |     11 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 28 |                      FIXED TABLE FULL                   | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 29 |                       FIXED TABLE FULL                  | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 30 |                        FIXED TABLE FULL                 | X$KZSPR    |      1 |      6 |      1 |00:00:00.01 |       0 |       |       |          |
    |* 31 |                         FIXED TABLE FULL                | X$KZSPR    |      0 |     14 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 32 |                          FIXED TABLE FULL               | X$KZSPR    |      0 |     11 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 33 |                           FIXED TABLE FULL              | X$KZSPR    |      0 |      6 |      0 |00:00:00.01 |       0 |       |       |          |
    |  34 |                            VIEW                         |            |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |  35 |                             FAST DUAL                   |            |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 36 |                              TABLE ACCESS BY INDEX ROWID| SUM$       |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 37 |                               INDEX UNIQUE SCAN         | I_SUM$_1   |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    Predicate Information (identified by operation id):
       1 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
       2 - access("S"."OBJ#"=:B1)
       4 - filter(((("O"."TYPE#"<>1 AND "O"."TYPE#"<>10) OR ("O"."TYPE#"=1 AND =1)) AND (INTERNAL_FUNCTION("O"."OWNER#") OR ("O"."TYPE#"<>11 AND
                  "O"."TYPE#"<>14 AND  IS NOT NULL) OR (INTERNAL_FUNCTION("O"."TYPE#") AND  IS NOT NULL) OR ("O"."TYPE#"=13 AND  IS NOT NULL) OR ("O"."TYPE#"=11 AND
                   IS NOT NULL) OR ("O"."TYPE#"=12 AND  IS NOT NULL) OR ("O"."TYPE#"=6 AND  IS NOT NULL) OR (INTERNAL_FUNCTION("O"."TYPE#") AND  IS NOT NULL) OR
                  ("O"."TYPE#"=22 AND  IS NOT NULL) OR ("O"."TYPE#"=14 AND  IS NOT NULL) OR INTERNAL_FUNCTION("O"."TYPE#") OR ("O"."TYPE#"=33 AND  IS NOT NULL) OR
                  ("O"."TYPE#"=46 AND  IS NOT NULL) OR ("O"."TYPE#"=62 AND  IS NOT NULL) OR ("O"."TYPE#"=66 AND  IS NOT NULL) OR ("O"."TYPE#"=48 AND  IS NOT NULL)
                  OR ("O"."TYPE#"=44 AND  IS NOT NULL) OR ("O"."TYPE#"=59 AND  IS NOT NULL) OR ("O"."TYPE#"=23 AND  IS NOT NULL) OR ("O"."TYPE#"=68 AND  IS NOT
                  NULL) OR (INTERNAL_FUNCTION("O"."TYPE#") AND  IS NOT NULL) OR ("O"."TYPE#"=42 AND  IS NOT NULL) OR ("O"."TYPE#"=32 AND  IS NOT NULL) OR
                  ("O"."TYPE#"=81 AND  IS NOT NULL) OR ("O"."TYPE#"=55 AND =1)) AND (DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA
                  SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER GROUP',55,'XML
                  SCHEMA',56,'JAVA DATA',57,'SECURITY PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='PACKAGE' OR DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA
                  SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER GROUP',55,'XML
                  SCHEMA',56,'JAVA DATA',57,'SECURITY PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='PROCEDURE' OR DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA
                  SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER GROUP',55,'XML
                  SCHEMA',56,'JAVA DATA',57,'SECURITY PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='SEQUENCE' OR DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA
                  SOURCE',29,'JAVA CLASS',30,'JAVA RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT)
       5 - access("O"."OWNER#"="U"."USER#")
       7 - filter(("O"."NAME"<>'_NEXT_OBJECT' AND "O"."NAME"<>'_default_auditing_options_' AND "O"."LINKNAME" IS NULL))
       8 - filter(("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR "I"."TYPE#"=9))
       9 - access("I"."OBJ#"=:B1)
      12 - access("OBJ#"=:B1 AND "GRANTEE#"="KZSROROL")
           filter((INTERNAL_FUNCTION("PRIVILEGE#") AND "GRANTEE#"="KZSROROL"))
      13 - filter((((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50)) AND
                  "INST_ID"=USERENV('INSTANCE')))
      14 - filter((((-"KZSPRPRV")=(-184) OR (-"KZSPRPRV")=(-181)) AND "INST_ID"=USERENV('INSTANCE')))
      15 - filter(((-"KZSPRPRV")=(-141) AND "INST_ID"=USERENV('INSTANCE')))
      16 - filter(((-"KZSPRPRV")=(-152) AND "INST_ID"=USERENV('INSTANCE')))
      17 - filter(((-"KZSPRPRV")=(-109) AND "INST_ID"=USERENV('INSTANCE')))
      18 - filter((((-"KZSPRPRV")=(-144) OR (-"KZSPRPRV")=(-141)) AND "INST_ID"=USERENV('INSTANCE')))
      19 - filter((((-"KZSPRPRV")=(-189) OR (-"KZSPRPRV")=(-190) OR (-"KZSPRPRV")=(-191) OR (-"KZSPRPRV")=(-192)) AND "INST_ID"=USERENV('INSTANCE')))
      20 - filter(((-"KZSPRPRV")=(-181) AND "INST_ID"=USERENV('INSTANCE')))
      21 - filter((((-"KZSPRPRV")=(-200) OR (-"KZSPRPRV")=(-201) OR (-"KZSPRPRV")=(-202) OR (-"KZSPRPRV")=(-203) OR (-"KZSPRPRV")=(-204)) AND
                  "INST_ID"=USERENV('INSTANCE')))
      22 - filter((((-"KZSPRPRV")=(-251) OR (-"KZSPRPRV")=(-252) OR (-"KZSPRPRV")=(-253) OR (-"KZSPRPRV")=(-254)) AND "INST_ID"=USERENV('INSTANCE')))
      23 - filter((((-"KZSPRPRV")=(-246) OR (-"KZSPRPRV")=(-247) OR (-"KZSPRPRV")=(-248) OR (-"KZSPRPRV")=(-249)) AND "INST_ID"=USERENV('INSTANCE')))
      24 - filter(((-"KZSPRPRV")=(-265) AND "INST_ID"=USERENV('INSTANCE')))
      25 - filter(((-"KZSPRPRV")=12 AND "INST_ID"=USERENV('INSTANCE')))
      26 - filter((((-"KZSPRPRV")=(-222) OR (-"KZSPRPRV")=(-223)) AND "INST_ID"=USERENV('INSTANCE')))
      27 - filter((((-"KZSPRPRV")=(-258) OR (-"KZSPRPRV")=(-259) OR (-"KZSPRPRV")=(-260) OR (-"KZSPRPRV")=(-261)) AND "INST_ID"=USERENV('INSTANCE')))
      28 - filter((((-"KZSPRPRV")=(-177) OR (-"KZSPRPRV")=(-178)) AND "INST_ID"=USERENV('INSTANCE')))
      29 - filter((((-"KZSPRPRV")=(-268) OR (-"KZSPRPRV")=(-267)) AND "INST_ID"=USERENV('INSTANCE')))
      30 - filter((((-"KZSPRPRV")=(-265) OR (-"KZSPRPRV")=(-266)) AND "INST_ID"=USERENV('INSTANCE')))
      31 - filter((((-"KZSPRPRV")=(-45) OR (-"KZSPRPRV")=(-47) OR (-"KZSPRPRV")=(-48) OR (-"KZSPRPRV")=(-49) OR (-"KZSPRPRV")=(-50)) AND
                  "INST_ID"=USERENV('INSTANCE')))
      32 - filter((((-"KZSPRPRV")=(-205) OR (-"KZSPRPRV")=(-206) OR (-"KZSPRPRV")=(-207) OR (-"KZSPRPRV")=(-208)) AND "INST_ID"=USERENV('INSTANCE')))
      33 - filter((((-"KZSPRPRV")=(-277) OR (-"KZSPRPRV")=(-278)) AND "INST_ID"=USERENV('INSTANCE')))
      36 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
      37 - access("S"."OBJ#"=:B1)Querying DBA_OBJECTS produces a much more compact plan that executes faster:
    | Id  | Operation                        | Name        | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    |   1 |  SORT ORDER BY                   |             |      1 |    814 |   7329 |00:00:00.24 |    5353 |   407K|   407K|  361K (0)|
    |   2 |   VIEW                           | DBA_OBJECTS |      1 |    814 |   7329 |00:00:00.21 |    5353 |       |       |          |
    |   3 |    UNION-ALL                     |             |      1 |        |   7329 |00:00:00.21 |    5353 |       |       |          |
    |*  4 |     FILTER                       |             |      1 |        |   7329 |00:00:00.19 |    5353 |       |       |          |
    |*  5 |      HASH JOIN                   |             |      1 |  14668 |  14672 |00:00:00.09 |     196 |  1155K|  1155K| 1209K (0)|
    |   6 |       TABLE ACCESS FULL          | USER$       |      1 |    157 |    157 |00:00:00.01 |      15 |       |       |          |
    |*  7 |       TABLE ACCESS FULL          | OBJ$        |      1 |  14668 |  14672 |00:00:00.03 |     181 |       |       |          |
    |*  8 |      TABLE ACCESS BY INDEX ROWID | IND$        |   2575 |      1 |   2409 |00:00:00.04 |    5157 |       |       |          |
    |*  9 |       INDEX UNIQUE SCAN          | I_IND1      |   2575 |      1 |   2575 |00:00:00.02 |    2577 |       |       |          |
    |* 10 |       TABLE ACCESS BY INDEX ROWID| SUM$        |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 11 |        INDEX UNIQUE SCAN         | I_SUM$_1    |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 12 |     FILTER                       |             |      1 |        |      0 |00:00:00.01 |       0 |       |       |          |
    |  13 |      NESTED LOOPS                |             |      0 |      5 |      0 |00:00:00.01 |       0 |       |       |          |
    |  14 |       INDEX FULL SCAN            | I_LINK1     |      0 |      5 |      0 |00:00:00.01 |       0 |       |       |          |
    |  15 |       TABLE ACCESS CLUSTER       | USER$       |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    |* 16 |        INDEX UNIQUE SCAN         | I_USER#     |      0 |      1 |      0 |00:00:00.01 |       0 |       |       |          |
    Predicate Information (identified by operation id):
       4 - filter(((("O"."TYPE#"<>1 AND "O"."TYPE#"<>10) OR ("O"."TYPE#"=1 AND =1)) AND (DECODE("O"."TYPE#",0,'NEXT
                  OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTION',9,'PACKAGE',11,'PACKAGE
                  BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER
                  GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'SECURITY
                  PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='PACKAGE' OR
                  DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTIO
                  N',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER
                  GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'SECURITY
                  PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='PROCEDURE' OR
                  DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTIO
                  N',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER
                  GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'SECURITY
                  PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='SEQUENCE' OR
                  DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTIO
                  N',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSUMER
                  GROUP',51,'SUBSCRIPTION',52,'LOCATION',55,'XML SCHEMA',56,'JAVA DATA',57,'SECURITY
                  PROFILE',59,'RULE',60,'CAPTURE',61,'APPLY',62,'EVALUATION CONTEXT',66,'JOB',67,'PROGRAM',68,'JOB
                  CLASS',69,'WINDOW',72,'WINDOW GROUP',74,'SCHEDULE',79,'CHAIN',81,'FILE GROUP','UNDEFINED')='TABLE' OR
                  DECODE("O"."TYPE#",0,'NEXT OBJECT',1,'INDEX',2,'TABLE',3,'CLUSTER',4,'VIEW',5,'SYNONYM',6,'SEQUENCE',7,'PROCEDURE',8,'FUNCTIO
                  N',9,'PACKAGE',11,'PACKAGE BODY',12,'TRIGGER',13,'TYPE',14,'TYPE BODY',19,'TABLE PARTITION',20,'INDEX
                  PARTITION',21,'LOB',22,'LIBRARY',23,'DIRECTORY',24,'QUEUE',28,'JAVA SOURCE',29,'JAVA CLASS',30,'JAVA
                  RESOURCE',32,'INDEXTYPE',33,'OPERATOR',34,'TABLE SUBPARTITION',35,'INDEX SUBPARTITION',40,'LOB PARTITION',41,'LOB
                  SUBPARTITION',42,NVL(,'MATERIALIZED VIEW'),43,'DIMENSION',44,'CONTEXT',46,'RULE SET',47,'RESOURCE PLAN',48,'CONSU)
       5 - access("O"."OWNER#"="U"."USER#")
       7 - filter(("O"."NAME"<>'_NEXT_OBJECT' AND "O"."NAME"<>'_default_auditing_options_' AND "O"."LINKNAME" IS NULL))
       8 - filter(("I"."TYPE#"=1 OR "I"."TYPE#"=2 OR "I"."TYPE#"=3 OR "I"."TYPE#"=4 OR "I"."TYPE#"=6 OR "I"."TYPE#"=7 OR
                  "I"."TYPE#"=9))
       9 - access("I"."OBJ#"=:B1)
      10 - filter(BITAND("S"."XPFLAGS",8388608)=8388608)
      11 - access("S"."OBJ#"=:B1)
      12 - filter('DATABASE LINK'='FUNCTION')
      16 - access("L"."OWNER#"="U"."USER#")Example of using DBMS_XPLAN to retrieve actual timing:
    http://jonathanlewis.wordpress.com/2006/11/09/dbms_xplan-in-10g/
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Unable to shipping sys objects in logical standby

    Dear Friends,
    I read in oracle.com, that sys objects(tables,index..etc)., won't reflect in the logical standby.
    Is there any way to reflect these objects....
    Please help me...

    user8665771 wrote:
    Dear Friends,
    I read in oracle.com, that sys objects(tables,index..etc)., won't reflect in the logical standby. post URL where above is stated.
    Handle:      user8665771
    Status Level:      Newbie
    Registered:      Jan 25, 2010
    Total Posts:      28
    Total Questions:      12 (12 unresolved)
    a Write Once & respond never user!
    Edited by: sb92075 on Sep 14, 2011 8:00 AM

  • Exp/imp SYS objects

    hi all,
    I took a full export of database and I created a new database on another machine and I successfully imported the data.
    But there are some objects in the SYS schema which I want from the source database. So what should I do to export and import the SYS objects.
    I am using 9.2.0.5.0 version.
    Source database OS AIX.Target database OS is windows.
    Can anyone help on this ...
    thanks,
    ravi

    hi,
    I was already completed import with ignore=y option.But there r some errors because of different operating system.The major error numbers are
    23327,6512,2264,01 etc.
    I went through the meaning of all the errors.
    Imported terminated successfully with warnings(from import log).
    I think "with warnings" is because of the above errors and because of the different operating system.
    As you mentioned the 3rd point in your previous message,hw to go through exactly?
    thanks,
    ravi

  • Automatically recompile dependant objects in db proc

    I would like to know as to what to do to automatically recompile
    dependant objects in a database procedure without compiling the
    procedures again manually.
    for eg: if a table is altered the db procedure becomes invalid
    (uncompiled form).. Can anything be done to automatically
    recompile without compiling it manually.
    Same's the case with a procedure being changed the dependants if
    any or is parent ( another procedure being called or calling
    another procedure)
    null

    peter (guest) wrote:
    : kiran (guest) wrote:
    : : I would like to know as to what to do to automatically
    : recompile
    : : dependant objects in a database procedure without compiling
    the
    : : procedures again manually.
    : : for eg: if a table is altered the db procedure becomes
    invalid
    : : (uncompiled form).. Can anything be done to automatically
    : : recompile without compiling it manually.
    : : Same's the case with a procedure being changed the
    dependants
    : if
    : : any or is parent ( another procedure being called or calling
    : : another procedure)
    : I thougt recompile of invalid stored procedures/packages
    occurs
    : automatically as they are called? If not, this is not normal.
    Did
    : you alter objects in a way that your procedures cannot be
    : compiled at all ?
    : peter
    Invalid stored code should be recompiled automatically. However
    certain combinations of client software and the database don't
    work this way. We're running the base release of Forms 6 against
    a 7.3.4 database and we find that uncompiled program units on
    the server do not get recompiled automatically.
    Our temporary workaround, until we move either the client or
    server forward, is to loop through all invalid objects (views,
    functions, procedures and packages - not package bodies)
    recompiling them overnight after the processing which
    invalidates them has completed. We repeat this process until
    either the same number of objects are invalid between two
    invocations or upto an arbitrary count of 10, so we don't end up
    running it forever.
    Marc
    null

  • How to join sys.dm_exec_query_stats to FROM sys.sql_modules as M INNER JOIN sys.objects

    0
    SELECT O.Name as ProcName
    ,M.Definition as CreateScript
    ,O.Create_Date
    ,O.Modify_Date
    FROM sys.sql_modules as M INNER JOIN sys.objects as O
    ON M.object_id = O.object_id
    WHERE O.type = 'P'
    --Procedure
    --WHERE O.type = 'V' View
    --WHERE O.type = 'FN' Function
    How can I join this to sys.dm_exec_query_stats to
    get the execution_count?

    You can join to sys.dm_exec_procedure_stats using object_id for procedures in cache and get execution count
    http://msdn.microsoft.com/en-in/library/cc280701(v=sql.110).aspx
    for ones not in cache you need to use logic like below
    SELECT O.Name as ProcName
    ,M.Definition as CreateScript
    ,O.Create_Date
    ,O.Modify_Date
    ,QS.execution_count
    FROM sys.dm_exec_query_stats AS QS
    CROSS APPLY sys.dm_exec_sql_text(QS.sql_handle) t
    INNER JOIN sys.sql_modules as M
    ON M.object_id = t.objectid
    INNER JOIN sys.objects as O
    ON M.object_id = O.object_id
    WHERE O.type = 'P'
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Sys.objects system view

    Hi,
    The sys.objects contains a column known as Type. Can anyone help to explain the difference between these 2 possible types: SQL_INLINE_TABLE_VALUED_FUNCTION and SQL_TABLE_VALUED_FUNCTION?
    Thanks

    Inline table valued function example from BOL:
    CREATE FUNCTION dbo.itvf_authors ( @au_lname VARCHAR(40) )
    RETURNS TABLE
    RETURN
    SELECT au_id, au_fname, au_lname, city, state
    FROM authors
    WHERE au_lname = @au_lname
    go
    LINK: 
    http://technet.microsoft.com/en-us/library/aa175924(v=sql.80).aspx
    Think of ITVF as a parameterized view.
    TVF/ITVF blog:
    http://www.sqlusa.com/bestpractices/training/scripts/userdefinedfunction/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Non existent table still in sys.objects, how to fix that?

    I have moved a table from one table schema to another one (dbo.MY_TABLE to RAW.MY_TABLE), using ALTER SCHEMA..., the problem is when our ETL is trying to remove all the constraints it finds 2 records (dbo.MY_TABLE), one for the user table and the other
    the PK of that table. The problem is that the sys.objects points to dbo.MY_TABLE which now doesn't exist anymore. How could I update the sys.objects table to correctly reflect that the table has moved table schema?

    Hi,
    sys.objects lists user objects. If
    select * from sys.all_objects where name='MY_TABLE'
    gives you more than 1 table (look at the "type_desc" column), you DO have more than 1 table. One in "dbo" schema and one in the "raw" schema.
    Those 2 tables should have different object_id values. Object_id is unique within a database, and all dependant objects use that object_id to refer to the object. They do not use object_name, schema name, not even schema_id. Just object_id. If you want to
    see all objects, including system objects, query sys.all_objects.
    Regards,
    Vedran

  • Sql script files to recreate SYS objects in Oracle 9i

    Hello all.
    I am working with a test Oracle database which is missing some SYS objects. (Oracle 9i).
    I was wondering if Oracle has any scripts that I can run and recreate those?
    Thank you,
    Sonya

    catalog.sql only creates the data dictionary views , not the underlying tables and indexes.
    (sql.bsq is the "internal" script that is executed to create objects in the SYS schema when a CREATE DATABASE command is issued --- but Oracle will not support anyone attempting to use this script directly).
    Hemant K Chitale

  • How to recompile SYS.DBMS_REPCAT_FLA

    Hi all,
    I found of this only invalid object in database, I dont know how to recompile this 'SYS.DBMS_REPCAT_FLA', can anyone please help
    object: SYS.DBMS_REPCAT_FLA
    10:23:25 SQL> sho errors
    Errors for PACKAGE BODY SYS.DBMS_REPCAT_FLA:
    LINE/COL ERROR
    0/0 PL/SQL: Compilation unit analysis terminated
    1/14 PLS-00201: identifier 'DBMS_REPCAT_FLA' must be declared
    1/14 PLS-00304: cannot compile body of 'DBMS_REPCAT_FLA' without its
    specification
    10:23:31 SQL> SYS.DBMS_REPCAT_FLA

    Hi Anantha
    Thanks for the reply, I guess since we are not using the replication, we can drop this package, I was so worried since this is the only object that is not compiling in our database,
    thanks everybody for the co operation
    :)

  • How to recompile the objects in oracle apps

    i used adadmin and compiled the apps schema .. but still i am getting INVALID objects .. how to compile these objects ?
    Below is the output after running adadmin .. suggest
    select owner,object_type,status from dba_objects where status='INVALID'
    SQL> /
    OWNER OBJECT_TYPE STATUS
    FLOWS_010500 JAVA SOURCE INVALID
    FLOWS_010500 JAVA CLASS INVALID
    PUBLIC SYNONYM INVALID
    PUBLIC SYNONYM INVALID
    PUBLIC SYNONYM INVALID
    PUBLIC SYNONYM INVALID
    RE PACKAGE BODY INVALID
    HERMAN TABLE INVALID
    APPS PACKAGE BODY INVALID
    APPS PACKAGE BODY INVALID
    APPS PACKAGE BODY INVALID
    OWNER OBJECT_TYPE STATUS
    APPS PACKAGE BODY INVALID
    APPS MATERIALIZED VIEW INVALID
    CA TABLE INVALID
    CA TABLE INVALID
    Thanks in advance

    i have 12.1.1 instance on Linux OS
    there is no adcompsc.pls file in $AD_TOP/sql .. i can see only adcompsc.sql You are on R12, and this script is no longer available -- See (Invalid Objects In Oracle Applications FAQs [ID 104457.1]), 10. How can I recompile all my invalid objects using ADCOMPSC.pls?
    Below is the error when i try to run the adcompsc.pls file .. please help
    [oaebiz@oracle sql]$ sqlplus @adcompsc.pls apps apps %
    SQL*Plus: Release 10.1.0.5.0 - Production on Tue Jan 4 08:36:03 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SP2-0310: unable to open file "adcompsc.pls"
    Enter User-name :Use adcompsc.sql instead.
    Thanks,
    Hussein

  • Will invalid SYS objects cause Oracle 9.2.0.8 thread to crash?

    Hi Experts
    Here is a brief account of what happened...
    1) In Toad, login as sys to modify a function in a user schema
    2) Created this function in sys schema by mistake and it was invalid. Error PLS-00201: identifier 'LOT.LINECODE' must be declared and error PL/SQL: Compilation unit analysis terminated were encounterd in for this function in sys schema. No further action was taken here <--- root cause??
    3) Proceed to modify the function in the correct user schema.
    4) Ard hour later at 10:59am, i received a <SID>core.log, no details in alert.log or trace file was given. Winows scheduled jobs before and after this timing were able to complete successully.
    5) Restarted db and server and operated as usual. (9i no more support from Oracle)
    First, my question is, what are the chances of the invalid function in SYS schema causing me to receive a <SID>core.log or causing the db to experience weird performance issue?
    Second, should i use sys credentials only for starting and stopping the database? And log in as the user schema for compilation?
    Thanks for your help.

    SYS should only be used for DBA duties - not for developing and compiling user code.
    No, creating a user object (even an invalid one) will not cause the Oracle instance to crash. The critical components in the SYS schema are the data dictionary - and a user object created in SYS would not "damage" the data dictionary, unless it replaces an existing data dictionary object.

  • Executing security_pkg.create_secu_owner causes sys objects invalid?

    Hi everyone,
    Just trying to confirm.
    We've been investigating why the SYS owned UTL_FILE and other packages suddenly became invalid on the database (9.2.0.5)
    The only activiy we can find based on the audit logs during the time when the utl_file became invalid is this command:
    BEGIN security_pkg.create_secu_owner('XXXXXX','aaaaa'); END;
    *input parameters have been changed for security purposes.
    can executing the security_pkg.create_secu_owner really cause the UTL_FILE to become invalid?
    thanks,

    I had exec utlirp.sql..
    Well you were asked to run utlrp.sql. I can't speak about the time that it will take to get complete. For the invalid objects, there are two ways to make them valid,one run utlrp.sql and see how many become valid and the other ( painful one) is to manually look for the errors in their compilation and sort it out.
    Aman....

  • How important is gathering statistics on SYS objects?

    Hi,
    How important is gathering statistics on Data dictionary tables and other X$ tables in SYS schema. Is it bad to keep the statistics. Recently our Sr.DBA has deleted all the SYS schema stats telling that it will inversely affect the DB performance. Is it true?
    Regards
    Satish

    Hi Satish,
    *10g:*
    A new DBA task in Oracle Database 10g is to generate statistics on data dictionary objects which are contained in the SYS schema. The stored procedures dbms_stats.gather_database_stats and dbms_stats.gather_schema_stats can be used to gather the SYS schema stats. Here is an example of using dbms_stats.gather_schema_stats to gather data dictionary statistics:
    EXEC dbms_stats.gather_schema_stats(’SYS’);
    *9i*
    While it is supported in 9.2 to gather statistics on the data dictionary and fixed views, doing so isn't the norm.
    There is a bug fixed only in 10gR2 (not expected to be back-ported to 9.2) that caused this error. The fix is – don’t generate statistics against SYS – especially not the Fixed tables.
    For this query, let's see if we can get a better plan by removing statistics or by getting better statistics, or if we need to do something else to tune it. Take the SYS statistics as before, but with gather_fixed => false.
    I would like for you to test first by deleting the statistics on these two X$ tables and see how the query runs (elapsed time, plan).
    delete_table_stats('SYS','X$KQLFXPL');
    delete_table_stats('SYS','X$KGLOB');
    Then you can take statistics on them using gather_table_stats and check again (elapsed time, plan).
    gather_table_stats('SYS','X$KQLFXPL');
    gather_table_stats('SYS','X$KGLOB');
    The issue with this is that the contents of these fixed views, particularly x$kqlfxpl, can change dramatically. Gathering fixed object statistics may help now and cause problems later as the contents change.
    Warning, this is a bit dangerous due to latch contention, see the following note. I've supported a couple of very busy systems that were completely halted for a time due to latch contention on x$kglob due to monitoring queries (particularly on v$open_cursors).
    Note.4339128.8 Ext/Pub Bug 4339128 - Heavy latch contention from queries against library cache views.
    Hope this answers your question . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference":
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm

Maybe you are looking for

  • How can I play multiple episodes of a podcast in iTunes 11?

    Hi there - I'm subscribing to a number of podcasts in iTunes 11. I would like to play multiple episodes of a podcast one after the other without having to start each one separately, and preferably without having to create a playlist each time. Any id

  • Mapping Query

    Hi , Our customer sending data in EDI format.For that we r using seeburger adapter.Currently i m working on mapping spec (864). For that the source is the EDI and the target is the flat file.  I have the clear idea on source side..target side first w

  • Oracle WebLogic 10.0 MP2 Installation error: Java Heap Space

    Dear All, Installing weblogic 10.0 MP2 gave the following error "Exception in thread 'Thread 26' java.lang.OutOfMemoryError Java Heap Space" The installation progress bar stops at 92% . I tried to install many times and am not successfull. Please hel

  • Creating object type conflict dump

    Hi All, I have an interface zintf_1. I getting the list of classes that implemented the zintf_1. There are some cases where the class wont have implemented the interface. ZDEMO_AA class has not implemented the interface zintf_1. data: lr_intf_1 type

  • Can a New MacBook Pro that comes with 10.7 run 10.6?

    Well its been a long time visiting the discussions for me, just after the new format, and I still hate it and it does seem painfully slow, but have a question. Now to figure out How to Post it. Can a New MacBook Pro that comes with 10.7 run 10.6 ? Ha