Help!!!: catalog.sql and catproc.sql damage my db

after running the file my.sql (see below), i encounter some error:
when i try to edit the table data, the following error displayed:
ORA-04045 ... SYS.DBMS_OUTPUT
ORA-06508 ...
ORA-06512 ...
ORA-06508 ...
ORA-06512 ...
then i go to the package SYS.DBMS_OUTPUT, the status is "invalid", i try to recompile it, the following error displayed:
ORA-04045 ... SYS.CDC_ALTER_CTABLE_BEFORE
ORA-06508 ...
ORA-06512 ...
ORA-06508 ...
ORA-06512 ...
my db works well before running the file my.sql. it seems the execution of catalog.sql and catproc.sql cause the error. i am using 9i, and the document histories show that the catalog.sql and catproc.sql are last updated in Apr,2001.
my questions are:
1.with 9i db, do i need to run the two files?
2.how can i recover my db?(i don't have backup, can i use redoXX.log?)
***my.sql***
connect sys/change_on_install@orcl as sysdba
@/opt/oracle/rdbms/admin/catalog.sql
connect sys/change_on_install@orcl as sysdba
CREATE database mydb
@/opt/oracle/rdbms/admin/catproc.sql
***my.sql***

how can i get my db work properly just as it was?
what do you mean by "create database script"?
Database configuration assistant allows you to create the database template and then save it as a set of scripts that you
can later customize and run to create the database. If you created your "create database scripts" using this option then
these scripts automatically run the catproc.sql and catalog.sql scripts along with several other scripts.
If you use Database configuration assistant to create such a set of DB creation scripts, than look at the
CreateDBCatalog.sql script, as you can see it runs both the scripts. so, if you do it this way, you do not need to do any
extra steps (apart from your custom scripts that may be part of your post install steps).
A sample of such DB creation script will be as below (for your reference):
===================================================================
connect SYS/change_on_install as SYSDBA
set echo on
spool /home/oracle/Ora9i/assistants/dbca/logs/CreateDBCatalog.log
@/home/oracle/Ora9i/rdbms/admin/catalog.sql;
@/home/oracle/Ora9i/rdbms/admin/catexp7.sql;
@/home/oracle/Ora9i/rdbms/admin/catblock.sql;
@/home/oracle/Ora9i/rdbms/admin/catproc.sql;
@/home/oracle/Ora9i/rdbms/admin/catoctk.sql;
@/home/oracle/Ora9i/rdbms/admin/owminst.plb;
connect SYSTEM/manager
@/home/oracle/Ora9i/sqlplus/admin/pupbld.sql;
connect SYSTEM/manager
set echo on
spool /home/oracle/Ora9i/assistants/dbca/logs/sqlPlusHelp.log
@/home/oracle/Ora9i/sqlplus/admin/help/hlpbld.sql helpus.sql;
spool off
spool off
exit;
===========================================================================

Similar Messages

  • Run catalog.sql and catproc.sql?

    Hi,
    Does the install procedure for Oracle 9i Release 2 run catalog.sql and catproc.sql? Or should they be run manually after install? Thanks for the help.
    rmc.

    If I run catalog.sql and catproc.sql in a production database (when application is not accessing db), they will recreate data dictionary, views and recompile packages. But, wiil my data be affected by this?Refer the foll link:
    https://forums.oracle.com/forums/thread.jspa?threadID=2410592
    Refer Metalink Doc Id:
    *Why do I have to run the CATPROC.SQL PUPBLD.SQL Oracle Scripts ? [ID 1033107.1]*
    *Best Practices for running catalog, catproc and utlrp script [ID 863312.1]*
    Edited by: Vedant.. on Dec 11, 2012 4:10 PM

  • Invalid objects after running catalog.sql and catproc.sql

    I have a db 10.1.0.3.0. standard edition with the 10.1.0.4.0 patch installed.
    After executing catalog.sql and catproc.sql the database contains lots of invalid objects in the public, olapsys and xdb schemas.
    I have executed utlrp.sql, the script completes successfully, but lots of invalid objects remain.
    Does anyone know how to fix this?
    Thanks in advance.
    Below is the output of
    select owner, object_name, object_type from dba_objects where status like 'INVALID';
    OWNER OBJECT_NAME OBJECT_TYPE
    XDB DBMS_XDBUTIL_INT PACKAGE
    XDB SETMODFLG PROCEDURE
    XDB DBMS_XDBZ0 PACKAGE BODY
    XDB DBMS_XDBUTIL_INT PACKAGE BODY
    PUBLIC DBMS_XDBUTIL_INT SYNONYM
    XDB XDB$PATCHUPSCHEMA PROCEDURE
    OLAPSYS ALL$OLAP2_AW_CATALOGS VIEW
    PUBLIC ALL_OLAP2_AW_CATALOGS SYNONYM
    OLAPSYS ALL$OLAP2_AW_CATALOG_MEASURES VIEW
    PUBLIC ALL_OLAP2_AW_CATALOG_MEASURES SYNONYM
    OLAPSYS ALL$OLAP2_AW_PHYS_OBJ VIEW
    PUBLIC ALL_OLAP2_AW_PHYS_OBJ SYNONYM
    OLAPSYS ALL$OLAP2_AW_PHYS_OBJ_PROP VIEW
    PUBLIC ALL_OLAP2_AW_PHYS_OBJ_PROP SYNONYM
    OLAPSYS ALL$OLAP2_AW_DIMENSIONS VIEW
    PUBLIC ALL_OLAP2_AW_DIMENSIONS SYNONYM
    OLAPSYS ALL$OLAP2_AW_ATTRIBUTES VIEW
    PUBLIC ALL_OLAP2_AW_ATTRIBUTES SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBES VIEW
    PUBLIC ALL_OLAP2_AW_CUBES SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_DIM_USES VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_DIM_USES SYNONYM
    OLAPSYS ALL$AW_DIM_ENABLED_VIEWS VIEW
    PUBLIC ALL_AW_DIM_ENABLED_VIEWS SYNONYM
    OLAPSYS ALL$AW_CUBE_ENABLED_VIEWS VIEW
    PUBLIC ALL_AW_CUBE_ENABLED_VIEWS SYNONYM
    OLAPSYS ALL$AW_CUBE_ENABLED_HIERCOMBO VIEW
    PUBLIC ALL_AW_CUBE_ENABLED_HIERCOMBO SYNONYM
    OLAPSYS ALL$OLAP2_AW_DIM_LEVELS VIEW
    PUBLIC ALL_OLAP2_AW_DIM_LEVELS SYNONYM
    OLAPSYS ALL$OLAP2_AW_DIM_HIER_LVL_ORD VIEW
    PUBLIC ALL_OLAP2_AW_DIM_HIER_LVL_ORD SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_MEASURES VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_MEASURES SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_AGG_SPECS VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_AGG_SPECS SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_AGG_MEAS VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_AGG_MEAS SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_AGG_LVL VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_AGG_LVL SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_AGG_OP VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_AGG_OP SYNONYM
    OLAPSYS MRAC_OLAP2_AW_DIMENSIONS_V VIEW
    OLAPSYS MRAC_OLAP2_AW_CUBES_V VIEW
    OLAPSYS MRAC_OLAP2_AW_CUBE_MEASURES_V VIEW
    PUBLIC MRV_OLAP2_AW_DIMENSIONS SYNONYM
    PUBLIC MRV_OLAP2_AW_CUBES SYNONYM
    PUBLIC MRV_OLAP2_AW_CUBE_MEASURES SYNONYM
    OLAPSYS CWM2_OLAP_METADATA_REFRESH PACKAGE BODY
    OLAPSYS OLAP_SYS_AW_ACCESS_DIM_VIEW VIEW
    OLAPSYS OLAP_SYS_AW_ACCESS_CUBE_VIEW VIEW
    OLAPSYS OLAP_SYS_AW_ENABLE_ACCESS_VIEW VIEW
    PUBLIC OLAP_SYS_AW_ACCESS_CUBE_VIEW SYNONYM
    PUBLIC OLAP_SYS_AW_ACCESS_DIM_VIEW SYNONYM
    PUBLIC OLAP_SYS_AW_ENABLE_ACCESS_VIEW SYNONYM
    OLAPSYS CWM2_OLAP_OLAPAPI_ENABLE PACKAGE BODY
    OLAPSYS DBMS_AWM PACKAGE BODY
    OLAPSYS CWM2_OLAP_CUBE PACKAGE BODY

    This note explains 80% of the problem: 42 invalid objects are normal, I have 52 invalid objects.
    I have re-executed the catpatch.sql script, I couldn't find any errors in the output. At the end Oracle Intermedia and Oracle Expression Filter remain invalid.
    last lines of catpatch.sql output:
    COMP_NAME STATUS VERSION
    OLAP Analytic Workspace OPTION OFF 10.1.0.3.0
    Oracle OLAP API OPTION OFF 10.1.0.3.0
    Oracle Database Catalog Views VALID 10.1.0.4.0
    Oracle Database Packages and Types VALID 10.1.0.4.0
    JServer JAVA Virtual Machine VALID 10.1.0.4.0
    Oracle XDK VALID 10.1.0.4.0
    Oracle Database Java Packages VALID 10.1.0.4.0
    Oracle XML Database VALID 10.1.0.4.0
    Oracle interMedia INVALID 10.1.0.4.0
    Oracle Text VALID 10.1.0.4.0
    Oracle Ultra Search VALID 10.1.0.4.0
    Oracle Expression Filter INVALID 10.1.0.4.0
    Oracle Enterprise Manager VALID 10.1.0.4.0
    Oracle Workspace Manager VALID 10.1.0.2.0
    Oracle Data Mining OPTION OFF 10.1.0.3.0
    OLAP Catalog OPTION OFF 10.1.0.3.0
    Spatial OPTION OFF 10.1.0.3.0
    SQL> select owner, object_name, object_type from dba_objects where status like 'INVALID';
    OWNER OBJECT_NAME OBJECT_TYPE
    WK_TEST BIN$9oUB6zbaOP/gMCzPA4J5+w==$0 TRIGGER
    OLAPSYS ALL$OLAP2_AW_CATALOGS VIEW
    PUBLIC ALL_OLAP2_AW_CATALOGS SYNONYM
    OLAPSYS ALL$OLAP2_AW_CATALOG_MEASURES VIEW
    PUBLIC ALL_OLAP2_AW_CATALOG_MEASURES SYNONYM
    OLAPSYS ALL$OLAP2_AW_PHYS_OBJ VIEW
    PUBLIC ALL_OLAP2_AW_PHYS_OBJ SYNONYM
    OLAPSYS ALL$OLAP2_AW_PHYS_OBJ_PROP VIEW
    PUBLIC ALL_OLAP2_AW_PHYS_OBJ_PROP SYNONYM
    OLAPSYS ALL$OLAP2_AW_DIMENSIONS VIEW
    PUBLIC ALL_OLAP2_AW_DIMENSIONS SYNONYM
    OLAPSYS ALL$OLAP2_AW_ATTRIBUTES VIEW
    PUBLIC ALL_OLAP2_AW_ATTRIBUTES SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBES VIEW
    PUBLIC ALL_OLAP2_AW_CUBES SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_DIM_USES VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_DIM_USES SYNONYM
    OLAPSYS ALL$AW_DIM_ENABLED_VIEWS VIEW
    PUBLIC ALL_AW_DIM_ENABLED_VIEWS SYNONYM
    OLAPSYS ALL$AW_CUBE_ENABLED_VIEWS VIEW
    PUBLIC ALL_AW_CUBE_ENABLED_VIEWS SYNONYM
    OLAPSYS ALL$AW_CUBE_ENABLED_HIERCOMBO VIEW
    PUBLIC ALL_AW_CUBE_ENABLED_HIERCOMBO SYNONYM
    OLAPSYS ALL$OLAP2_AW_DIM_LEVELS VIEW
    PUBLIC ALL_OLAP2_AW_DIM_LEVELS SYNONYM
    OLAPSYS ALL$OLAP2_AW_DIM_HIER_LVL_ORD VIEW
    PUBLIC ALL_OLAP2_AW_DIM_HIER_LVL_ORD SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_MEASURES VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_MEASURES SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_AGG_SPECS VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_AGG_SPECS SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_AGG_MEAS VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_AGG_MEAS SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_AGG_LVL VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_AGG_LVL SYNONYM
    OLAPSYS ALL$OLAP2_AW_CUBE_AGG_OP VIEW
    PUBLIC ALL_OLAP2_AW_CUBE_AGG_OP SYNONYM
    OLAPSYS MRAC_OLAP2_AW_DIMENSIONS_V VIEW
    OLAPSYS MRAC_OLAP2_AW_CUBES_V VIEW
    OLAPSYS MRAC_OLAP2_AW_CUBE_MEASURES_V VIEW
    PUBLIC MRV_OLAP2_AW_DIMENSIONS SYNONYM
    PUBLIC MRV_OLAP2_AW_CUBES SYNONYM
    PUBLIC MRV_OLAP2_AW_CUBE_MEASURES SYNONYM
    OLAPSYS CWM2_OLAP_METADATA_REFRESH PACKAGE BODY
    OLAPSYS OLAP_SYS_AW_ACCESS_DIM_VIEW VIEW
    OLAPSYS OLAP_SYS_AW_ACCESS_CUBE_VIEW VIEW
    OLAPSYS OLAP_SYS_AW_ENABLE_ACCESS_VIEW VIEW
    PUBLIC OLAP_SYS_AW_ACCESS_CUBE_VIEW SYNONYM
    PUBLIC OLAP_SYS_AW_ACCESS_DIM_VIEW SYNONYM
    PUBLIC OLAP_SYS_AW_ENABLE_ACCESS_VIEW SYNONYM
    OLAPSYS CWM2_OLAP_OLAPAPI_ENABLE PACKAGE BODY
    OLAPSYS DBMS_AWM PACKAGE BODY
    OLAPSYS CWM2_OLAP_CUBE PACKAGE BODY
    53 rows selected.

  • Reexecuting the catalog.sql and catproc.sql

    what will happened if we re execute the catalog.sql and catproc.sql on existing running oracle database ? is some thing is distructive or what ?

    what will happened if we re execute the catalog.sql and catproc.sql on existing running oracle database ? is some thing is distructive or what ?what's the reason to re-running them? Any errors?
    Catalog - creates data dictionary views.
    Catproc - create in built PL/SQL Procedures, Packages etc
    Dictionary objects might go INVALID and you need to run utlrp.sql to validate them.
    No harm in running. But, its time consuming and resource consuming.
    HTH
    -Anantha

  • Creating database without running the catalog.sql and  catproc.sql script

    Hi
    I created tow databse without running catalog.sql and catproc.sql. Any one knows what is the drawback of not running them?
    BR.

    I created tow databse without running catalog.sql and catproc.sql. Any one knows what is the drawback of not running them?Functionality & capabilities will be severely limited.

  • **urgent- impact of rerunning catlog.sql and catproc.sql

    Hi ,
    We are in middle of troubleshooting an export issue where it gives error on exporting some of the packages that starts with DBMS_ .
    After doing metalink search it appears that some of the objects may be invalid and the suggestion is to run utlrp.sql which did not solve the problem.
    The other suggestion is to rerun catlog.sql and catproc.sql as sys user
    My question is, if we re run the the scripts, will it overwrite any v$ or dba_ views ?
    ps. this is a prodn db

    What's Oracle version?
    As said, it generally safe to run catalog.sql and catproc.sql but better do it at quiet time of your production DB.
    also you might want to investigate why these packages were broken in the first place. Someone temper with your database dictionary?

  • Catalog.sql and Catproc.sql

    Hi,
    Can anyone please explain the syntax to execute these two packages? Please provide an example. Im creating a recovery catalog database and I have to run these before I am able to access my views such as RC_Database. I ran the create catalog at the RMAN prompt but still I cannot access the RC_views. My hair is falling out with my help. :)
    Thanks for your help in advance.
    Al

    Hi Thomas,
    I ran the scripts as you said with out error. Now when I re booted then at the sql prompt check to see if the views exist, they do when I type this query:
    sql>SELECT * FROM ALL_CATALOG WHERE OWNER='RMAN';
    RESULT PRODUCES A TABLE NAMED RC_DATABASE among others such as RC_REDO_LOG,RC_DATAFILE, etc
    But when I go to query this view
    sql>SELECT * FROM RC_DATABASE;
    I get the following
    RESPONSE: table or view does not exist
    Any ideas on how to extract the information from this view? What am I doing wrong?
    Thanks for your help.
    Al

  • Help me clear the OCP sql and pl/sql exam

    can anybody out there guide me how should i proceed with the preparation and what all should i study to clear the SQL and PL/SQL OCP exam.
    thank you all in advance..

    Try going for the Exam Cram. The exam at the end of the book will definitely help a lot. The rest of the book might help, so just give it a try.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Nosferatu:
    Hello people...
    I'm taking a preparation course for the Oracle DBA certification exam. I just finished preparing for the first exam -- SQL and PL/SQL.. The book I used for the course Oracle 8i DBA Certification Exam Guide as well as TEach yourself SQL in 21 days and Teach yourself PL/SQL in 21 days...
    I'd say I'm prepared to pass the exam... Before I make my first attempt, I am thinking of going through the Exam Cram for the first exam. However, judging from the reviews on amazon.com, the book doesn't seem to be helpful...
    Anyone have any tips or recommendations before I take the exam? Should I go through the Exam Cram? If not, are there better books to go through for last minute preparations?
    Also, how many questions on the exam and what percentage do I need to pass?
    Any input would be much appreciated... Thanks for ur help!<HR></BLOCKQUOTE>
    null

  • What is the diffrence between package javax.sql and java.sql

    Is javax designed for J2EE?
    And when to use package javax?

    Hi,
    What is the diffrence between package javax.sql and java.sql?The JDBC 2.0 & above API is comprised of two packages:
    1.The java.sql package and
    2.The javax.sql package.
    java.sql provides features mostly related to client
    side database functionalities where as the javax.sql
    package, which adds server-side capabilities.
    You automatically get both packages when you download the JavaTM 2 Platform, Standard Edition, Version 1.4 (J2SETM) or the JavaTM 2, Platform Enterprise Edition, Version 1.3 (J2EETM).
    For further information on this please visit our website at http://java.sun.com/j2se/1.3/docs/guide/jdbc/index.html
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Systems
    http://www.sun.com/developers/support/

  • Can't find oe_main.sql and HR_main.sql

    I have download and installed latest oracle database successfully (version 11g). When I followed instruction to install sample schema, I couldn't find hr.main.sql and oe_main.sql.
    I only found hr_code.sql in demo/schema/human_resources directory.
    There are a few sql files under order_entry directory like oe_views.sql. But I can't find oe_main.sql.
    I have been struggle with it for a few days. I couldn't find the script file on Internet either. Please help me identify this problem. Thank you very much.

    It's been some time ago but I encounter terrible problems with companion cd now. I have downloaded the zip file with examples already couple times and always there are crc errors in the archive that corrupt the instalation. I hate it... but I need the examples...
    What should I do?
    Download Companion CD from Oracle 10g. This is gonna take another 2 hours with my connection, but let me see...
    Edited by: prdola on Jul 4, 2009 7:26 AM

  • How to learn  SQL and PL/SQL ?

    who can give me some useful advice about learning SQL and PL/SQL ?
    who can help me?
    thanks

    Hi,
    It's my opinion that you can pickup the PL/SQL language syntax /semantics from a book - but, to learn, you need to get real hands-on experience. You can get invloved in a Project that requires the use of PL/SQL & I am sure you can pick up the nuts & bolts from your experience.
    You can read articles written by the SQL & PL/SQL gurus like Tom Kyte, Steven Fuernstein & the numerous Oracle ACE's - you do learn atleast a thing or two from every article.
    If you have any specific questions about SQL & PL/SQL - you have come to the right place - you can post the questions here & the gurus will defenitely help you !
    All the best !
    Regards,
    Sandeep

  • Syntax difference RdB SQL and RDBMS SQL

    Hi folks,
    I tried to find out, but still I couldn't find an answer. Maybe you'll know:
    Is there is syntax difference between SQL statements for Oracle RdB and Oracle RDBMS?
    The situation is, that we will migrate an application from VB6 to VB.NET. The VB6 version contains sql statements to an Oracle RdB database. The VB.NET version should query on a Oracle RDBMS (10g).
    You help is more than welcome!

    Shorter than Toon already put it, is not possible ;)
    Some related questions and explanations:
    Re: diff. between sql and pl/sql
    Re: PL/SQL vs SQL
    Re: SQL call in PL/SQL

  • About sql and pl/sql

    i don't know whether sql and pl/sql of syntax of oracle database 10g can be ued to oracle 8.17 database.
    and i also want to know how to learn sql and pl/sql well ?
    (i am using oracle 8.17 database.)
    and i think lots of practice can be useful for learning sql or pl/sql .
    i want to write better sql and pl/sql code ?
    who can help me ?
    thanks !

    If you really want to improve your SQL and PL/SQL kung fu, then reading and understanding the following manuals are very important.. and will give you a huge edge on many other so-called Oracle developers as few seems to be bothered with acquiring actual knowledge. I.e. they simply want the fish and are not interested in how to fish themselves.
    The manuals are:
    - Oracle® Database Concepts
    - Oracle® Database Application Developer's Guide - Fundamentals
    - Oracle® Database PL/SQL User's Guide and Reference
    (copies of all 8i to 10G manuals available via http://tahati.oracle.com)
    The reason why I think stressing these manuals are so important, is that 80% (if not more) of all answers to questions by experts like Tom Kyte, and on forums like this one, can be found in those manuals.
    And these manuals often provide a far more comprehensive and detailed picture that a "expert" can answer in a thread on asktom.oracle.com or here.
    RTFM will only make your PL/SQL kung fu stronger - and better.

  • NEED FOR INTERVIEW QUESTION SQL AND PL/SQL

    I am finished Oracle 9i OCA.Pls Anyone help me.Interview Questions for SQL and PL/SQL.

    Hi,
    first of all, It is not the right place for this question. Better Google it and you will find hell lot of information over there.
    Still, Give your email id, i will send you all the SQL/PLSQL interview question, I am having..
    Thanks
    KaMaL

  • Need objective sql and pl/sql question for preparing interview

    Hey buddy please help me, now I am preparing interview of sql and pl/sql where asking objective question, so I need online site for preparing interview, your suggestion would be greatly appreciated.

    Have you tried searching using one of the many Internet search engines?
    I expect that there are many kinds of sites out there that may cater to you.
    The only other recommendation I would have would be to review the documentation at http://tahiti.oracle.com. Probably the SQL Language Reference, PL/SQL Reference, Application Developer's Guide, and Concept's Guide.

Maybe you are looking for