Oracle Database Instance - Oracle 实例篇 5

前言:接上一篇Oracle Database Instance - Oracle 实例篇4

Oracle Database Instance - Oracle 实例篇 http://blog.csdn.net/nature_ann/article/details/10081565

1.Parameter Files

<<----1.开启一个数据库实例,数据库必须从服务参数文件和文本初始化参数文件中读取其中的一个文件,服务参数文件是被推荐的。这些文件中包括配置参数的列表信息。2.手动创建一个数据库,你必须用参数文件打开一个实例,然后在使用CREATE DATABASE命令。因此,当数据库不存在的时候,实例和参数文件是可以存在的。---->>

To start a database instance, Oracle Database must read either a server parameter file, which is recommended, or a text initialization parameter file, which is a legacy implementation. These files contain a list of configuration parameters.

To create a database manually, you must start an instance with a parameter file and then issue a CREATE DATABASE command. Thus, the instance and parameter file can exist even when the database itself does not exist.

1.1 Initialization Parameters

<<----1.初始化参数是配置参数,影响着一个实例的基本操作。在数据库启动时,实例从一个文件中读取初始化参数。2.orale提供了很多初始化参数优化,运行在不同的操作平台上。只有少数的参数是必须被显示设置的,在大多数的情况下,参数的默认值是足够的。---->>

Initialization parameters are configuration parameters that affect the basic operation of an instance. The instance reads initialization parameters from a file at startup.

Oracle Database provides many initialization parameters to optimize its operation in diverse environments. Only a few of these parameters must be explicitly set because the default values are adequate in most cases.

1.1.1  Functional Groups of Initializations

<<----大多数初始化参数属于下面的功能组:1.实体; 2.规定的范围; 3.容量的影响---->>

Most initialization parameters belong to one of the following functional groups:

>>Parameters that name entities such as files or directories

>>Parameters that set limits for a process, database resource, or the database itself

>>Parameters that affect capacity, such as the size of the SGA (these parameters are called variable parameters)

Variable parameters are of particular interest to database administrators because they can use these parameters to improve database performance.

1.1.2  Basic and Advanced Initialization

<<----初始化参数被分成两组:基本参数和高级参数。在大多数的情况下能被设置和调整的基本参数大概又30多个。比如:数据库名字,本地控制文件的地址,数据库块的大小,undo 表空间等。在极小数的情况下,才修改高级参数来提升系统的性能。---->>

Initialization parameters are divided into two groups: basic and advanced. In most cases, you must set and tune only the approximately 30 basic parameters to obtain reasonable performance. The basic parameters set characteristics such as the database name, locations of the control files, database block size, and undo tablespace.

In rare situations, modification to the advanced parameters may be required for optimal performance. The advanced parameters enable expert DBAs to adapt the behavior of the Oracle Database to meet unique requirements.

Oracle Database provides values in the starter initialization parameter file provided with your database software, or as created for you by the Database Configuration Assistant. You can edit these Oracle-supplied initialization parameters and add others, depending on your configuration and how you plan to tune the database. For relevant initialization parameters not included in the parameter file, Oracle Database supplies defaults.

1.2 Server Parameter Files

<<----服务参数文件存储着被oracle数据库管理的初始化参数:有如下的特点;1.一个数据库只有一个服务参数文件,这个文件必须是在数据库主机上。2.这个服务参数文件只能被Oracle数据库读写,不能被客户端应用读写。3.这个服务参数文件是二进制的,不能被文本编辑器修改。4.初始化参数是被持久的保留在服务参数文件里面。---->>

A server parameter file is a repository for initialization parameters that is managed by Oracle Database. A server parameter file has the following key characteristics:

>>Only one server parameter file exists for a database. This file must reside on the database host.

>>The server parameter file is written to and read by only by Oracle Database, not by client applications.

>>The server parameter file is binary and cannot be modified by a text editor.

>>Initialization parameters stored in the server parameter file are persistent. Any changes made to the parameters while a database instance is running can persist across instance shutdown and startup.

<<---服务参数文件是用命令CREATE SPFILE 从文本参数文件初始构建的,也可以用DBCA来创建.--->>

A server parameter file eliminates the need to maintain multiple text initialization parameter files for client applications. A server parameter file is initially built from a text initialization parameter file using the CREATE SPFILE statement. It can also be created directly by the Database Configuration Assistant.

1.3 Text Initialization Parameter Files

<<---文本初始化参数文件包括初始化参数的列表。这是一个旧的执行参数文件,有如下特点:1. 当启动或关闭数据库、文本初始化参数文件必须位于同一主机作为客户端应用程序连接数据库。2.文本初始化参数文件是基于文本的,不是二进制的。3.Oracle数据库可以读文本初始化参数文件,但是不能写,只用手动用文本编辑器修改它。4.ALTER SYSTEM 只影响着当前的实例,你必须手动更新文本参数文件或者重启数据库使它生效。--->>

A text initialization parameter fileis a text file that contains a list of initialization parameters. This type of parameter file, which is a legacy implementation of the parameter file, has the following key characteristics:

>>When starting up or shutting down a database, the text initialization parameter file must reside on the same host as the client application that connects to the database.

>>A text initialization parameter file is text-based, not binary.

>>Oracle Database can read but not write to the text initialization parameter file. To change the parameter values you must manually alter the file with a text editor.

>>Changes to initialization parameter values byALTERSYSTEM are only in effect for the current instance. You must manually update the text initialization parameter file and restart the instance for the changes to be known.

<<---文本初始化参数文件包含一系列的键值对,如下所示。 -->>

The text initialization parameter file contains a series ofkey=value pairs, one per line. For example, a portion of an initialization parameter file could look as follows:

db_name=tom
control_files=/u01/oradata/tom_cf.dbf
db_block_size=8192
open_cursors=52
undo_management=auto
shared_pool_size=280M
pga_aggregate_target=29M
 

<<---假设两个计算机clienta clientb,两个客户端都能用sql*plus启动数据库,这种情况下,每一个计算机上都必须存在一个文本初始化参数文件。如下图所示。--->>

To illustrate the manageability problems that text parameter files can create, assume that you use computers clienta and clientb and must be able to start the database with SQL*Plus on either computer. In this case, two separate text initialization parameter files must exist, one on each computer, as shown in 1.

A server parameter file solves the problem of the proliferation of parameter files.

           图 1 Multiple Initialization Parameter Files

 

1.4 Modification of Initialization Parameter Values

<<---参数分为静态参数和动态参数。静态参数包括:DB_BLOCK_SIZE,DB_NAME,COMPATIBLE。动态参数被分为会话级参数和系统级参数:会话级参数(比如NLS_DATE_FORMAT),影响的是当前的用户会话;系统级参数(比如MEMORY_TARGET),影响的是数据库和所有会话。-->>

You can adjust initialization parameters to modify the behavior of a database. The classification of parameters as static or dynamic determines how they can be modified. Table   1 summarizes the differences.

Table 1 Static and Dynamic Initialization Parameters

Characteristic

Static

Dynamic

Requires modification of the parameter file (text or server)

Yes

No

Requires database instance restart before setting takes affect

Yes

No

Described as "Modifiable" in Oracle Database Reference  initialization parameter entry

No

Yes

Modifiable only for the database or instance

Yes

No

 

Static parameters include DB_BLOCK_SIZE, DB_NAME, and COMPATIBLE. Dynamic parameters are grouped into session-level parameters, which affect only the current user session, and system-level parameters, which affect the database and all sessions. For example, MEMORY_TARGET is a system-level parameter, while NLS_DATE_FORMAT is a session-level parameter .

<<---Scope参数的范围类型:内存memory(只在当前实例生效。数据库关闭重启失效),服务参数文件spfile(写到服务参数文件,但是不影响当前实例,直到实例重启前。),两者both默认是both(即写到内存,又写到服务参数文件)。-->>

The scope of a parameter change depends on when the change takes effect. When an instance has been started with a server parameter file, you can use the ALTER SYSTEMSET statement to change values for system-level parameters as follows:

>>SCOPE=MEMORY

Changes apply to the database instance only. The change will not persist if the database is shut down and restarted.

>>SCOPE=SPFILE

Changes are written to the server parameter file but do not affect the current instance. Thus, the changes do not take effect until the instance is restarted.

>>SCOPE=BOTH

Changes are written both to memory and to the server parameter file. This is the default scope when the database is using a server parameter file.

<<---打开告警日志,观察修改的参数的变化。 -->>

The database prints the new value and the old value of an initialization parameter to the alert log. As a preventative measure, the database validates changes of basic parameter to prevent illegal values from being written to the server parameter file.

 

 

待续。。。。

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值