Thomas Zhang的杂货铺 Oracle OCM 与大家一起学习Oracle 数据平台解决方案
06 01, 2012
Oracle Exadata版本发展简史
作者 tomszrp 10:07 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 磨刀石

V1: The first Exadata was released in late 2008. It was labeled as V1 and was a combination of HP hardware and Oracle software. The architecture was similar to the current X2-2 version, with the exception of the Flash Cache, which was added to the V2 version. Exadata V1 was marketed as exclusively a data warehouse platform. The product was interesting but not widely adopted. It also suffered from issues resulting from overheating. The commonly heard description was that you could fry eggs on top of the cabinet. Many of the original V1 customers replaced their V1s with V2s.


V2: The second version of Exadata was announced at Open World in 2009. This version was a partnership between Sun and Oracle. By the time the announcement was made, Oracle was already in the process of attempting to acquire Sun Microsystems. Many of the components were upgraded to bigger or faster versions, but the biggest difference was the addition of a significant amount of solid-state based storage. The storage cells were enhanced with 384G of Exadata Smart Flash Cache. The software was also enhanced to take advantage of the new cache. This addition allowed Oracle to market the platform as more than a Data Warehouse platform opening up a significantly larger market.


X2: The third edition of Exadata, announced at Oracle Open World in 2010, was named the X2. Actually, there are two distinct versions of the X2. The X2-2 follows the same basic blueprint as the V2, with up to eight dual-CPU database servers. The CPUs were upgraded to hex-core models, where the V2s had used quad-core CPUs. The other X2 model was named the X2-8. It breaks the small 1U database server model by introducing larger database servers with 8 × 8 core CPUs and a large 1TB memory footprint. The X2-8 is marketed as a more robust platform for large OLTP or mixed workload systems due primarily to the larger number of CPU cores and the larger memory footprint.

Exadata Storage Expansion Rack. 2011.07.15 Exadata Storage Expansion Rack enables you to grow X2-2 and -8 Exadata Database Machine or SPARC SuperCluster. It and other The expansion rack is extremely as there are no LUNs or mount points to Storage is configured and added to a database commands, completed in minutes.

更多信息参见

http://www.oracle.com/us/products/database/exadata-database-machine/overview/index.html


05 01, 2012
Oracle并行度tips
作者 tomszrp 22:52 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 解决方案

与单个操作关联的并行执行服务器的数量称为并行度 (DOP)。Oracle 的并行执行框架可让您明确选择甚至强制实行特定 DOP,或者,您也可以依赖 Oracle 来控制 DOP。

DEFAULT 并行度
在前面的示例中,我们只指定以并行方式访问一个对象,而未指定 DOP。这类情况下,Oracle 使用所谓的 DEFAULT 并行度。DEFAULT 并行度使用公式根据系统配置来确定 DOP,通常为 2 * CPU_COUNT;在RAC中,为 2 * CPU_COUNT * ACTIVE_INSTANCE_COUNT。因此,在每个节点有 8 个 CPU 内核的四节点RAC上,默认 DOP 将为 2 * 8 * 4 = 64。
 

DEFAULT 算法旨在使用最多资源(假设使用的资源越多,操作就会越快完成)。DEFAULT 并行度针对的是单用户负载。在多用户环境下,DEFAULT 并行度将迅速用完系统资源,没有留下可用资源以便其他用户并行执行。
固定并行度 (DOP)
与 DEFAULT 并行度不同,可以从 Oracle 数据库请求特定 DOP。例如,您可以在表或索引级别设置固定 DOP:
Alter table customers parallel 8 ;

Alter table sales parallel 16 ;
在此例中,只访问 customers 表的查询使用所请求的值为 8 的 DOP,访问 sales 表的查询将请求值为 16 的 DOP。访问 sales 和 customers 两个表的查询将以值为 16 的 DOP 进行处理,并且可能分配 32 个并行服务器(生成者/使用者)

当指定不同的 DOP 时,Oracle 使用更高的 DOP。


自动并行度
当自动并行度 (Auto DOP) 处于活动状态时,数据库将自动确定是否应并行执行语句以及应使用的 DOP。系统根据语句的资源需求来确定是否使用并行执行并选择 DOP。
如果语句的预计所用时间小于 PARALLEL_MIN_TIME_THRESHOLD(默认为 AUTO, 10 秒),则语句将串行运行。如果预计所用时间大于 PARALLEL_MIN_TIME_THRESHOLD,则优化器根据执行计划中所有扫描操作(全表扫描、索引快速全扫描等)的成本来以确定语句的理想 DOP。实际扫描成本直接取决于被访问对象的大小,从而确保确定的 DOP(只要被访问对象的大小不会显著更改)。
但是,优化器将对使用的实际 DOP 设置上限,以确保并行服务器进程不会导致系统过载。通过参数 PARALLEL_DEGREE_LIMIT (参见后面对该参数的说明)设置此上限。此参数的默认值是 CPU,这意味着 DOP 受系统上 CPU 数量的限制。
备注可以将 PARALLEL_DEGREE_LIMIT 设置为特定数值,这样您能够控制可在系统上使用的最大 DOP。

 

注意: 新创建表,如果不指定parallel参数,那么默认的degree是1

如果指定parallel,但不指定parallelism,那么degree就是DEFAULT,否则degree就是你指定的值.

 

说明: The degree of parallelism used for a SQL statement can be specified at three different levels:

■Statement level - Using hints such as PARALLEL or the PARALLEL clause
■Object level - Found in the definition of the table, index, or other object. See: PARALLEL clause
■Instance level - Using default values for the instance. See: parallel_threads_per_cpu x cpu_count

The Cost-Based Optimizer determines whether to parallelize a statement and the degree of paralleism applied for a SQL statement by checking each item in this list in the order shown. Oracle first checks for a degree of parallelism specification at the statement level. If none is found, the table or index definitions are checked. If the table or index definition does not explicitly specify values for
DEGREE and INSTANCES, then the default values established for the instance are used.

查询表和索引上的并行度设置

select table_name, degree, instances from dba_tables where trim(degree) != '1'or ( trim(instances) != '1' and trim(instances) != '0' );

select index_name, degree, instances from dba_indexes where trim(degree) != '1' or ( trim(instances) != '1' and trim(instances) != '0' );

 

31 12, 2011
11gR2中dbms_stats包设置全局统计信息属性的变化
作者 tomszrp 15:48 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 解决方案


 

在dbms_stats包中,Oracle提供了几个针对自动收集统计信息的属性设置过程和函数
   SET_PARAM->RESET_PARAM_DEFAULTS->GET_PARAM
从11.2开始,这几个过程和函数被新的过程和函数取代
   SET_GLOBAL_PREFS->RESET_GLOBAL_PREF_DEFAULTS->GET_PREFS
同时还增加了几个新的比较使用的属性设置,下面的几个属性是之前版本中已经提供的
   ■ AUTOSTATS_TARGET
   ■ CASCADE
   ■ DEGREE
   ■ ESTIMATE_PERCENT
   ■ METHOD_OPT
   ■ NO_INVALIDATE
   ■ GRANULARITY 
11gR2中新增加的属性
   ■ PUBLISH
      该参数用来控制是否收集为统计信息立即更新数据字典
   ■ INCREMENTAL
      该参数针对分区表的增量收集进行控制,(比如新加一个分区,下次更新时只收集新分区的统计信息)
   ■ STALE_PERCENT 
      统计信息陈旧的标志,默认是表变化数据超过10%, 和以前options=>'gather stale'类似,不过现在可以在全局进行设置了。   
关于该包在11.2中更多新的特性,参见手册

26 12, 2011
OEM 12cR1 Linux 5平台安装配置使用指导手册收工
作者 tomszrp 16:48 | Permalink 静态链接网址 | Comments 最新回复 (2) | Trackback 引用 (0) | 解决方案

这个破东西实在太庞大了,穷一人之力,短时间内根本无法深就,所以决定就此打住,熬了几夜,制造了一些垃圾,希望能起到抛砖引玉之效。

全文共180多页(大部分是操作性的截图),供大家茶余饭后无聊之用!

先晒晒目录

目 录

1	Oracle Cloud Control简介                                                      	4
  1.1	EM Cloud Control的架构	                                                    5
  1.2	关于Plug-Ins的说明                                                        	5
  1.3	Enterprise Manager 12c(12.1.0.1.0)认证信息                              	6
2	Hands-On lab环境简介                                                          	7
3	安装前准备工作                                                                	8
  3.1	硬件环境要求                                                              	8
      3.1.1	CPU, RAM, Heap Size, and Hard Disk Space Requirements for OMS       	9
      3.1.2	RAM and Hard Disk Space Requirements for Standalone Management Agent	9
      3.1.3	RAM and Hard Disk Space Requirements for Management Repository      	9
  3.2	软件环境要求                                                              	9
      3.2.1	Package Requirements for OMS                                        	10
      3.2.2	Package Requirements for OMA                                         	11
      3.2.3	Kernel Parameter Requirements                                        	12
      3.2.4	Library Requirements for OMS                    	                   	13
  3.3	Oracle建议的安装环境                                  	                 	  13
  3.4	OMS安装目录结构                                       	                 	  13
  3.5	Hosts File配置                                        	                 	  13
  3.6	下载相关软件                                          	                 	  14
  3.6.1	注意事项                                            	                 	  14
  3.7	创建操作系统组和用户                                  	                 	  14
  3.8	创建OMR和需知                                          	                 	  15
4	安装Enterprise Manager System 12c(12.1.0.1.0)             	                 	  19
  4.1	安装前需知                                            	                 	  19
      4.1.1	两种配置模式                                     	                 	  19
      4.1.2	部署内容                                        	                 	  19
      4.1.3	其他需知                                        	                 	  20
  4.2	安装OMS                                               	                 	  20
  4.3	安装OMS后初体验                                       	                 	  31
      4.3.1	login                                           	                 	  31
      4.3.2	个性化Home Page                                 	                 	  33
      4.3.3	熟悉菜单导航系统	                                                 	  34
      4.3.4	个性化Enterprise Manager                         	                 	  37
  4.4	启动和停止OMS                                         	                 	  43
  4.5	调整gcstartup                                          	                 	  45
5	安装Oracle Management Agent                               	                 	  45
  5.1	安装前的工作	                                                          	  46
      5.1.1	sudo 执行权限                                    	                 	  47
      5.1.2	创建OMS_BASE目录	                                                 	  48
      5.1.3	OMS和OMT之间的通信配置	                                           	  48
      5.1.4	Target目标数据库dbsnmp帐户解锁                  	                 	  49
  5.2	安装Agent 12.1.0.1.0                                   	                 	  49
  5.3	查看Target主机上Agent状态                             	                 	  55
  5.4	配置Target数据库                                      	                 	  55
6	安装YAST	                                                                   	  58
7	管理Linux host Lab	                                                         	  63
8	创建和使用Credentials	                                                       	  68
  8.1	Named Credential	                                                       	  69
  8.2	Job Credentials                                       	                 	  71
  8.3	Monitoring Credentials                                 	                 	  72
9	Framework Lab                                              	                 	  73
  9.1	试验0:创建一个Supper Administrator 帐户	                               	  73
  9.2	试验1:使用Groups	                                                       	  78
  9.3	试验2:使用Systems	                                                     	  81
  9.4	试验3:使用Administration Groups和Template Collections	                 	  82
  9.5	试验4:使用Metric Extensions	                                   	          92
      9.5.1	创建Metric Extension                     	                 	          93
      9.5.2	部署、发布Metric Extension              	                            103
      9.5.3	验证Metric Extension                    	                            106
  9.6	试验5:Incident Management                     	                            110
      9.6.1	使用IM管理事件	                                                      110
      9.6.2	设置事件管理规则                        	                            114
10	Extensibility Lab	                                                            123
  10.1	Plug-in的部署	                                                            124
11	测试数据管理(TDM) Lab                           	                            132
  11.1	在源数据库上部署TDM包                        	                            133
  11.2	创建一个Application Data Model              	                            135
        11.2.1	管理Sensitive Column Types          	                            142
        11.2.2	给Applicaton Data Model关联一个数据库	                            143
        11.2.3	导入/导出Applicaton Data Model	                                  143
  11.3	定义和生成数据子集(Data Subset)	                                          144
  11.4	标识敏感列	                                                              153
  11.5	Masking Sensitive Data	                                                  156
        11.5.1	Data Masking简介	                                                156
        11.5.2	定义Masking Formats	                                              158
        11.5.3	创建Masking Definition	                                          161
        11.5.4	Masking敏感数据	                                                  163
12	数据库性能管理Lab	                                                            166
  12.1	Database Home Page概览	                                                  166
  12.2	Top Activity	                                                            168
  12.3	AWR	                                                                      170
        12.3.1	AWR管理	                                                          171
        12.3.2	生成AWR报告	                                                      173
        12.3.3	生成AWR对比报告  	                                                175
        12.3.4	ADDM阶段对比报告	                                                176
        12.3.5	Real-Time ADDM	                                                  178
13	License变化	                                                                  184




26 12, 2011
IRQ probe failed (0xfffffff8) on Oracle VM virtualBOX
作者 tomszrp 13:54 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 解决方案

昨天晚上在Oracle VM virtualBox 4.1.8下想创建一个测试用Oracle Database 10.2.0.1 on Oracle Enterprise Linux 4.8,结果安装Linux 操作系统的时候,老是因为

IRQ probe failed (0xfffffff8)

...

最后出现

IDE: failed opcode was: 0xef

而无法安装,一开始以为是Linux image坏了,重新下了一个,结果还是不行,以为是移动硬盘坏了,换到本地盘还是不可以,我擦。。。

最后还是求助了g哥,说是vbox下模式linux内核版本所导,正确的方法是系统选linux->版本选择linux2.4,而不要选成了RedHat或Oracle,因为默认的Redhat/Oracle是2.6版本内核的,而OEL 4是2.4内核。

按照这个方法,问题解决,留做备忘!


23 12, 2011
Real-Time ADDM active reports
作者 tomszrp 12:08 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 磨刀石

Oracle EM 12c 中提供的Real-Time ADDM真是个好东西

点击查看Real-Time ADDM active reports示例

说明:如果打开不开,或出现空白页,那可能是你的浏览器中的 Adobe Flash Player plugin版本不合适,建议(9或10比较合适,11也有点问题)


29 11, 2011
传输表空间的使用条件、限制和适用场景
作者 tomszrp 11:43 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | PUB论剑
Transportable TableSpaces(TTS)是Oracle Database的特性,借助该特性利用OS拷贝+Export/Import的方法可以方便、快速地将datafile从一个数据库转移到另外一个数据库.
该特性是从Oracle 8.1版本开始提供,在后续的版本中逐步增强,特别是从10g开始可以跨平台传输表空间为用户在数据迁移、升级、复制等场景中带来了更加方便高效的解决方案.
使用TTS的基本条件
    ■源和目标数据库的COMPATIBLE初始化参数必须>=8.1,且必须是企业版
    ■如果被传输的表空间的block size和目标库的标准块size不一样,那么目标库的COMPATIBLE必须>=9.0
    ■从Oracle 8i开始,TTS就可以向后跨版本(比如8i-->9i) 
    ■从Oracle 10g开始,TTS可以跨平台,如果源和目标的平台字节序(endianness)相同就不需要额外的步骤,否则还需要进行字节序转换
    ■源和目标数据库必须具有相同的character set and national character set.
    ■TTS支持RAW device file system.
    ■10g前如果目标库存在同名的表空间,则不能TTS,从10g(COMPATIBLE>=10.0.0)开始,借助tablespace rename特性可以解决这一问题
    ■TTS不能处理system表空间及system表空间里的Objects
    ■自包含检查
        SQL> EXEC sys.DBMS_TTS.TRANSPORT_SET_CHECK('data, indx',TRUE);
        SQL> SELECT * from sys.transport_set_violations;        
    ■cannot transport objects owned by the user SYS.
        SQL> SELECT segment_type, owner||'.'||segment_name "OWNER.SEGMENT_NAME",partition_name 
             FROM dba_segments 
             WHERE owner = 'SYS' AND tablespace_name IN ('DATA', 'INDX') 
             ORDER BY owner, segment_type, segment_name;
    ■Database entities
     在Oracle 10g版本前,TTS不支持
      – Materialized views/replication
      – Function-based indexes
      – Scoped REFs
      – 8.0-compatible advanced queues with multiple recipients
     Oracle 10g  中TTS的限制
     Oracle 11gR1中TTS的增强和限制
     Oracle 11gR2中TTS的增强和限制
传输表空间的应用场景
借助TTS的特性,在如下很多场景中可以利用传输表空间来实现
●Exporting and importing partitions in data warehousing tables 
●Publishing structured data on CDs 
●Copying multiple read-only versions of a tablespace on multiple databases 
●Archiving historical data 
●Performing tablespace point-in-time-recovery (TSPITR) 
●Migrating databases among RDBMS versions and OS platforms



25 11, 2011
站好最后一班岗
作者 tomszrp 09:26 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 公告栏

今天是修炼的最后一天了,总算入道!^|^


21 11, 2011
充满期待的一周
作者 tomszrp 12:46 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 公告栏

咬咬牙,就要盼到“好日子”了...


18 11, 2011
“挑战”
作者 tomszrp 09:04 | Permalink 静态链接网址 | Comments 最新回复 (0) | Trackback 引用 (0) | 随笔

新“岗位”上工作5一天了,7*24 Services,每天不断面临各种新的挑战,新的烦恼,新的刺激,新的痛苦,当然伴随了很多以前难以体会的新的快乐和享受!

再坚持一周,就要“解脱”了!


博客日历
« 一月 2012 »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
搜索
最新发表
文章分类
文章归档
网站链接
新闻聚合