|
The data dictionary is not created automatically when the database is created. The DBA has to run a series of scripts that create the data dictionary and get it ready to help with database instance operation. Running the Catalog ScriptsThe data dictionary views are created when the SYS user runs the catalog.sql script located in the %ORACLE_HOME%\rdbms\admin directory on Windows, or the $ORACLE_HOME/rdbms/admin directory on Unix. catalog.sql is a driver script that is run as SYS. Although it is possible to run this script as anyone with SYSDBA privileges, it is not suggested to run it as anyone other than SYS because this is one of the only userids that you are never likely to delete.
Running the catproc.sql Scriptcatproc.sql creates the procedural options and utilities for use by PL/SQL. catproc.sql runs two different types of scripts when it is running. If you were to examine the contents of the catproc.sql script (located in the same directory as catalog.sql), you would see references to other scripts similar to the way that catalog.sql references and calls other scripts. The scripts that catproc.sql calls, also located in the rdbms\admin directory, that end in .sql are package specifications for the many varied Oracle Server packages. These specifications contain the procedure, function, and type reference as well as constant definitions available in the package. These package specifications don't contain any actual code for the components. The scripts ending in .plb contain the actual code that is behind the procedures and functions from the specification definitions. The .plb ending, however, signifies that these package bodies are wrappered and, therefore, are unreadable by anyone except the Oracle Server. Again, it is important that catproc.sql is run by SYS. And, again, although it is possible for any other user with SYSDBA privileges to run the script, those users could go away and the removal of the user who created the objects and packages in the data dictionary could cause the database to perform erratically.
|
|