Resultados y Valoración del Experimento
Experimento 3: Aplicación de la Metodología de Integración
Objectives
Copyright Oracle Corporation, 1999. All rights reserved.
®
Objectives
After completing this lesson, you should be able to do the following:
• Create the parameter file
• Start up an instance and open the database • Close a database and shut down the instance • Get and set parameter values
• Manage sessions
...Overview
Overview
Overview of Starting Up and Shutting Down an Oracle Server
An Oracle database is not available to users until the database administrator has started the instance and opened the database.
During a database startup, the following events occur. Each event takes the Oracle database through various stages:
1 Start an instance.
2 Mount the database.
3 Open the database.
Every time an instance is started, Oracle uses a parameter file, which contains initialization parameters, to allocate the System Global Area (SGA) and to start the background processes.
If an instance is started or a database is open, you can follow these steps to shut down the database:
1 Close the database.
2 Dismount the database.
3 Shut down the instance.
When a database is closed, users cannot access it.
Copyright Oracle Corporation, 1999. All rights reserved.
®
Database Control
files Data
files Redolog files Password file Parameter file Trace files ALERT file Instance SGA Shared pool User process Server process PGA Overview
Creating and Using the Parameter File
The parameter file, commonly referred to as the initsid.ora file, is a text file that
can be maintained using a standard operating system editor.
By default, it is located in the $ORACLE_HOME/dbs directory on a UNIX machine and
in the %ORACLE_HOME%\database directory on Windows NT. With Oracle8i on
Windows NT, the parameter file points to the %ORACLE_HOME%\admin\sid \pfile
directory where the actual parameter file is stored. This is done by using the IFILE parameter.
The parameter file is read only during instance startup. If the file is modified, shut down and restart the instance to make the new parameter values effective. Some parameters are dynamic, which means that they can be modified while the instance is running. Dynamic parameters are covered later in this lesson.
The Oracle Enterprise Manager Console or Instance Manager allows the DBA to change and view the initialization parameters. They can be stored either in a local parameter file or in the Oracle Enterprise Manager repository by using stored
configurations. If using stored configurations, the DBA must be connected by the way
Copyright Oracle Corporation, 1999. All rights reserved.
®
initU15.ora
The Initialization Parameter File
SQL> CONNECT / AS SYSDBA SQL> STARTUP PFILE=/DISK1/initU15.ora SQL> CONNECT / AS SYSDBA SQL> STARTUP PFILE=/DISK1/initU15.ora Instance SGA Redo log buffer Data buffer cache Shared pool Data dict. cache Library cache PMON DBWR SMON CKPT LGWR ARCH
...Overview How to Create a Stored Configuration
Try It 3-1 Launch Instance Manager and save a stored configuration.
1 Launch the Oracle Enterprise Manager Console:
Start—>Programs—>Oracle - EMV2 Home—>Oracle Enterprise Management —>Enterprise Manager Console
2 Enter the administrator sysman, the password manager, and the management
server your PC hostname, and click OK.
3 Click the second drawer on the left side of the console and select Instance Manager.
4 Expand your working database and select the initialization parameters in the navigator tree.
5 Your initialization parameters should now be displayed in the right pane of the window. Click Save and name your configuration before clicking OK to save a stored configuration.
Uses of Parameters
The parameters in the initsid.ora file can have a significant effect on database
performance, and some need to be modified in the following ways for production systems:
• Size the System Global Area (SGA) components to optimize performance. • Set database and instance defaults.
• Set user or process limits. • Set limits on database resources.
• Define (on database creation only) various physical attributes of the database, such as the database block size.
• Specify control files, archived log files, ALERT file, and trace file locations.
Copyright Oracle Corporation, 1999. All rights reserved.
®
Uses of Parameters
• Size the System Global Area (SGA). • Set database and instance defaults. • Set user or process limits.
• Set limits on database resources.
• Define various physical attributes of the database, such as the database block size.
• Specify control files, archived log files, the ALERT file, and trace file locations.
...Overview
Rules for Specifying Parameters
• Specify the values in the following format: keyword=value. • All parameters are optional.
• The server has a default value for each parameter. This value may be operating system dependent, depending on the parameter.
• Parameters can be specified in any order. • Comment lines begin with the # symbol.
• Enclose parameters in double quotation marks to include character literals. • Additional files can be included with the keyword IFILE.
• If case is significant for the operating system, then it is also significant in filenames.
• Multiple values are enclosed in parentheses and separated by commas.
Note: Develop a standard for listing parameters; either list them alphabetically or
group them by functionality.
Copyright Oracle Corporation, 1999. All rights reserved.
®
Parameter File Example
# Initialization Parameter File: initU15.ora db_name = U15 control_files = (/DISK1/control01.con, /DISK2/control02.con) db_block_size = 8192 db_block_buffers = 2048 shared_pool_size = 52428800 log_buffer = 64K processes = 50 db_files = 1024 log_files = 10 max_dump_file_size = 10240 background_dump_dest = (/home/disk3/user15/BDUMP) user_dump_dest = (/home/disk3/user15/UDUMP) core_dump_dest = (/home/disk3/user15/CDUMP) rollback_segments = (r01,r02,r03,r04,r05,r06,r07,r08) ...
Parameters That Should Be Specified
Technical Note
The default values depend on the version of the Oracle server.
Parameter Description
BACKGROUND_DUMP_DEST Location where background process trace files are written (LGWR, DBWn, and so on). This is also the location for the alert log.
COMPATIBLE Version of the server with which this instance should be compatible. The default is 8.1.0.
CONTROL_FILES Names of the control files.
DB_BLOCK_BUFFERS Number of blocks cached in the SGA.
DB_NAME Database identifier of eight characters or fewer. This is the only parameter that is required when creating a new database.
SHARED_POOL_SIZE Size in bytes of the shared pool.
USER_DUMP_DEST Location where user debugging trace files are created on behalf of a user process.
...Overview Commonly Modified Parameters
Parameter Description
IFILE Name of another parameter file to be embedded within the current parameter file. Up to three levels of nesting is possible.
LOG_BUFFER Number of bytes allocated to the redo log buffer in the SGA.
MAX_DUMP_FILE_SIZE Maximum size of the trace files, specified as number of operating system blocks.
PROCESSES Maximum number of operating system processes that can connect simultaneously to this instance.
SQL_TRACE Enables or disables the SQL trace facility for every user session.
TIMED_STATISTICS Enables or disables timing in trace files and in monitor screens.