免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1795 | 回复: 0
打印 上一主题 下一主题

记录3 [复制链接]

论坛徽章:
1
2015亚冠之大阪钢巴
日期:2015-07-02 09:26:01
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-03-22 17:28 |只看该作者 |倒序浏览

### 区别进程和共享内存
INSTANCE_NAME
Property Description
Parameter type String
Syntax INSTANCE_NAME = instance_id
Default value The instance's SID
Note: The SID identifies the instance's shared memory on a host, but
may not uniquely distinguish this instance from other instances.
Modifiable No
Range of values Any alphanumeric characters
Basic No

In a Real Application Clusters environment, multiple instances can be associated with
a single database service. Clients can override Oracle's connection load balancing by
specifying a particular instance by which to connect to the database. INSTANCE_NAME
specifies the unique name of this instance.
In a single-instance database system, the instance name is usually the same as the
database name.


### 区别数据库中的数据是否一致。如在容灾时,他们的DB_NAME是相同的
DB_NAME
Property Description
Parameter type String
Syntax DB_NAME = database_name
Default value There is no default value.
Modifiable No
Basic Yes
Real Application
Clusters
You must set this parameter for every instance. Multiple instances
must have the same value, or the same value must be specified in the
STARTUP OPEN SQL*Plus command or the ALTER DATABASE
MOUNT SQL statement.

DB_NAME specifies a database identifier of up to 8 characters. This parameter must be
specified and must correspond to the name specified in the CREATE DATABASE
statement.
If you have multiple databases, the value of this parameter should match the Oracle
instance identifier of each one to avoid confusion with other databases running on the
system. The value of DB_NAME should be the same in both the standby and production
initialization parameter files.
The database name specified in either the STARTUP command or the ALTER
DATABASE ... MOUNT statement for each instance of the cluster database must
correspond to the DB_NAME initialization parameter setting.
The following characters are valid in a database name: alphanumeric characters,
underscore (_), number sign (#), and dollar sign ($). No other characters are valid.
Oracle removes double quotation marks before processing the database name.
Therefore you cannot use double quotation marks to embed other characters in the
name. The database name is case insensitive.

### 区别不同的数据库(以实际的数据文件集来区分),容灾时他们的DB_UNIQUE_NAME是必须不同的
DB_UNIQUE_NAME
Property Description
Parameter type String
Syntax DB_UNIQUE_NAME = database_unique_name
Default value Database instances: the value of DB_NAME
Automatic Storage Management instances: +ASM
Modifiable No
Basic Yes
Real Application
Clusters
Multiple instances must have the same value.

DB_UNIQUE_NAME specifies a globally unique name for the database. Databases with
the same DB_NAME within the same DB_DOMAIN (for example, copies of a database
created for reporting or a physical standby) must have a unique DB_UNIQUE_NAME.
Every database's DB_UNIQUE_NAME must be unique within the enterprise.
The value of DB_UNIQUE_NAME can be up to 30 characters and is case insensitive. The
following characters are valid in a database name: alphanumeric characters,
underscore (_), number sign (#), and dollar sign ($).

### 对外提供服务的名字,通过它来影射到具体的实例数据库。
SERVICE_NAMES
Property Description
Parameter type String
Syntax SERVICE_NAMES =
db_service_name [, db_service_name [ ... ] ]
Default value DB_UNIQUE_NAME.DB_DOMAIN if defined
Modifiable ALTER SYSTEM
Range of values Any ASCII string or comma-separated list of string names
Basic No
Real Application
Clusters
Do not set the SERVER_NAMES parameter for Real Application
Clusters (RAC). Instead, define services using Database Configuration
Assistant (DBCA) and manage services using Server Control
(SRVCTL) utility.

SERVICE_NAMES specifies one or more names by which clients can connect to the
instance. The instance registers its service names with the listener. When a client
requests a service, the listener determines which instances offer the requested service
and routes the client to the appropriate instance.
You can specify multiple service names in order to distinguish among different uses of
the same database. For example:
SERVICE_NAMES = sales.acme.com, widgetsales.acme.com
You can also use service names to identify a single service that is available from two
different databases through the use of replication.
If you do not qualify the names in this parameter with a domain, Oracle qualifies them
with the value of the DB_DOMAIN parameter. If DB_DOMAIN is not specified, then no
domain will be applied to the non-qualified SERVICE_NAMES values.


DB_DOMAIN
Property Description
Parameter type String
Syntax DB_DOMAIN = domain_name
Default value There is no default value.
Modifiable No
Range of values Any legal string of name components, separated by periods and up to
128 characters long (including the periods). This value cannot be NULL.
Basic Yes
Real Application
Clusters
You must set this parameter for every instance, and multiple instances
must have the same value.
See Also:
Oracle Database Performance Tuning Guide for more information on
setting this parameter
The data dictionary view "GLOBAL_NAME" on page 5-52
Property Description
Parameter type Integer
Default value The default value corresponds to the maximum I/O size that can be
efficiently performed and is platform-dependent
Modifiable ALTER SESSION, ALTER SYSTEM
Range of values Operating system-dependent
Basic No

In a distributed database system, DB_DOMAIN specifies the logical location of the
database within the network structure. You should set this parameter if this database is
or ever will be part of a distributed system. The value consists of the extension
components of a global database name, consisting of valid identifiers (any
alphanumeric ASCII characters), separated by periods. Oracle recommends that you
specify DB_DOMAIN as a unique string for all databases in a domain.
This parameter allows one department to create a database without worrying that it
might have the same name as a database created by another department. If one sales
department's DB_DOMAIN is JAPAN.ACME.COM, then their SALES database
(SALES.JAPAN.ACME.COM) is uniquely distinguished from another database with
DB_NAME = SALES but with DB_DOMAIN = US.ACME.COM.
If you omit the domains from the name of a database link, Oracle expands the name by
qualifying the database with the domain of your local database as it currently exists in
the data dictionary, and then stores the link name in the data dictionary. The characters
valid in a database domain name are: alphanumeric characters, underscore (_), and
number sign (#).

基于代价的优化器(CBO)是很聪明的,在绝大多数情况下它会选择正确的优化器,减轻了DBA的负担。但有时它也聪明反被聪明误,选择了很差的执行计划,
使某个语句的执行变得奇慢无比。此时就需要DBA进行人为的干预,告诉优化器使用我们指定的存取路径或连接类型生成执行计划,从而使语句高效的运行。
例如,如果我们认为对于一个特定的语句,执行全表扫描要比执行索引扫描更有效,则我们就可以指示优化器使用全表扫描。
在Oracle中,是通过为语句添加 Hints(提示)来实现干预优化器优化的目的。
使用Oracle Hints的语法:
{DELETE|INSERT|SELECT|UPDATE} /*+ hint [text] [hint[text]]... */
注解:
1) DELETE、INSERT、SELECT和UPDATE是标识一个语句块开始的关键字,包含提示的注释只能出现在这些关键字的后面,否则提示无效。
2) “+”号表示该注释是一个Hints,该加号必须立即跟在”/*”的后面,中间不能有空格。
3) hint是下面介绍的具体提示之一,如果包含多个提示,则每个提示之间需要用一个或多个空格隔开。
4) text 是其它说明hint的注释性文本
srvctl enable diskgroup -g DG_ORA
srvctl start diskgroup -g DG_ORA
select a.addr,a.pid from v$process a, v$session b where a.addr=b.paddr;
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP