Sie sind auf Seite 1von 14

Controlling the Database


Start and stop the Oracle database and

components Use Oracle Enterprise Manager Access a database with SQL*Plus Modify database initialization parameters Describe the stages of database startup Describe database shutdown options View the alert log Access dynamic performance views

Start and stop the Oracle database and components

Oracle database and components
Database Instance
a set of memory structures that manage database files.

an Oracle Database process that listen to incoming

database connections/allow connection to the database.

Management Interface
Management Agent - an essential software component

for managing and maintaining the hosts where database runs. Database Control - a web-enable control console used for managing and maintaining database to.

Start and stop the Oracle database and components

Options for Starting Up a Database
Starting Up a Database Using SQL*Plus
Starting the SQL*Plus session, connect to Oracle

Database with administrator privileges, and then issue the STARTUP command.
Starting Up a Database Using Recovery Manager
Using Recovery Manager (RMAN) to execute

STARTUP and SHUTDOWN commands. Preferred when working within the RMAN environment and you do not want to invoke SQL*Plus.
Starting Up a Database Using Oracle Enterprise

Using Oracle Enterprise Manager (EM) to administer

your database, including starting it up and shutting it

Start and stop the Oracle database and components

Starting and Stopping Components
starting: isqlplusctl start stoping: isqlplusctl stop

starting: lsnrctl start stoping: lsnrctl stop restating: lsnrctl reload

Database Control
starting: emctl start dbconsole stoping: emctl stop dbconsole

Oracle Enterprise Manager

Database Home Page

You can check the instance availability, outstanding alerts, etc. here

you can access the Performance, Availability, Server, Schema, Data Instance name, Movement, and Software and Support database pages for managing your database
version, Oracle home location, etc.

Using SQL*Plus
SQL*Plus is a command-line tool which used interactively or in batch mode to: Enter, edit, run, store, retrieve, and save SQL commands and PL/SQL blocks List column definitions for any table Send messages to and accept responses from an end user Perform database administration
$ sqlplus hr/hr SQL*Plus: Release - Production on Tue Aug 5 02:39:20 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select last_name from employees; LAST_NAME ------------------------Abel Ande Atkinson

To start SQL*Plus:




Open a terminal window. At the command-line prompt, enter the SQL*Plus command in the following form: sqlplus <userid>/<pwd> or /nolog If you use the NOLOG option, you must enter CONNECT followed by the username you want to connect as. When prompted, enter the users password. SQL*Plus starts and connects to the default database.

Initialization Parameter Files

When you start the instance, an initialization

parameter file is read. There are two types of parameter files.

Server parameter file (SPFILE): This is the preferred

type of initialization parameter file. It is a binary file that can be written to and read by the database server and must not be edited manually. It resides on the server on which the Oracle instance is executing; it is persistent across shutdown and startup. The default name of this file, which is automatically sought at startup, is spfile<SID>.ora. Text initialization parameter file: This type of initialization parameter file can be read by the database server, but it is not written to by the server. The initialization parameter settings must be set and changed manually by using a text editor so that they are persistent across shutdown and startup. The default name of this file (which is automatically sought at startup if an SPFILE is not found) is init<SID>.ora.

Types of Initialization Parameters

Derived Parameters which their values are

calculated from the values of other parameters. Operating SystemDependent Parameters that their valid values or value ranges of some initialization parameters depend on the host operating system and their size of blocks has a default value that depends on the operating system.

Initialization Parameters: Examples

Parameter CONTROL_FILES DB_FILES PROCESSES DB_BLOCK_SIZE DB_CACHE_SIZE SGA_TARGET MEMORY_TARGET PGA_AGGREGATE_TARGE T SHARED_POOL_SIZE Specifies One or more control file names Maximum number of database files Maximum number of OS user processes that can simultaneously connect Standard database block size used by all tablespaces Size of the standard block buffer cache Total size of all SGA components Oracle systemwide usable memory Amount of PGA memory allocated to all server processes Size of shared pool (in bytes)


Undo space management mode to be used

Changing Initialization Parameter Values

Static parameters:
Can be changed only in the parameter file Require restarting the instance before taking effect

Dynamic parameters:
Can be changed while database is online Can be altered at: Session level System level Are valid for duration of session or based on

SCOPE setting Are changed by using ALTER SESSION and ALTER SYSTEM commands

Oracle10g: Database Administration Guides

Study Guide DSA320S Database Systems

Administration, February 2012 Recommended Oracle Publications