Data Dictionary used when creating a database

xiaoxiao2021-03-06  81

The Data DictionaryThe most important part of the Oracle database is the data dictionary.The data dictionary is a set of tables and views that hold the database's metadatainformation You can not update the dictionary directly;. Oracle updatesthe dictionary when you issue any Data Definition Language (DDL ) Commands.The Dictionary is provided as read-only for users and administratrs.the contents of the data Dictionary and obtaining information from the dictionaryare discussed in the section "querying the dictionary."

The data dictionary consists of base tables and user-accessible views. Thebase tables are normalized and contain cryptic, version-specific information.You use the views to query the dictionary and extract meaningful information.To create the views, install the additional Oracle-supplied scripts afterthe database is created.The base tables contain information such as the users of the database andtheir permissions, the amount of the used and unused space for databaseobjects, constraint information, and so on. Users and administrators rarely, if ever, need to access the base tables, with the exception of tables such asAUD $, which contains auditing information for objects in the database.When the database is created, Oracle creates two users, SYS and sYSTEM.SYS is the owner of the data dictionary, and SYSTEM is A DBA Account. Theinitial Password for Sys is Change_on_install;

the initial password forSYSTEM is MANAGER. Change these passwords once the database is created.Creating the DictionaryThe Oracle database is functional only when you create the dictionaryviews and additional tablespaces, rollback segments, users, and so on. Creatingthe dictionary views is the next step after you create the database byusing the CREATE DATABASE command. Running certain Oracle-suppliedscripts creates the dictionary views. We'll discuss all these topics in this sectionas well as give you some basics of how PL / SQL packages are created andmaintained in the data dictionary. Data Dictionary ScriptsThe data dictionary base tables are created under the SYS schema in theSYSTEM tablespace when you issue the CREATE DATABASE command. Oracleautomatically creates the tablespace and tables using the sql.bsq script foundunder the $ ORACLE_HOME / rdbms / admin directory. This script creates thefollowing : The System TableSpace by Using The Data File (s) Specified in The createDatabase Command A rollback segment named SYSTEM in the SYSTEM tablespace The SYS and SYSTEM user accounts The dictionary base tables and clusters Indexes on dictionary tables and sequences for dictionary use The roles PUBLIC, CONNECT, RESOURCE, DBA, DELETE_CATALOG_ROLE, EXECUTE_CATALOG_ROLE, and SELECT_CATALOG_ROLE The DUAL tableDon't Modify the definitions in the sql.bsq script-for example, byadding columns, removing columns, or changing the data type, or width.you can change, parameters:

INITIAL, NEXT, MINEXTENTS, MAXEXTENTS, PCTINCREASE, FREELISTS, FREELIST GROUPS, and OPTIMAL.The DUAL table is a dummy table owned by SYS and accessible to all users ofthe database. The table has only one column, named DUMMY, and only one row .Do not add more rows to this table.Running the script catalog.sql creates the data dictionary views. Thisscript creates synonyms on the views to allow users easy access to the views.Before running any data dictionary script, connect to the database as SYS .The dictionary creation scripts are under the $ ORACLE_HOME / rdbms / admindirectory on most platforms.The script catproc.sql creates the dictionary items necessary for PL / SQLfunctionality. The other scripts necessary for creating dictionary objectsdepend on the operating system and the functionality you want In The Database.for Example, IF you are not for useing real application clusters (RACS), you need not install any rac-limited Dictionary items. at a minimum, runthe catalog.sql and catchproc.sql scripts AF ter creating the database.The dictionary creation scripts all begin with cat Many of the scripts callother scripts For example, when you execute catalog.sql, it calls the followingscripts:.. standard.sql Creates a package called STANDARD, which contains theSQL functions to implement basic language featurescataudit.sql Creates data dictionary views to support auditingOracleObjectiveIdentify the contents and uses of the data dictionaryThe dictionary creation scripts all begin with cat. Many of the scripts callother scripts. For example, when you execute catalog.sql, it calls the followingscripts :

转载请注明原文地址:https://www.9cbs.com/read-94826.html

New Post(0)