|
The Oracle Server, users (DBAs and regular users alike), and programs access the data dictionary to find information about users, schema objects, and storage structures. The data contained in the data dictionary are needed for the server to function properly. This is why you should never, ever update the information in these tables manually. The data is read whenever the database is operational to determine whether objects exist and what users have what access to those objects. Information in the data dictionary is modified whenever a Data Definition Language (DDL) statement is executed in the instance. Users and database administrators can use the data dictionary views as a reference. Some views are accessible to any Oracle user; others are intended to be viewed by database administrators only. The data dictionary is not a single entity. It is made of individual components, some of which are supporting program units; others are tables and views on tables. Program UnitsProgram units, also often known as stored procedures, are PL/SQL programs stored in the database rather than as external programs at the operating system level. Program units include functions, procedures, and packages. The data dictionary includes many Oracle-provided program units for use in the database. Many are there only for the support of other components of the database, such as PL/SQL, Java programs stored in the database, and even Java Enterprise Beans, whereas others are there for you to use in your day-to-day life as a DBA. Still others allow programmers and developers to access and use many of the useful functions of the Oracle Server. Views on Base TablesDifferent types of views can be found in the Oracle data dictionary, including static views and dynamic views. The following sections discuss the differences between these two types of views and what those different views are used for. Static ViewsThe data dictionary views are static views that answer specific questions about objects, users, and privileges. These static views change only when there is an alteration, addition, or deletion of objects from the database. These views have the distinct characteristics of being prefixed with either the USER_, ALL_, or DBA_ prefix. Examples of questions that these views answer are as follows:
Dynamic Performance ViewsDynamic performance views, also known as the V$ views or performance views, provide an actively changing view into current database activity. Throughout the duration of the instance being operational, the Oracle Server maintains these virtual tables (virtual in that they reside in memory rather than on disk and are defined as views) with information reflecting real-time conditions in the database. These views, which are owned by the SYS user, are continually updated while the database is operational with information accessed from memory and the control file, among other places. DML on these views is not permitted. DBAs use these views to monitor and tune the database. From the V$ views you could answer the following kinds of questions:
The data dictionary has three main types of static views. These views fall into three main categories that can be distinguished from each other by their scope as follows:
Now that we have discussed the different kinds of views in the data dictionary, we will look at retrieving information from this valuable asset. |
|