管理OralceASM实例

时间:2020-01-09
本文章向大家介绍管理OralceASM实例,主要包括管理OralceASM实例使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

Administration of Oracle ASM Instances

  Oracle ASM is typically installed in an Oracle Grid Infrastructure home separate from the Oracle Database home. Only one Oracle ASM instance is supported on a server in a standard configuration; however, Oracle Flex ASM provides additional configuration options.

  When managing an Oracle ASM instance, the administration activity should be performed in the Oracle Grid Infrastructure home.

Using Oracle Grid Infrastructure for a Standalone Server

在独立服务器上使用Oracle Grid基础结构

独立服务器的Oracle网格基础结构(Oracle Restart)提高了Oracle数据库的可用性。

在为独立服务器安装Oracle Grid基础结构时,它包括Oracle ASM和Oracle Restart。用于独立服务器的Oracle网格基础设施(Oracle Restart)在Oracle网格基础设施home中运行,您可以将其与Oracle数据库home分开安装。

Oracle Restart为在服务器上运行的单实例(非集群)Oracle数据库、Oracle ASM实例、服务、侦听器和任何其他进程提供托管启动和重启。如果在硬件或软件故障后出现服务中断,Oracle Restart将自动采取必要步骤重新启动组件。

 Server Control Utility(SRVCTL) 服务控制实用工具

使用服务器控制实用工具(SRVCTL),您可以向Oracle Restart添加组件,例如Oracle ASM实例。然后为Oracle ASM实例启用Oracle Restart保护。使用SRVCTL,还可以删除或禁用Oracle重启保护。

Connecting To and Starting Up an Oracle ASM Instance

启动Oracle ASM实例的方式与启动Oracle数据库实例的方式类似,只是有一些细微的差别。

当用SQL*Plus启动Oracle ASM实例时,请注意以下几点:

要使用SQL*Plus连接到本地Oracle ASM实例,请将ORACLE_SID环境变量设置为Oracle ASM系统标识符(SID)。

单实例数据库的默认ASM SID是+ASM, Oracle RAC节点的默认ASM SID是+ASMnode_number,其中node_number是节点的编号。ORACLE_HOME环境变量必须设置为安装了ASM的网格基础结构home。

注意:Oracle建议您不要更改默认的Oracle ASM SID名称。

初始化参数文件必须包含以下条目:

 

INSTANCE_TYPE = ASM

此参数指示启动的是Oracle ASM实例,而不是数据库实例。

当您运行启动(STARTUP)命令,而不是试图挂载和打开数据库时,该命令尝试挂载ASM磁盘组。

在Oracle ASM实例启动之后,可以使用ALTER DISKGROUP挂载磁盘组……MOUNT命令。

在启动关联的Oracle ASM实例时,不必运行关联的Oracle数据库实例。

下面的列表描述了ASM如何解释SQL* +启动命令参数。

 interpret  说明;口译

FORCE Parameter

在重新启动之前,向Oracle ASM实例发出SHUTDOWM ABORT

如果Oracle自动存储管理集群文件系统(Oracle ACFS)文件系统当前安装在Oracle ADVM卷上,则应首先卸载该文件系统。否则,应用程序会遇到I/O错误,而且在保护ASM存储之前,可能不会将Oracle ACFS用户数据和元数据写入存储。

MOUNT or OPEN Parameter

挂载在ASM_DISKGROUPS初始化参数中指定的磁盘组。如果没有指定命令参数,这是默认设置。

NOMOUNT参数

在不挂载任何磁盘组的情况下启动Oracle ASM实例。

 RESTRICT Parameter

限制参数

以受限模式启动实例,该模式仅允许具有创建会话和受限会话系统特权的用户访问。您可以将限制子句与MOUNT、NOMOUNT和OPEN子句组合使用。

在受限模式下,数据库实例不能使用磁盘组。换句话说,数据库无法打开该磁盘组中的文件。此外,集群中的任何其他实例都不能挂载磁盘组。以受限模式挂载磁盘组只允许一个ASM实例挂载磁盘组。此模式对于挂载磁盘组以修复配置问题非常有用。

The following is a sample SQL*Plus session for starting an Oracle ASM instance.

SQLPLUS /NOLOG
SQL> CONNECT SYS AS SYSASM
Enter password: sys_password
Connected to an idle instance.

SQL> STARTUP
ASM instance started

Total System Global Area   71303168 bytes
Fixed Size                 1069292 bytes
Variable Size              45068052 bytes
ASM Cache                  25165824 bytes
ASM disk groups mounted

Starting Up an Oracle ASM instance with an Incorrect SPFILE Path

使用错误的SPFILE路径打开ASM实例

如果GPnP配置文件中的SPFILE路径不正确,可以按如下方式启动Oracle ASM实例:

创建一个PFILE,其中包含一行(one line)内容,用于标识SPFILE的路径。

例如:

创建/ oracle / dbs / spfileasm_init。ora文件包含:

SPFILE = ' +DATA/ asm / asmparameterfile / asmspfile.ora '

使用初始化参数文件启动实例。

SQL >STARTUP PFILE = / oracle / dbs / spfileasm_init.ora

实例运行后,使用ASMCMD spset命令更新GPnP配置文件中的SPFILE路径。看到spset。

例如:

ASMCMD > spset +DATA/ asm / asmparameterfile / asmspfile.ora

About Mounting Disk Groups at Startup

关于在启动时挂载磁盘组

在启动时,Oracle ASM实例尝试挂载以下磁盘组:

在ASM_DISKGROUPS初始化参数中指定的磁盘组

集群同步服务(CSS)用于投票文件的磁盘组

Oracle Clusterware用于Oracle集群注册表(OCR)的磁盘组

ASM实例用来存储ASM服务器参数文件(SPFILE)的磁盘组

如果在前面的列表中没有找到磁盘组,那么ASM实例在启动时不会挂载任何磁盘组。在Oracle ASM实例启动之后,可以使用ALTER DISKGROUP……MOUNT命令挂载磁盘组。有关更多信息,请参见挂载和卸载磁盘组。

About Restricted Mode

在执行维护时,可以使用STARTUP RESTRICT命令控制对Oracle ASM实例的访问。当Oracle ASM实例在此模式下处于活动状态时,所有在ASM_DISKGROUPS参数中定义的磁盘组都将以受限模式挂载。这将阻止数据库连接到Oracle ASM实例。此外,ALTER SYSTEM语句的restricted子句在Oracle ASM实例中是禁用的。扩展了ALTER DISKGROUP DISKGROUP挂载语句,使ASM能够在受限模式下挂载磁盘组。

在受限模式下挂载磁盘组时,磁盘组只能由一个实例挂载。当磁盘组以受限模式挂载时,该节点上的Oracle ASM客户端无法访问该磁盘组。受限模式允许您在Oracle ASM实例中的磁盘组上执行维护任务,而不会受到客户端的干扰。

重新平衡磁盘组处于受限模式时发生的操作,消除在Oracle RAC环境中Oracle ASM实例之间发生的锁定和解锁区段映射消息传递。这提高了总体的再平衡吞吐量。在维护期结束时,必须显式地卸载磁盘组并以正常模式重新安装。

About Shutting Down an Oracle ASM Instance

可以通过在SQL*Plus中运行shutdown命令来启动Oracle ASM关闭过程。

在运行此命令之前,请确保将ORACLE_SID环境变量设置为Oracle ASM SID,以便可以连接到本地的Oracle ASM实例。单实例数据库的默认ASM SID是+ASM, Oracle RAC节点的默认ASM SID是+ASMnode_number,其中node_number是节点的编号。ORACLE_HOME环境变量必须设置为安装了ASM的网格基础结构home。

如果您不使用Oracle Flex ASM, Oracle强烈建议您关闭使用Oracle ASM实例的所有数据库实例,并在尝试关闭Oracle ASM实例之前卸载挂载在Oracle ASM Dynamic Volume Manager (Oracle ADVM)卷上的所有文件系统。如果您正在使用Oracle Flex ASM,如果关闭了一个Oracle ASM实例,Oracle Flex ASM客户端就会转移到其他正在运行的Oracle ASM实例。

如果将Oracle集群注册表(OCR)或投票文件存储在磁盘组中,则只能通过关闭Oracle ASM实例作为关闭节点上的集群件的一部分来卸载磁盘组。要关闭集群,运行crsctl stol crs

To shut down an Oracle ASM instance, perform the following steps:

SQLPLUS /NOLOG
SQL> CONNECT SYS AS SYSASM
Enter password: sys_password
Connected.
SQL> SHUTDOWN NORMAL

下面的列表描述了关闭模式和Oracle ASM实例在每种模式下的行为。

正常的条款 NORMAL Clause

在执行有序地卸载所有磁盘组并关闭Oracle ASM实例之前,ASM会等待任何正在进行的SQL完成。在实例关闭之前,ASM会等待所有当前连接的用户从实例断开连接。如果有任何数据库实例连接到Oracle ASM实例,那么SHUTDOWN命令将返回一个错误并让Oracle ASM实例继续运行。正常是默认的关机模式。

立即或交易条款 IMMEDIATE or TRANSACTIONAL Clause

在执行有序地卸载所有磁盘组并关闭Oracle ASM实例之前,ASM会等待任何正在进行的SQL完成。ASM不会等待当前连接到实例的用户断开连接。如果有任何数据库实例连接到Oracle ASM实例,那么SHUTDOWN命令将返回一个错误并让Oracle ASM实例继续运行。因为ASM实例不包含任何事务,所以事务模式的行为与即时模式相同。

Because the Oracle ASM instance does not contain any transactions, the TRANSACTIONAL mode behaves the same as IMMEDIATE mode.

终止条款  ABORT Clause

ASM实例立即关闭,不需要有序地卸载磁盘组。这将导致下一次ASM启动时发生恢复。

如果任何数据库实例连接到Oracle ASM实例,那么数据库实例将中止。

如果任何Oracle自动存储管理集群文件系统(Oracle ACFS)文件系统当前安装在Oracle ADVM卷上,那么应该首先卸载这些文件系统。否则,应用程序会遇到I/O错误,而且在保护ASM存储之前,可能不会将Oracle ACFS用户数据和元数据写入存储。

About Administering Oracle ASM Instances with Server Control Utility

关于使用服务器控制实用程序管理Oracle ASM实例

Server Control Utility  = srvctl
服务控制实用程序

  

除了本节描述的Oracle ASM管理过程之外,您还可以在集群化的Oracle ASM环境中使用服务器控制实用工具(SRVCTL)来执行以下Oracle ASM管理任务:

在Oracle集群注册表(OCR)中添加和删除Oracle ASM Oracle Clusterware (CRS)资源

启用、禁用、启动和停止ASM实例

显示Oracle ASM实例配置和状态

添加、修改和删除ASM网络资源

添加、修改、删除、启用、禁用、启动和停止ASM侦听器资源

About Out of Place Upgrades

With an out-of-place upgrade, the installer installs the newer version of Oracle Grid Infrastructure in a separate Oracle Grid Infrastructure home.

An in-place upgrade of Oracle Grid Infrastructure 11g Release 2 (11.2) is not supported. For example, an upgrade of Oracle Grid Infrastructure 11gRelease 2 (11.2.0.1) to Oracle Grid Infrastructure 11g Release 2 (11.2.0.2) must be an out of place upgrade.

See Also:

https://www.oracle.com/pls/topic/lookup?ctx=en/database/oracle/oracle-database/19/ostmg&id=CWGEN

Oracle Grid Infrastructure Installation and Upgrade Guide for information about installing Oracle Grid Infrastructure, out of place upgrades, and performing rolling upgrades of Oracle Grid Infrastructure and Oracle ASM

About Configuring Oracle Grid Infrastructure with the Configuration Wizard

关于使用配置向导配置Oracle网格基础设施

  The Oracle Grid Infrastructure configuration wizard can update the configuration of an Oracle Grid Infrastructure environment after the software has been installed. The configuration wizard accepts your input, validates the input, and populates the configuration data into the CRSCONFIG_PARAMS file. If additional scripts must be run, the configuration wizard directs you to run those scripts.

  安装软件后,Oracle网格基础设施配置向导可以更新Oracle网格基础设施环境的配置。配置向导接受您的输入,验证输入,并将配置数据填充到CRSCONFIG_PARAMS文件中。如果必须运行其他脚本,则配置向导将指示您运行这些脚本。

About Active Session History Sampling for Oracle ASM

sampling 取样,抽样

关于Oracle ASM的活动会话历史采样

活动会话历史采样现在可以在Oracle ASM实例中使用。此活动在动态V$ACTIVE_SESSION_HISTORY视图中公开。活动会话历史记录采样需要Oracle ASM实例的诊断包许可证。

About Oracle Home User on Windows

Oracle Database supports the use of an Oracle home user, which can be specified at installation time. The Oracle home user is associated with an Oracle home and it cannot be changed after installation. Different Oracle homes on a system can share the same Oracle home user or use different Oracle home user names.

In previous releases on Windows operating systems, Oracle services were required to run as Local System privileges, which are fully privileged. This feature enables the database, listener, and job scheduler services to run with low and non-administrative user privileges to allow tighter control of security. The Oracle home user can be a built-in account or a Windows user account. A Windows user account should be a low privileged (non-Administrator) account to ensure that the Oracle home user has a limited set of privileges, ensuring that Oracle Database services have only those privileges required to run Oracle products. The Windows user account can be a Local User, a Domain User, or a Managed Services Account in general. However, Oracle RAC, Oracle Restart, and Oracle Grid Infrastructure installations require the use of the Domain User as the Oracle home user because a clusterwide identity is necessary.

原文地址:https://www.cnblogs.com/zykLove/p/12172554.html