0427-0430

Previous Table of Contents Next

Page 427

CHAPTER 19

Managing the Database

IN THIS CHAPTER

  • The Parameter File: INIT.ORA 428
  • The Oracle SID 433
  • Creating a New Database 434
  • Startup and Shutdown 437
  • The Data Dictionary 441
  • Redo Logs 444
  • Control Files 446
  • Trace and Alert Files
  • Database Modes 448
  • Useful Data Dictionary Views 449

Page 428

In this chapter, you'll learn how to perform the following tasks :

  • Create a new Oracle database
  • Manage an instance by bringing it up and down
  • Obtain information from the Oracle system tables
  • Modify the number of control and redo log files

The Parameter File: INIT.ORA

An instance is a set of background processes and memory structures Oracle uses. Every instance must have a parameter file, known as the INIT.ORA file, from which it retrieves the parameters it uses to run and the mode of the database. This parameter file is used by the Oracle Instance Manager tool (which is part of the Enterprise Manager) when the instance is started. After the instance starts, the parameter file is not used again until the next time the instance starts. The parameter file must be on the same machine as the Instance Manager tool.

INIT.ORA parameter files are used to specify the following:

  • Amount of storage allocated for the Oracle memory structures
  • Which rollback segments to use for the instance
  • National language settings
  • Settings for running Oracle in Parallel Server mode
  • Which database and control file to use
  • When to issue checkpoints
  • Limits for database control structures
  • Which non-mandatory background processes to initialize
  • Operating system_specific directory names and locations for Oracle trace, dump, and other files

The file is given the generic name INIT.ORA, but the Oracle instance ID usually is part of the filename. The name can be any filename, but it usually begins with INIT.

The parameter file is an ordinary text file that you modify by using any character-based operating system text editor. You can include the parameters in any order, and you can specify them in uppercase, lowercase, or mixed case.

NOTE
Even though you can include parameters in mixed case, you must specify the names of operating system files according to the operating system's rules for file naming. In UNIX, for example, you must specify a filename exactly as it appears on the file system.

Page 429

You can specify more than 180 parameters. Most of these parameters are common to all platforms on which Oracle runs. The number of parameters increases from one release of the Oracle RDBMS software to the next.

A sample parameter file comes with the Oracle software; its default name is INIT.ORA. You can use this file to run your instance, although you might have to adjust the parameters manually to obtain optimal performance.

It is possible to use many parameter files for the same instance, although only one is used at a time for the instance startup. If you want to use another set of parameters for the run, you must shut down and restart the instance.

Many parameters have a minimum value. If they are set below the minimum value, the Oracle instance does not start up. The values of some parameters are derived from settings in other parameters; normally, you do not need to set them. There are even some parameters that you should not set unless the Oracle support desk staff instructs you to set them. Chapter 1 of the Oracle8 Server Reference Manual (or the Oracle7 Server Reference Manual) describes all the different parameters.

TIP
Use one parameter file for the instance for normal online operations during the day. At night, use a parameter file that optimizes performance for a batch job. However, when using different parameter files, ensure that the correct one is being used at the right time.

In the INIT.ORA file, the only mandatory parameter is the CONTROL_FILES parameter, which names one or more control files to be used for the instance. These control files are used during instance startup to determine the names and locations of the database and to redo log files. Table 19.1 describes additional parameters for the INIT.ORA file.

Table 19.1. Important INIT.ORA parameters.


Parameter Name Description
AUDIT_TRAIL Enables auditing rows to be inserted when set to TRUE, even if the auditing facility was set up by issuing the AUDIT SQL command.
BACKGROUND_DUMP_DEST Controls the directory location where the trace files from the Oracle background processes are written. The alert file, which records significant database events and messages, also is written to this location. You can delete the trace and alert files without affecting the performance of the database.
 continues 

Page 430

Table 19.1. continued


Parameter Name Description
CHECKPOINT_PROCESS Controls whether the Oracle CKPT (checkpoint) background process is to be run. By running the CKPT process, the load is decreased from the LGWR (log writer) process to update the database file headers when a checkpoint occurs.
CONTROL_FILES Names one or more control files to be used for this instance. Control files are used during instance startup to determine the name and location of the database and to redo log files.
DB_BLOCK_BUFFERS Specifies the number of Oracle database blocks to cache in the database buffers area of the SGA (shared global area). The default value of 32 is too small for all but test databases.
DB_BLOCK_SIZE Specifies the size of each Oracle block in the database files. Set this parameter when you first create the database, and then do not alter it.
DML_LOCKS Specifies the maximum number of DML locks that can be taken out by the instance. One DML lock exists for each user for each table undergoing an INSERT, UPDATE, or DELETE operation at any time for the instance.
INIT_SQL_FILES Specifies the name of the SQL files to be executed when the database is created. These files typically are the Oracle-supplied files used to create the data dictionary, the views on the data dictionary, and the views that enable the export and import utilities to run. After these files are run during the CREATE DATABASE operation, they are never executed again.
LICENSE_MAX_SESSIONS Controls the maximum number of user sessions that can be connected to the Oracle database at any time.
LOG_ARCHIVE_DEST Controls the location to which the archived redo log files are written if the database runs in Archive Log mode.
LOG_ARCHIVE_FORMAT Controls the naming format of the archived files if the database is running in Archive Log mode. That way, the redo log sequence number, instance thread number, or a fixed string can be inserted into the filename.
Previous Table of Contents Next


Oracle Unleashed
Oracle Development Unleashed (3rd Edition)
ISBN: 0672315750
EAN: 2147483647
Year: 1997
Pages: 391

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net