Sie sind auf Seite 1von 4

1) What is database link? A database link allows you to make a connection with a remote database.

A database link is the way Oracle allows you to connect from one database to another. 2) What are the different database links? Public or Global: A global one can be accessed by any user in the database. Private: A private database link only works for, and is accessible to the user/schema that owns it. 3) A table is classified as a parent table and you want to drop and recreate it. How would you do this without affecting the children tables? Disable the foreign key constraint to the parent, drop the table, re-create the table, and enable the foreign key constraint. 4) How would you determine the time zone under which a database was operating? Select DBTIMEZONE from dual; 5) Explain materialized views and how they are used? Materialized views are objects that are reduced sets of information that have been summarized, grouped, or aggregated from base tables. They are typically used in data warehouse or decision support systems. 6) Explain the difference between a FUNCTION, PROCEDURE and PACKAGE? A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any values to the calling application, a function will return a single value. A package on the other hand is a collection of functions and procedures that are grouped together based on their commonality to a business function or application. 7) Describe what redo logs are? Redo logs are logical and physical structures that are designed to hold all the changes made to a database and are intended to aid in the recovery of a database.

8) What are the components of physical database structure of Oracle database? Oracle database is comprised of three types of files. One or more data files, two are more redo log files, and one or more control files. 9) What are data files? Every Oracle database has one or more physical data files. The data files contain all the database data. The data of logical database structures, such as tables and indexes, is physically stored in the data files allocated for a database. A data file can be associated with only one database. Data in a data file is read, as needed, during normal database operation and stored in the memory cache of Oracle. For example, assume that a user wants to access some data in a table of a database. If the requested information is not already in the memory cache for the database, then it is read from the appropriate data files and stored in memory. Modified or new data is not necessarily written to a data file immediately. To reduce the amount of disk access and to increase performance, data is pooled in memory and written to the appropriate data files all at once. 10) What are control files?

Every Oracle database has a control file. A control file contains entries that specify the physical structure of the database. For example, it contains the following information: Database name Names and locations of data files and redo log files Time stamp of database creation Every time an instance of an Oracle database is started, its control file identifies the database and redo log files that must be opened for database operation to proceed. If the physical makeup of the database is altered (for example, if a new data file or redo log file is created), then the control file is automatically modified by Oracle to reflect the change. A control file is also used in database recovery. 11) What are redo log files?

Every Oracle database has a set of two or more redo log files. The set of redo log files is collectively known as the redo log for the database. A redo log is made up of redo entries (also called redo records).

The primary function of the redo log is to record all changes made to data. If a failure prevents modified data from being permanently written to the data files, then the changes can be obtained from the redo log, so work is never lost. To protect against a failure involving the redo log itself, Oracle allows a multiplexed redo log so that two or more copies of the redo log can be maintained on different disks. The information in a redo log file is used only to recover the database from a system or media failure that prevents database data from being written to the data files. For example, if an unexpected power outage terminates database operation, then data in memory cannot be written to the data files, and the data is lost. However, lost data can be recovered when the database is opened, after power is restored. By applying the information in the most recent redo log files to the database data files, Oracle restores the database to the time at which the power failure occurred. 12) What are the components of logical database structure of Oracle database? There are table spaces and database's schema objects. 13) What are table spaces?

A database is divided into logical storage units called tablespaces, which group related logical structures together. For example, tablespaces commonly group together all application objects to simplify some administrative operations. Each database is logically divided into one or more tablespaces. One or more datafiles are explicitly created for each tablespace to physically store the data of all logical structures in a tablespace. The combined size of the datafiles in a tablespace is the total storage capacity of the tablespace. Every Oracle database contains a SYSTEM tablespace and a SYSAUX tablespace. Oracle creates them automatically when the database is created. 14) What are schema objects?

A schema is a collection of database objects. A schema is owned by a database user and has the same name as that user. Schema objects are the logical structures that directly refer to the database's data. Schema objects include structures like tables, views, and indexes.

15)

What is SYSTEM tablespace and when is it created?

Every Oracle database contains a tablespace named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data dictionary tables for the entire database.

16)

What are data dictionary tables?

One of the most important parts of an Oracle database is its data dictionary, which is a read-only set of tables that provides information about the database. A data dictionary contains: The definitions/structure of all schema objects in the database (tables, views, indexes, clusters, synonyms, sequences, procedures, functions, packages, triggers, and so on) How much space has been allocated for, and is currently used by, the schema objects Default values for columns Integrity constraint information The names of Oracle users Privileges and roles each user has been granted Auditing information, such as who has accessed or updated various schema objects Other general database information The data dictionary is structured in tables and views, just like other database data. All the data dictionary tables and views for a given database are stored in that database's SYSTEM tablespace. Oracle accesses the data dictionary to find information about users, schema objects, and storage structures. Oracle modifies the data dictionary every time that a data definition language (DDL) statement is issued. Any Oracle user can use the data dictionary as a read-only reference for information about the database. For example, the following query returns all the objects contained in your schema: SELECT object_name, object_type FROM USER_OBJECTS; For example, the following query returns information about all the objects to which you have access: SELECT owner, object_name, object_type FROM ALL_OBJECTS;

Das könnte Ihnen auch gefallen