oracle grid rac区别,grid 常用命令和基础概念 (Oracle RAC Administration)

';

RAC Initialization Parameters

CLUSTER_DATABASE: Enables a database to be started in cluster mode. Set this to TRUE.

CLUSTER_DATABASE_INSTANCES: Sets the number of instances in your RAC

environment. A proper setting for this parameter can improve memory use.

CLUSTER_INTERCONNECTS: Specifies the cluster interconnect when there is more than one

interconnect. Refer to your Oracle platform–specific documentation for the use of this

parameter, its syntax, and its behavior. You typically do not need to set the

CLUSTER_INTERCONNECTS parameter. For example, do not set this parameter for the

following common configurations:

? If you have only one cluster interconnect

? If the default cluster interconnect meets the bandwidth requirements of your RAC

database, which is typically the case

? If NIC bonding is being used for the interconnect

? When OIFCFG’s global configuration can specify the right cluster interconnects. It only

needs to be specified as an override for OIFCFG.

DB_NAME: If you set a value for DB_NAME in instance-specific parameter files, the setting

must be identical for all instances.

DISPATCHERS: Set this parameter to enable a shared-server configuration, that is, a server

that is configured to allow many user processes to share very few server processes.

With shared-server configurations, many user processes connect to a dispatcher. The

DISPATCHERS parameter may contain many attributes. Oracle recommends that you

configure at least the PROTOCOL and LISTENER attributes.

PROTOCOL specifies the network protocol for which the dispatcher process generates a

listening end point. LISTENER specifies an alias name for the Oracle Net Services listeners.

Set the alias to a name that is resolved through a naming method, such as a tnsnames.ora

file.

THREAD: If specified, this parameter must have unique values on all instances. The THREAD

parameter specifies the number of the redo thread to be used by an instance. You can specify

any available redo thread number as long as that thread number is enabled and is not used.

Other parameters that can affect RAC database configurations include:

? ASM_PREFERRED_READ_FAILURE_GROUPS: Specifies a set of disks to be the preferred

disks from which to read mirror data copies. The values that you set for this parameter

are instance specific and need not be the same on all instances.

?GCS_SERVER_PROCESSES: This static parameter specifies the initial number of server

processes for an Oracle RAC instance’s Global Cache Service (GCS). The GCS

processes manage the routing of interinstance traffic among Oracle RAC instances. The

default number of GCS server processes is calculated based on system resources. For

systems with one to three CPUs, there are two GCS server processes (LMSn). For

systems with four to fifteen CPUs, there are two GCS server processes (LMSn). For

systems with sixteen more CPUs, the number of GCS server processes equals (the

number of CPUs divided by 32) + 2, dropping any fractions. You can set this parameter

to different values on different instances.

? INSTANCE_NAME: The instance’s SID. The SID identifies the instance’s shared

memory on a host. Any alphanumeric characters can be used. The value for this

parameter is automatically set to the database unique name followed by an incrementing

number during the creation of the database when using DBCA.

? INSTANCE_NUMBER: An Oracle RAC parameter that specifies a unique number that

maps the instance to one free list group for each database object. This parameter must be

set for every instance in the cluster. It is automatically defined during the creation of the

database when using DBCA.

? REMOTE_LISTENER: This dynamic parameter specifies a network name that resolves

to an address or address list of Oracle Net remote listeners (that is, listeners that are not

running on the same machine as this instance). The address or address list is specified in

the TNSNAMES.ORA file or other address repository as configured for your system.

Parameters That Require Identical Settings

? ACTIVE_INSTANCE_COUNT

? ARCHIVE_LAG_TARGET

? COMPATIBLE

? CLUSTER_DATABASE/CLUSTER_DATABASE_INSTANCES

? CONTROL_FILES

? DB_BLOCK_SIZE

? DB_DOMAIN

? DB_FILES

? DB_NAME

? DB_RECOVERY_FILE_DEST/DB_RECOVERY_FILE_DEST_SIZE

? DB_UNIQUE_NAME

? INSTANCE_TYPE (RDBMS or ASM)

? PARALLEL_EXECUTION_MESSAGE_SIZE

? REMOTE_LOGIN_PASSWORD_FILE

? UNDO_MANAGEMENT

Quiescing RAC Databases

? Use the ALTER SYSTEM QUIESCE RESTRICTED

statement from a single instance:

? You must have the Database Resource Manager feature

activated to issue the statement above.

? The database cannot be opened by other instances after

the ALTER SYSTEM QUIESCE… statement starts.

? The ALTER SYSTEM QUIESCE RESTRICTED and ALTER

SYSTEM UNQUIESCE statements affect all instances in a

RAC environment.

? Cold backups cannot be taken when the database is in a

quiesced state.

Quiescing RAC Databases

To quiesce a RAC database, use the ALTER SYSTEM QUIESCE RESTRICTED statement from one

instance. It is not possible to open the database from any instance while the database is in the

process of being quiesced from another instance. After all the non-DBA sessions become

inactive, the ALTER SYSTEM QUIESCE RESTRICTED statement executes and the database is

considered to be quiesced. In a RAC environment, this statement affects all instances.

To issue the ALTER SYSTEM QUIESCE RESTRICTED statement in a RAC environment, you

must have the Database Resource Manager feature activated, and it must have been activated

since instance startup for all instances in the cluster database. It is through the Database

Resource Manager that non-DBA sessions are prevented from becoming active. The following

conditions apply to RAC:

? If you had issued the ALTER SYSTEM QUIESCE RESTRICTED statement, but the Oracle

server has not finished processing it, then you cannot open the database.

? You cannot open the database if it is already in a quiesced state.

? The ALTER SYSTEM QUIESCE RESTRICTED and ALTER SYSTEM UNQUIESCE statements

affect all instances in a RAC environment, not just the instance that issues the command.

Cold backups cannot be taken when the database is in a quiesced state because the Oracle

background processes may still perform updates for internal purposes even when the database

is in a quiesced state. Also, the file headers of online data files continue to appear as if they are

being accessed. They do not look the same as if a clean shutdown were done.

kill全局session

Terminating Sessions on a Specific Instance

SQL> SELECT SID, SERIAL#, INST_ID

2 FROM GV$SESSION WHERE USERNAME='JMW';

SID SERIAL# INST_ID

---------- ---------- ----------

140 3340 2

SQL> ALTER SYSTEM KILL SESSION '140,3340,@2';

System altered.

SQL>

ALTER SYSTEM KILL SESSION '140,3340,@2'

*

ERROR at line 1:

ORA-00031: session marked for kill

sqlplus环境命令的影响范围

How SQL*Plus Commands Affect Instances

Most SQL statements affect the current instance. You can use SQL*Plus to start and stop

instances in the RAC database. You do not need to run SQL*Plus commands as root on

UNIX-based systems or as Administrator on Windows-based systems. You need only the

proper database account with the privileges that you normally use for single-instance Oracle

database administration. The following are some examples of how SQL*Plus commands affect

instances:

? The ALTER SYSTEM SET CHECKPOINT LOCALstatement affects only the instance

to which you are currently connected, rather than the default instance or all instances.

? ALTER SYSTEM CHECKPOINT LOCAL affects the current instance.

? ALTER SYSTEM CHECKPOINT or ALTER SYSTEM CHECKPOINT GLOBAL

affects all instances in the cluster database.

? ALTER SYSTEM SWITCH LOGFILE affects only the current instance.

? To force a global log switch, use the ALTER SYSTEM ARCHIVE LOG CURRENT

statement.

? The INSTANCE option ofALTER SYSTEM ARCHIVE LOG enables you to archive

each online redo log file for a specific instance.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值