1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Oracle DBA Basic Terms for Beginners

Discussion in 'Server Administration and Options' started by tyro, Nov 4, 2008.

  1. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    Oracle DBA Basic Terms for Beginners

    In order to become a fully fledged DBA, you need to have an understanding of the fundamental concepts. This article aims to provide the basics of what a DBA is and what a DBA does in their daily role.

    The Database Administrator takes care of all of the security, data management and efficient running of an organisations database. Backup and recovery are also an essential part of the role. Frequently the DBA has to work out of hours in order to keep the organisations database operational. The DBA must frequently make recommendations for improvement and future strategy. The DBA must liaise frequently with co-workers and other departments who rely on the database for information. Developers rely on the database for their working platform. Therefore it not only affects end users but developers of products and applications.

    There are certain terms that DBAs must be aware of and understand what they mean. We will cover a few of these here:

    Oracle Instance:

    When an Oracle database is running, it is associated with what is known as an “instance”. This occurs when a database is started on a server. The type of computer the database runs on is irrelevant. Oracle allocates memory to an area named the System Global Area (SGA). The processes needed to operate the database are also started. An “instance” refers to the combination of Oracle processes and the SGA. The instance memory and processes are used to manage the database data efficiently and serve one or more multiple users of the database.

    Parameter Files:

    Parameter files are used to provide initialisation directives for a particular installation. There are two types of parameter file. These are Server Parameter Files, which are in binary format and persistent across and instance i.e. persist across instance shutdown and startup, and Initialization parameter files, which are text based and can be changed. Sample versions of the parameter files are provided for use as an example and so they can be changed with relevant parameters for a specific installation. The sample file is usually fine for a basic setup, but can be changed to improve performance and other settings. Once changed, the settings take effect once the database is restarted.

    System Global Area (SGA):

    Whilst the database is in operation, a memory area is required for all users to share such as a buffer cache and a shared pool of SQL statements. This is known as the System Global Area (SGA). The SGA is defined in memory once an Oracle instance is started. Changes to the SGA become effective the next time the database is started up.

    Program Global Area (PGA):

    In addition to the system global area there is another area which comes into the equation, and is intended for the processing of SQL statements and temporary areas for sorting and temporary calculations. This area is allocated for each individual database session. As for the system global area the programmer area can also be changed and new settings would take effect on a new database start-up.
     
    sunil likes this.
  2. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    User Accounts:

    User accounts are an essential part of management for a DBA, and an understanding of how these are managed is one of the first lessons a DBA must learn. A user account has several attributes, which help to identify the account. A user account must have a password, privileges and a role, a default tablespace for database objects, and a default temporary tablespace for processing of their work space.

    Of course, a user account must have something to work with. In this case it is the database schema. A schema consists of all the objects that a typical database user will need in relation to how they work with the database. A typical schema consists of tables, views, triggers and stored procedures etc that the user may create. Therefore it can be said that a schema is where the user stores their objects.

    Users also have roles associated with them. A role in database terms is not unlike a role in the workplace. A role may be a sales person role or a manager role, or a developer role. They differ in that some roles may be allowed to access tables which other roles cannot and vide versa. Some similar roles may view a cross-section of tables with other roles, in addition to those tables which are specific to them. The role scenario does not only cover tables though, it also covers other kinds of objects in the database.

    In addition to a role a user is also allocated privileges. A privilege is a permitted operation upon an object such as “read” or “write” privilege on a database table. A privilege can also provide administrative options such as creating other user accounts etc. Therefore a typical user has both a role and a set of privileges to work with.

    Oracle Indexes:

    Oracle indexes can be used as an optional method of speeding up access to the database. An SQL query may or may not use an index to access a table. An index provides a pointer to specific data in a table, and saves searching through a whole list of items. However, in the case of small tables or tables with very few dissimilar values an index can also cause an overhead in efficiency. A good DBA will have knowledge of optimisation techniques but this equally applies to Oracle developers.

    Oracle Tablespace:

    An Oracle tablespace is a large unit of logical storage. It is reserved for use by the Oracle server to store structures such as data objects, for instance tables and indexes. A tablespace is physically constructed of oracle data files. The data files format matches those stored by the operating system. Therefore a tablespace can consist of one or more data files. In large databases this will be several.

    Static Data Dictionary:

    One of the first items a DBA must know about are Data Dictionaries. These are held internally in the database in their own tables, but these are not directly accessible. The only way to access data dictionary information is via data dictionary views. The DBA can query the “Dictionary” view. A number of views may be available for data dictionary information. The views available are named with a prefix according to their purposes. For instance the ALL_ prefixed views display all the information available to the current user. Standard users an also query a number of these views, but the more privileged information is only viewable by a DBA. For instance, the DBA_ prefixed views display all information for the current database. USER_ prefixed views are used by users to view details about their own objects and tables.

    Dynamic Performance View:

    There is a special login names SYS. This login allows the DBA to access views maintained by the database server and provide useful information about the database and how it is performing. They also provide detailed information on internal disk structure and memory. These views cannot be updated, but they can be viewed by the SYS user.

    Recycle Bin:

    Like the recycle bin used in windows this recycle bin is a logical storage area in the database to hold deleted objects. In the case of Oracle and the recycle bin we say items have been “dropped” as opposed to deleted. Therefore, if a table has been dropped in error it can be recovered from the recycle bin. This feature may be turned off if it has been specifically stated in the parameter file.

    SQL*Plus:

    This tool is provided for developer use mainly. It is installed with every Oracle database installation has three modes of viewing, which are command line, a windows interface, and a web-based version.

    Summary

    This thread has only mentioned a few basic terms that any ORACLE DBA should be aware and have knowledge of. It has only really scratched the surface of what is, a skilled and complex job. However, by familiarising yourself with these terms you have started your journey to becoming a DBA.
     
    sunil likes this.
  3. Arju

    Arju Forum Expert

    Messages:
    107
    Likes Received:
    5
    Trophy Points:
    240
    Location:
    Bangladesh
    As you know an oracle instance is composed of SGA plus oracle background processes.
    I will try to touch a bit of oracle background processes.

    1)Database Writer Process (DBWn): Write modified blocks to disk.

    2)Log Writer Process (LGWR): Write redo log buffer info to disk.

    3)Checkpoint Process (CKPT):Update database files.

    4)System Monitor Process (SMON):Handles Recovery.

    5)Process Monitor Process (PMON):Handles cleanup tasks after user processes terminate.

    Above five are madatory background process.
    Optional background processes are,
    Recoverer Process (RECO)

    Job Queue Processes

    Archiver Processes (ARCn)

    Queue Monitor Processes (QMNn) And,

    Several other Background Processes.
     
    sunil likes this.