Oracle 11g 新特性 -- Oracle Restart 说明(转载)

转载:http://blog.csdn.net/tianlesoftware/article/details/8435670

一.  OHASD 说明

Oracle 的Restart 特性是Oracle 11g里的新特性,在讲这个特性之前先看一下Oracle 11g RAC的进程。之前的Blog 有说明。

Oracle 11gR2RAC 进程说明

http://blog.csdn.net/tianlesoftware/article/details/6009962

Oracle 11gR2 中对CRSD资源进行了重新分类: Local Resources 和 Cluster Resources。

[[email protected] ~]$ crsctl stat res -t

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

NAME           TARGET  STATE       SERVER                  STATE_DETAILS

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

Local Resources

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

ora.DATA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.FRA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.LISTENER.lsnr

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.OCRVOTING.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.asm

ONLINE  ONLINE      rac1                    Started

ONLINE  ONLINE      rac2                    Started

ora.gsd

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.net1.network

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.ons

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

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

Cluster Resources

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

ora.LISTENER_SCAN1.lsnr

1        ONLINE  ONLINE      rac1

ora.cvu

1        ONLINE  ONLINE      rac1

ora.oc4j

1        ONLINE  ONLINE      rac1

ora.rac1.vip

1        ONLINE  ONLINE      rac1

ora.rac2.vip

1        ONLINE  ONLINE      rac2

ora.scan1.vip

1        ONLINE  ONLINE      rac1

ora.sdd.db

1        ONLINE  ONLINE      rac1                     Open

2        ONLINE  ONLINE      rac2                     Open

[[email protected] ~]$

在之前的Blog中,提到Oracle 的命令有分层。

Oracle RAC 常用维护工具和命令

http://blog.csdn.net/tianlesoftware/article/details/5358573

对应起来:

Local Resources 属于应用层,

Cluster Resources 属于集群层。

我们这里要说的Oracle Restart 就是对Cluster Resource的一个管理。

在Oracle 10g RAC 安装时,在运行root.sh时,会在/etc/inittab文件的最后加入ora.crs,ora.cssd,ora.evmd 三个进程。 这样以后每次系统启动时,Clusterware 也会自动启动,其中EVMD和CRSD 两个进程如果出现异常,则系统会自动重启这两个进程,如果是CSSD 进程异常,系统会立即重启。

而在Oracle 11gR2中,只会将ohasd 写入/etc/inittab 文件。

官网对OHASD 的说明:

Oracle High Availability Services Daemon(OHASD) :This process anchors the lower part of the Oracle Clusterwarestack, which consists of processes that facilitate cluster operations.

可以使用如下命令查看OHASD管理的资源:

[[email protected] ~]$ crsctl stat res -init -t

[[email protected] ~]$ ps -ef|grep ohasd

root     1057     1  0 Dec21 ?        00:00:00 /bin/sh /etc/init.d/init.ohasdrun

root     2274     1  0 Dec21 ?        00:22:53/u01/app/grid/11.2.0/bin/ohasd.bin reboot

二.  Oracle Restart 说明

2.1 说明

官网的文档如下:

About Oracle Restart

http://docs.oracle.com/cd/E11882_01/server.112/e10595/restart001.htm

Oracle Restartimproves the availability of your Oracle database. When you install OracleRestart, various Oracle components can be automatically restarted after ahardware or software failure or whenever your database host computer restarts.

--Oracle Restart 能提高数据库的可用性,当安装了Oracle Restart 之后,在系统出现硬件或者软件问题,或者主机重启之后,OracleRestart 管理的组件都能自动的进行启动。

Oracle Restart 管理的组件如下表:


Component


Notes


Database instance


Oracle Restart can accommodate multiple databases on a single host computer.


Oracle Net listener


-


Database services


Does not include the default service created upon installation because it is automatically managed by Oracle Database, and does not include any default services created during database creation.


Oracle Automatic Storage Management (Oracle ASM) instance


-


Oracle ASM disk groups


Restarting a disk group means mounting it.


Oracle Notification Services (ONS)


In a standalone server environment, ONS can be used in Oracle Data Guard installations for automating failover of connections between primary and standby database through Fast Application Notification (FAN). ONS is a service for sending FAN events to integrated clients upon failover.

OracleRestart 会周期性的检查和监控这些组件的状态,如果发现某个组件fail,那么就会shutdown并restart 该组件。

Oracle Restart 只能用于not-cluster的环境。 对于Oracle RAC 环境,Oracle Clusterware 会提供automatically restart的功能。

对于非集群环境,只需要安装OracleGrid Infrastructure,在安装的时候选择“仅安装网格基础结构软件”,然后运行如下脚本来安装Oracle Restart:

$GRID_HOME/crs/install/roothas.pl

如果是先安装了Oracle Restart,然后使用dbca创建了实例,那么DBCA会自动的把Oracle 添加到OracleRestart的配置里。 当DBCA启动数据库时,数据库会和其他组件(如disk group)之间建立依赖关系,然后Oracle Restart 开始管理数据库。

当安装了Oracle Restart 后,一些Create操作会自动的创建Oracle 的Compents并将其自动的添加到Oracle Restart configuration中。 这类操作如下表所示:


Create Operation


Created Component Automatically Added to Oracle Restart Configuration?


Create a database with OUI or DBCA


Yes


Create a database with the CREATE DATABASE SQL statement


No


Create an Oracle ASM instance with OUI, DBCA, or ASMCA


Yes


Create a disk group (any method)


Yes


Add a listener with NETCA


Yes


Create a database service with SRVCTL


Yes


Create a database service by modifying the SERVICE_NAMES initialization parameter


No


Create a database service with DBMS_SERVICE.CREATE_SERVICE


No


Create a standby database


No

同样,一些delete/drop/remove操作也会自动的从Oracle Restart Configuration中进行更新,具体如下表:


Operation


Deleted Component Automatically Removed from Oracle Restart Configuration?


Delete a database with DBCA


Yes


Delete a database by removing database files with operating system commands


No


Delete a listener with NETCA


Yes


Drop an Oracle ASM disk group (any method)


Yes


Delete a database service with SRVCTL


Yes


Delete a database service by any other means


No

Oracle Restart 由OHASD 进程来管理。 这个就是第一节介绍OHASD的原因。 对于standalone server,使用OHASD 来管理Oracle Restart ,并且不需要CRSD进程的支持。 可以使用OHASD管理的组件如下:

1.CSSD: This is used for Group Services as it was inprevious releases (when it was installed using “localconfig add“)

2.ASM Instance :if Automatic Storage Management is used.

3.ASM Disk Groups: if Automatic Storage Management is used.

4.Listeners

5.Database Instances

6.Database Services

7.ONS/EONS :Used for automatic failover of connections  usingFast Application Notification (FAN) in a Data Guard environment

OHASD  是一个后台的守护进程,其可用来启动和监控OracleRestart 进程。 该进程由/etc/init.d/ohasd 脚本来初始化,并有root用户来执行ohasd.bin 来启动。

使用Oracle Restart 有如下好处:

1.  Automatic resource startup atboot time without using shell scripts or the Oracle supplied dbstart and dbshut scripts.

2.  Resources are started in thecorrect sequence based on dependencies in the OLR(Oracle Local Resource).

3.  Resources are also monitored by ohasd foravailability and may be restarted in place if they fail.

4.  Role managed services for DataGuard.

5.  Consistency of command lineinterfaced tools using crsctl and srvctl as is done withclusters.

2.2 使用CRSCTL 命令管理Oracle Restart Stack

官网的说明如下:

Stopping and Restarting Oracle Restart forMaintenance Operations

http://docs.oracle.com/cd/E11882_01/server.112/e10595/restart004.htm

CRSCTL Command Reference

http://docs.oracle.com/cd/E11882_01/server.112/e25494/restart006.htm

CRSCTL 命令可选参数:


Command


Description


check


Displays the Oracle Restart status.


config


Displays the Oracle Restart configuration.


disable


Disables automatic restart of Oracle Restart.


enable


Enables automatic restart of Oracle Restart.


start


Starts Oracle Restart.


stop


Stops Oracle Restart.

注:

以下操作需要已root用户执行

2.2.1 手工停止Oracle Restart: crsctl stop has [-f]

注意:该命令只争对当前服务器有效。

[[email protected] bin]# ./crsctl stop has

CRS-2791: Starting shutdown of Oracle HighAvailability Services-managed resources on ‘rac1‘

CRS-2673: Attempting to stop ‘ora.crsd‘ on‘rac1‘

CRS-2790: Starting shutdown of ClusterReady Services-managed resources on ‘rac1‘

CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN1.lsnr‘on ‘rac1‘

CRS-2673: Attempting to stop‘ora.OCRVOTING.dg‘ on ‘rac1‘

CRS-2673: Attempting to stop ‘ora.sdd.db‘on ‘rac1‘

CRS-2673: Attempting to stop‘ora.LISTENER.lsnr‘ on ‘rac1‘

CRS-2673: Attempting to stop ‘ora.oc4j‘ on‘rac1‘

CRS-2673: Attempting to stop ‘ora.cvu‘ on‘rac1‘

CRS-2677: Stop of ‘ora.LISTENER_SCAN1.lsnr‘on ‘rac1‘ succeeded

CRS-2673: Attempting to stop‘ora.scan1.vip‘ on ‘rac1‘

CRS-2677: Stop of ‘ora.LISTENER.lsnr‘ on‘rac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.rac1.vip‘on ‘rac1‘

CRS-2677: Stop of ‘ora.rac1.vip‘ on ‘rac1‘succeeded

CRS-2672: Attempting to start‘ora.rac1.vip‘ on ‘rac2‘

CRS-2677: Stop of ‘ora.scan1.vip‘ on ‘rac1‘succeeded

CRS-2672: Attempting to start ‘ora.scan1.vip‘on ‘rac2‘

CRS-2676: Start of ‘ora.scan1.vip‘ on‘rac2‘ succeeded

CRS-2676: Start of ‘ora.rac1.vip‘ on ‘rac2‘succeeded

CRS-2672: Attempting to start‘ora.LISTENER_SCAN1.lsnr‘ on ‘rac2‘

CRS-2677: Stop of ‘ora.sdd.db‘ on ‘rac1‘succeeded

CRS-2673: Attempting to stop ‘ora.DATA.dg‘on ‘rac1‘

CRS-2673: Attempting to stop ‘ora.FRA.dg‘on ‘rac1‘

CRS-2676: Start of‘ora.LISTENER_SCAN1.lsnr‘ on ‘rac2‘ succeeded

CRS-2677: Stop of ‘ora.FRA.dg‘ on ‘rac1‘succeeded

CRS-2677: Stop of ‘ora.DATA.dg‘ on ‘rac1‘succeeded

CRS-2677: Stop of ‘ora.oc4j‘ on ‘rac1‘succeeded

CRS-2672: Attempting to start ‘ora.oc4j‘ on‘rac2‘

CRS-2677: Stop of ‘ora.cvu‘ on ‘rac1‘succeeded

CRS-2672: Attempting to start ‘ora.cvu‘ on‘rac2‘

CRS-2676: Start of ‘ora.cvu‘ on ‘rac2‘succeeded

CRS-2677: Stop of ‘ora.OCRVOTING.dg‘ on‘rac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.asm‘ on‘rac1‘

CRS-2677: Stop of ‘ora.asm‘ on ‘rac1‘succeeded

CRS-2676: Start of ‘ora.oc4j‘ on ‘rac2‘succeeded

CRS-2673: Attempting to stop ‘ora.ons‘ on‘rac1‘

CRS-2677: Stop of ‘ora.ons‘ on ‘rac1‘succeeded

CRS-2673: Attempting to stop‘ora.net1.network‘ on ‘rac1‘

CRS-2677: Stop of ‘ora.net1.network‘ on‘rac1‘ succeeded

CRS-2792: Shutdown of Cluster ReadyServices-managed resources on ‘rac1‘ has completed

CRS-2677: Stop of ‘ora.crsd‘ on ‘rac1‘succeeded

CRS-2673: Attempting to stop ‘ora.mdnsd‘ on‘rac1‘

CRS-2673: Attempting to stop ‘ora.ctssd‘ on‘rac1‘

CRS-2673: Attempting to stop ‘ora.evmd‘ on‘rac1‘

CRS-2673: Attempting to stop ‘ora.asm‘ on‘rac1‘

CRS-2677: Stop of ‘ora.evmd‘ on ‘rac1‘succeeded

CRS-2677: Stop of ‘ora.mdnsd‘ on ‘rac1‘succeeded

CRS-2677: Stop of ‘ora.ctssd‘ on ‘rac1‘succeeded

CRS-2677: Stop of ‘ora.asm‘ on ‘rac1‘succeeded

CRS-2673: Attempting to stop‘ora.cluster_interconnect.haip‘ on ‘rac1‘

CRS-2677: Stop of‘ora.cluster_interconnect.haip‘ on ‘rac1‘ succeeded

CRS-2673: Attempting to stop ‘ora.cssd‘ on‘rac1‘

CRS-2677: Stop of ‘ora.cssd‘ on ‘rac1‘succeeded

CRS-2673: Attempting to stop ‘ora.crf‘ on‘rac1‘

CRS-2677: Stop of ‘ora.crf‘ on ‘rac1‘succeeded

CRS-2673: Attempting to stop ‘ora.gipcd‘ on‘rac1‘

CRS-2677: Stop of ‘ora.gipcd‘ on ‘rac1‘succeeded

CRS-2673: Attempting to stop ‘ora.gpnpd‘ on‘rac1‘

CRS-2677: Stop of ‘ora.gpnpd‘ on ‘rac1‘succeeded

CRS-2793: Shutdown of Oracle HighAvailability Services-managed resources on ‘rac1‘ has completed

CRS-4133: Oracle High Availability Serviceshas been stopped.

[[email protected] bin]#

注意:

我这里测试的是Oracle11gR2的环境,我们在节点1上执行该命令,只把节点1上的进程停了,而把相关的资源转移到我们的节点2上了,因此也证实了我们上面的说的,该命令只争对当前服务器有效。

2.2.2 启动HAS

[[email protected] bin]# ./crsctl start has

CRS-4123: Oracle High Availability Serviceshas been started.

[[email protected] bin]#

从上面看只是启动了HAS。实际上后面会把Oracle Restart 管理的资源都会启动。这个可以使用crs_stat 命令来进程验证,不过Oracle 11g的进程启动过程比较慢,需要耐心等待。

[[email protected] u01]# shcrs_stat.sh

Name                           Target     State     Host

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

ora.DATA.dg                    ONLINE     ONLINE    rac1

ora.FRA.dg                     ONLINE    ONLINE     rac1

ora.LISTENER.lsnr              ONLINE     ONLINE    rac1

ora.LISTENER_SCAN1.lsnr        ONLINE     ONLINE    rac2

ora.OCRVOTING.dg               ONLINE     ONLINE    rac1

ora.asm                        ONLINE     ONLINE    rac1

ora.cvu                        ONLINE     ONLINE    rac2

ora.gsd                        OFFLINE    OFFLINE

ora.net1.network               ONLINE     ONLINE    rac1

ora.oc4j                       ONLINE     ONLINE    rac2

ora.ons                        ONLINE     ONLINE    rac1

ora.rac1.ASM1.asm              ONLINE     ONLINE    rac1

ora.rac1.LISTENER_RAC1.lsnr    ONLINE    ONLINE     rac1

ora.rac1.gsd                   OFFLINE    OFFLINE

ora.rac1.ons                   ONLINE     ONLINE    rac1

ora.rac1.vip                   ONLINE     ONLINE    rac1

ora.rac2.ASM2.asm              ONLINE     ONLINE    rac2

ora.rac2.LISTENER_RAC2.lsnr    ONLINE    ONLINE     rac2

ora.rac2.gsd                   OFFLINE    OFFLINE

ora.rac2.ons                   ONLINE     ONLINE    rac2

ora.rac2.vip                   ONLINE     ONLINE    rac2

ora.scan1.vip                  ONLINE     ONLINE    rac2

ora.sdd.db                     ONLINE     ONLINE    rac2

2.2.3 禁用HAS(Restart)在server 重启后的自动启动

[[email protected] bin]# ./crsctl disable has

CRS-4621: Oracle High Availability Servicesautostart is disabled.

[[email protected] bin]#

2.2.4 查看HAS(Restart)的状态

[[email protected] bin]# ./crsctl config has

CRS-4621: Oracle High Availability Servicesautostart is disabled.

2.2.5 启用HAS(Restart)在server 重启后的自启动

[[email protected] bin]# ./crsctl enable has

CRS-4622: Oracle High Availability Servicesautostart is enabled.

--查看has的状态,验证刚才命令的效果:

[[email protected] bin]# ./crsctl config has

CRS-4622: Oracle High Availability Servicesautostart is enabled.

[[email protected] bin]#

2.2.6 查看Restart 当前状态

[[email protected] bin]# ./crsctl check has

CRS-4638: Oracle High Availability Servicesis online

2.2.7 查看Oracle Restart 中由OHASD管理的resource 状态

[[email protected] bin]# ./crsctl stat res -t

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

NAME           TARGET  STATE       SERVER                  STATE_DETAILS

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

Local Resources

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

ora.DATA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.FRA.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.LISTENER.lsnr

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.OCRVOTING.dg

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.asm

ONLINE  ONLINE      rac1                    Started

ONLINE  ONLINE      rac2                    Started

ora.gsd

OFFLINE OFFLINE      rac1

OFFLINE OFFLINE      rac2

ora.net1.network

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

ora.ons

ONLINE  ONLINE      rac1

ONLINE  ONLINE      rac2

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

Cluster Resources

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

ora.LISTENER_SCAN1.lsnr

1        ONLINE  ONLINE      rac2

ora.cvu

1        ONLINE  ONLINE      rac2

ora.oc4j

1        ONLINE  ONLINE      rac2

ora.rac1.vip

1        ONLINE  ONLINE      rac1

ora.rac2.vip

1        ONLINE  ONLINE      rac2

ora.scan1.vip

1        ONLINE  ONLINE      rac2

ora.sdd.db

1        ONLINE  ONLINE      rac1                     Open

2        ONLINE  ONLINE      rac2                     Open

[[email protected] bin]#

2.3 使用SRVCTL 命令管理Restart(OHASD)

可以手工的使用SRVCTL 命令来管理Oracle Restart。从Oracle Restart 配置里添加或者删除一些组件。当我们手工的添加一个组件到到Oracle Restart,并使用SRVCTL启用该组件,那么Oracle Restart 就开始管理该组件,并根据需要决定是否对该组件进行重启。

官方文档的说明如下:

SRVCTL Command Reference for Oracle Restart

http://docs.oracle.com/cd/E11882_01/server.112/e25494/restart005.htm

Configuring OracleRestart

http://docs.oracle.com/cd/E11882_01/server.112/e10595/restart002.htm

SRVCTL命令主要有如下选项:


Command


Description


add


Adds a component to the Oracle Restart configuration.


config


Displays the Oracle Restart configuration for a component.


disable


Disables management by Oracle Restart for a component.


enable


Reenables management by Oracle Restart for a component.


getenv


Displays environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.


modify


Modifies the Oracle Restart configuration for a component.


remove


Removes a component from the Oracle Restart configuration.


setenv


Sets environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.


start


Starts the specified component.


status


Displays the running status of the specified component.


stop


Stops the specified component.


unsetenv


Unsets environment variables in the Oracle Restart configuration for a database, Oracle ASM instance, or listener.

--This example adds thedatabase with the DB_UNIQUE_NAME dbcrm:

srvctl add database -d dbcrm -o/u01/app/oracle/product/11.2.0/dbhome_1

--This example adds thesame database and also establishes a dependency between the database and thedisk groups DATA and RECOVERY.

srvctl add database -d dbcrm -o/u01/app/oracle/product/11.2.0/dbhome_1  -a "DATA,RECOVERY"

--The following commandadds a listener (named LISTENER) running out of the database Oracle homeand listening on TCP port 1522:

srvctl add listener -p TCP:1522 -o /u01/app/oracle/product/11.2.0/dbhome_1

注意srvctl命令中的config 选项,其是用来限制相关Resource 信息的:

[[email protected] ~]$ srvctl config asm -a

ASM home: /u01/app/grid/11.2.0

ASM listener: LISTENER

ASM is enabled.

[[email protected] ~]$

这里srvctl 命令是非常常用的。在2.1 节里也说明了,有些操作会自动的把相关的resource 添加到Restart里,从而来进行监控,但有些操作不会添加到Restart里,这就需要我们手工的来进行添加。

最后一天,如果已经安装过了Restart,如果机器名称发生了改变,就需要重新配置Oracle Restart,具体参考MOS 文档:[ID986740.1]

Oracle 11g 新特性 -- Oracle Restart 说明(转载),布布扣,bubuko.com

时间: 2024-12-11 01:01:55

Oracle 11g 新特性 -- Oracle Restart 说明(转载)的相关文章

Oracle 11g新特性之--虚拟列(Virtual Column)

Oracle 11g新特性之--虚拟列(Virtual Column) Oracle 11G虚拟列Virtual Column介绍 Oracle 11G 在表中引入了虚拟列,虚拟列是一个表达式,在运行时计算,不存储在数据库中,不能更新虚拟列的值. 定义一个虚拟列的语法: column_name [datatype] [GENERATED ALWAYS] AS [expression] [VIRTUAL] 1.虚拟列可以用在select,update,delete语句的where条件中,但是不能用

Oracle 11g新特性invisible index(不可见的索引)

如果一张表上有十几个索引,你有什么感受?显然会拖慢增.删.改的速度,不要指望开发人员能建好索引.我的处理方法是先监控很长的一段时间,看哪些索引没有用到,然后删除.但删除以后,如果发现某一天有用,那又要重新建,如果是大表,那就有些麻烦.现在11g提供一个新特性,不可见索引,可以建索引设置为不可见索引,CBO在评估执行计划的时候会忽略它,如果需要的时候,设置回来即可. 还有一种用途,你在调试一条SQL语句,要建一个索引测试,而你不想影响其他的会话,用不可见索引正是时候. SQL> drop tabl

[转]Oracle 11g 新特性 -- SQL Plan Management 说明

一 概述 二 SQL 计划基线Plan BaseLine体系结构三 加载SQL 计划基线四 演化SQL 计划基线五 重要的基线SQL 计划属性六 SQL 计划选择七 可能的SQL 计划可管理性方案八 SQL 性能分析器和SQL 计划基准方案九 自动加载SQL 计划基线方案十 清除SQL 管理库策略 一.概述 SQL 语句的SQL 执行计划发生更改时,可能存在性能风险. SQL 计划发生更改的原因有很多,如优化程序版本.优化程序统计信息.优化程序参数.方案定义.系统设计和SQL 概要文件创建等.

[转]Oracle 11g 新特性 -- SQL Plan Management 示例

目录 一 SPM 说明 相关名词说明 SPM的特点 与profile和outline相比更加灵活的控制手段 SPM使计划真正的稳定 SPM的控制方式 SPM如何捕捉加载执行计划 自动捕捉 批量导入 执行计划的选择过程 执行计划的演化evolution 修改已有的Baseline 相关MOS 文档 二 SPM 示例 自动捕捉 手工捕获执行计划 演化SQL Plan Baselines 完整示例 修改 Plan Baselines 显示SQL Plan Baselines 设置SQL Managem

Oracle 11g新特性之--Server Result Cache

Oracle 11g新特性之--Server  Result Cache 一.Server Result Cache说明 Oracle官网的说明,参考: 7.6 Managing the Server and Client  Result Caches http://docs.oracle.com/cd/E11882_01/server.112/e16638/memory.htm#BGBCABED 1.1 概述 SQL 查询结果高速缓存可在数据库内存中对查询结果集和查询碎片启用显式高速缓存.存储

Oracle 11g新特性direct path read引发的系统停运故障诊断处理

黎俊杰 | 2016-07-28 14:37 声明:部分表名为了脱敏而用XX代替 1.故障现象 (1)一个业务系统输入用户名与密码后无法进入首页,表现为一直在运行等待,运行缓慢 (2)整个系统无法正常使用,接近停运状态 2.故障解决方法 调整数据库参数alter system setevent='10949 trace name context forever, level 1'来关闭"direct path read"(直接路径读)特性,使SQL语句可以从缓存中查询数据,达到降低I/

Oracle 11g 新特性(一)-- 虚拟列

数据库版本: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Oracle11g 增加了虚拟列的新特性, 具体说明如下: 1> 只能在堆组织表(普通表)上创建虚拟列,不能在索引组织表.外部表.临时表上创建虚拟列 2> 虚拟列不能是LOB或者RAW类型 3> 虚拟列的值并不是真实存在的,只有用到时,才根据表达式计算出虚拟列的值,磁盘上并不存放 4> 可把虚拟列当做分区关键字建立分区表,这是ORACLE

Oracle 11g新特性延迟段创建和truncate的增强

下面测试Oracle 11g开始的新特性truncate的增强和延迟段空间创建. Oracle从11g开始,当用户创建一张空表的时候不会先分配段和空间,只有当对这张表插入第一行数据的时候才分配段和空间. 这就解决了有很多表是空的但是占用大量的磁盘空间.   测试11g延迟段创建和truncate 用户下有一张新表 SQL> select * from tab; TNAME TABTYPE CLUSTERID ------------------------------ ------- -----

Oracle 11g新特性系统分区表

在11g中有个新特性是系统的分区表,下面来做个实验: SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 -