oracle11g新特性(精)

合集下载

【2019年整理】Oracle11gR2数据库新特性

【2019年整理】Oracle11gR2数据库新特性
Oracle 11g新功能概述
Oracle 11g 新特性
• • • • • • • 自动内存管理 ADDM for RAC 数据卫士( Dataguard )技术革新 闪回技术
• 闪回存档
RAC和ASM
• •
• •
RAC One Node ASM
Database Vault Audit Vault

primary / standby 均支持RAC 查询结果在transaction级别一致



对广大physical standby用户立 即可以带来好处 DR + 实时查询—业界独一无二 的技术–无闲置资源 支持所有的数据类型,但缺乏 logical standby的灵活性 支持多达30个Active Standby数 据库(11gR2)
RAC数据库的ADDM
确定集群性能问题 定位问题
• • • • • 全局资源,如 IO和锁 高负载SQL和热数据块 内存内部争用 网络延时 实例间相应时间偏差
在EM中运行ADDM
数据卫士(Data Guard)技术革新
Active Data Guard

physical standby在redo apply同 时,支持只读查询
自动内存管理
Oracle11g数据库已经实现了自动内 存管理,一定程度上简化了数据 库管理员对于内存管理的工作。 自动内存管理是通过两个初始化参 数进行配置的: MEMORY_MAX_TARGET MEMORY_TARGET
• 动态的参数 • 根据负载自动进行调整 • 多平台支持
Linux Windows Solaris HPUX AIX


压缩对系统响应时间和吞吐 量的影响可以忽略不计 需要Oracle 11g高级压缩选件

Oracle数据库11g新特性:安全性

Oracle数据库11g新特性:安全性

Oracle数据库11g新特性:安全性默认口令2006 年,OTN 发布了我撰写的一系列题为“安全保护项目:一种分阶段的数据库基础架构保护方法”的文章。

在这些文章中,我讨论了如何应对常见的安全挑战(如用户使用默认口令)以及如何扫描您的数据库以查找这些用户。

对我而言很不幸的是,您可能已经忘记了我文章中的那一部分。

Oracle 数据库11g 现在提供一种快速识别使用默认口令的用户的方法。

该方法实施起来极为简单,只需检查单个数据字典视图:D BA_USERS_WITH_DEFPWD.(注意,DBA_ 是一个标准前缀,它不仅包含使用默认口令的DBA 用户。

)您可以执行以下命令来识别这些用户:输出如下:由于SCOTT 使用了默认口令TIGER,因此您会看到他出现在上面的清单中。

使用下面的语句进行更改:现在,如果您查看该视图:您就不会在该清单中看到SCOTT 了。

就这么简单!区分大小写的口令在版本11g 之前的Oracle 数据库中,用户口令是不区分大小写的。

例如:这种安排为支付卡行业(PCI)数据安全标准之类的标准带来了问题,这些标准要求口令区分大小写。

该问题得到了解决,在Oracle 数据库11g 中,口令也可以区分大小写。

通过DBCA 创建数据库时,系统会提示您是否希望升级到“新的安全标准”,其中之一就是区分大小写的口令。

如果您接受该标准,口令在创建时的大小写状态将被记录下来。

假如您接受了新标准,相应的操作结果如下:注意对“tiger”和“TIGER”的不同处理方式。

现在,您的某些应用程序可能无法立刻传递大小写正确的口令。

典型示例是用户输入表单:很多表单在接受口令时不会进行大小写转换。

然而,在Oracle 数据库11g中,这种登录方式可能会失败,除非用户以区分大小写格式输入口令,或者开发人员对应用程序进行了修改,使其能够进行大小写转换(这一点不可能迅速实现)。

不过,如果您希望的话,仍然可以通过更改系统参数SEC_CASE_SENSITIVE_LOGON 恢复到不区分大小写的状态,如以下示例所示。

Oracle 11g 新特性ADR

Oracle 11g 新特性ADR

Oracle 11g 新特性 ADRADR 主目录既然所有的焦点都集中于数据库的诊断能力, 那么 Oracle 数据库是不是应该存储以结 构化方式组织的所有跟踪文件、日志文件等等?在 Oracle 数据库 11g 中确实如此。

自动 诊断信息库 (ADR) 文件位于一个指定为诊断目标(或 ADR 基目录)的常用目录下的目录 中。

该目录由初始化参数 (diagnostic_dest) 设置。

默认情况下, 它设置为 $ORACLE_BASE, 但是您可以将其显式设置为某些独占目录。

(但是不建议这样做。

) 该目录下有一个 diag 子 目录,您将在这个子目录中发现存储诊断文件的子目录。

ADR 存储所有组件(ASM、CRS、监听器等)的日志和跟踪文件,包括数据库本身的 日志和跟踪文件。

这使您可以方便地在一个位置查找特定的日志。

在 ADR 基目录中,可以有多个 ADR 主目录,每个组件和实例一个。

例如,如果服 务器有两个 Oracle 实例,则有两个 ADR 主目录。

下面是数据库实例的 ADR 主目录的 目录结构。

目录名称 <在 DIAGNOSTIC_DEST 参数中提到的目录> →diag →rdbms →<数据库名称> →<实例名称> →alert →cdump →hm →incident →<所有事件目录存在这里> →incpkg说明XML 格式的警报日志存储在这里。

核心转储存储在这里, 相当于早期版本中的 core_dump_dest。

运行情况监视对多个组件运行检查,它在这里存储某些文件。

所有事件转储都存储在这里。

每个事件存储在一个不同的目录中,这些目录都存储在这里。

当您打包事件时(在本文中可以了解打包),某些支持文件存储在这里。

→metadata →trace 有关问题、事件、程序包等的元数据存储在这里。

用户跟踪文件和背景跟踪文件存储在这里,并附带警报日志的 文本版本。

ORACLE-技术文档-ORACLE11G新特性-SPA使用指南-V121120

ORACLE-技术文档-ORACLE11G新特性-SPA使用指南-V121120

ORACLE-技术文档-ORACLE11G新特性-SPA使用指南-V121120ORACLE-技术文档-11G新特性-SPA使用指南-(v120726)版本说明目录版本说明 (2)1. 概述 (4)2. SPA 过程 (4)2.1. 简述 (4)2.2. 工作流程 (4)2.3.捕捉有代表性的SQL工作负载 (5)2.3.1. 创建SQL调整集(STS) (5)2.3.2. 生产库加载SQL调整集 (5)2.3.3. 传送SQL调整集 (6)2.3.4. 将STS导入测试系统 (7)2.4. 创建SPA任务 (8)2.4.1. 在测试库创建一个SPA任务 (8)2.5. 分析更改前SQL工作负载 (8)2.6. 分析升级后的sql工作负载 (9)2.7. 比较SQL性能 (9)2.7.1. 为了比较升级前和升级后SQL性能,需要第三次执行EXECUTE_ANALYSIS_TASK过程. (9)2.7.2. 生成SPA报表 (10)2.7.3. 分析性能报表 (12)3. 参考文档 (12)1.概述ORACLE11G 的新特性SPA,可对给定SQL结果集进行性能分析,特别适合在有大的动作(比如升级\迁移等)做前后的性能比较。

分析结果以永久对象存在数据库内部,可供以后查询和修改。

2.SPA 过程2.1.简述SQL工作负载不仅包括SQL语句,还包括环境信息(绑定变量和执行频率)。

2.2.工作流程2.3.捕捉有代表性的SQL工作负载2.3.1.创建SQL调整集(STS)SQL> exec dbms_sqltune.create_sqlset(sqlset_name=>'sql_test',description =>'11g spa test'); PL/SQL procedure successfully completed.2.3.2.生产库加载SQL调整集2.3.2.1. 从当前的缓存加载SQL语句作为调整集.SQL> DECLARE2 mycur DBMS_SQLTUNE.SQLSET_CURSOR;3 BEGIN4 OPEN mycur FOR5 SELECT VALUE(P)6 FROM table(7 DBMS_SQLTUNE.SELECT_CURSOR_CACHE(8 'parsing_schema_name <> ''SYS'' AND elapsed_time > 500000',9 NULL, NULL, NULL, NULL, 1, NULL,10 'ALL')) P;1112 DBMS_SQLTUNE.LOAD_SQLSET(sqlset_name => 'sql_test',13 populate_cursor => mycur);1415 END;/ 16PL/SQL procedure successfully completed.2.3.2.2. 从AWR报告提取SQL语句作为调整集SQL> EXEC DBMS_SQLTUNE.CREATE_SQLSET('my_workload');SQL>SQL>SQL>SQL> DECLARE2 cur DBMS_SQLTUNE.SQLSET_CURSOR;3 BEGIN4 OPEN cur FOR5 SELECT VALUE(P)6 FROM table(7 DBMS_SQLTUNE.SELECT_WORKLOAD_REPOSITORY(24,27,8 'parsing_schema_name <> ''SYS''',9 NULL, NULL,NULL,NULL,10 1,11 NULL,12 'ALL')) P;1314 DBMS_SQLTUNE.LOAD_SQLSET(sqlset_name =>'my_workload',15 populate_cursor => cur,16 load_option => 'MERGE',17 update_option => 'ACCUMULATE');18 END;19 /2.3.3.传送SQL调整集在能进行传送之前,需要在生产库创建一个中转表作为下个环节的导出源.2.3.3.1. 创建中转表SQL> EXEC DBMS_SQLTUNE.CREATE_STGTAB_SQLSET(table_name=>'STGTAB_SQLSET');此表不能创建在SYS模式下.2.3.3.2. 将SQL调整结果集导入到中转表EXECDBMS_SQLTUNE.PACK_STGTAB_SQLSET(sqlset_name=>'sql_test' ,staging_table_name=>'STGTAB_SQLSET');从中转表选择数据,验证是否有数据SQL> select count(*) from STGTAB_SQLSET;72说明已经存在数据了.2.3.4.将STS导入测试系统2.3.4.1. 先使用数据泵将中转表数据导出和导入[oracle@ora11g ~]$ expdp system DUMPFILE=STGTAB_SQLSET.dmp DIRECTORY=REPLAY_DIR TABLES=STGTAB_SQLSETExport: Release 11.2.0.1.0 - Production on Tue Jul 24 00:45:382012Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.Password:UDE-28002: operation generated ORACLE error 28002ORA-28002: the password will expire within 7 daysConnected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsStarting "SYSTEM"."SYS_EXPORT_TABLE_01": system/******** DUMPFILE=STGTAB_SQLSET.dmp DIRECTORY=REPLAY_DIR TABLES=STGTAB_SQLSETEstimate in progress using BLOCKS method...Processing object type TABLE_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 576 KBProcessing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/PRE_TABLE_ACTION. . exported "SYSTEM"."STGTAB_SQLSET" 100.7 KB 72 rows Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded*************************************************************** ***************Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:/home/oracle/replay_dir/STGTAB_SQLSET.dmpJob "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 00:47:362.3.4.2. 将此表导入到测试系统的system用户下[oracle@11g replay_dir]$ impdp systemDUMPFILE=STGTAB_SQLSET.dmp DIRECTORY=REPLAY_DIR Import: Release 11.2.0.1.0 - Production on Tue Jul 24 01:20:51 2012Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.Password:UDI-28002: operation generated ORACLE error 28002ORA-28002: the password will expire within 7 daysConnected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsMaster table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloadedStarting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** DUMPFILE=STGTAB_SQLSET.dmp DIRECTORY=REPLAY_DIR Processing object type TABLE_EXPORT/TABLE/TABLEProcessing object type TABLE_EXPORT/TABLE/PRE_TABLE_ACTIONProcessing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "SYSTEM"."STGTAB_SQLSET" 100.7 KB 72 rows Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 01:23:202.3.4.3. 在测试库解压中转表的数据到STSSQL> EXEC DBMS_SQLTUNE.UNPACK_STGTAB_SQLSET(sqlset_name=>'sql_t est',replace=>true ,staging_table_name=>'STGTAB_ SQLSET');PL/SQL procedure successfully completed.2.4.创建SPA任务2.4.1.在测试库创建一个SPA任务SQL> variable sts_task VARCHAR2(64);SQL>exec :sts_task:=DBMS_SQLPA.CREATE_ANALYSIS_TASK(sqlset_na me=>'sql_test',task_name=>'spa_task1');/PL/SQL procedure successfully completed2.5.分析更改前SQL工作负载现实环境中,通常源库和测试库的版本至少差一个版本,比如源库可能是10.2版本,而测试库版本是11G,如果源库的版本是10G,需要在测试库将参数:optimizer_features_enable 设置为10.2.0,将此参数设置为此10.2.0后,生成的性能数据就是升级前的数据了.本案例由于是为了演示整个SPA的过程,源库和测试库的版本都是11G的,所以上述参数环节就不用设置了.直接进行性能抓取即可.SQL>execDBMS_SQLPA.EXECUTE_ANALYSIS_TASK(task_name=>'spa_task 1',execution_type=>'testexecute',execution_name=>'before_change');PL/SQL procedure successfully completed.一定注意黄色部分,test 和execute 之前不是下划线,而是空格.2.6.分析升级后的sql工作负载如果是由于版本升级做的SPA,在此处需要将optimizer_features_enable 设置为11.2.0,本次案例由于不是这个目的,所以此参数不用处理.SQL>execDBMS_SQLPA.EXECUTE_ANALYSIS_TASK(task_name=>'spa_task 1',execution_type=>'testexecute',execution_name=>'after_change');PL/SQL procedure successfully completed.2.7.比较SQL性能2.7.1.为了比较升级前和升级后SQL性能,需要第三次执行EXECUTE_ANALYSIS_TASK过程.SQL> exec DBMS_SQLPA.EXECUTE_ANALYSIS_TASK(task_name=>'spa_task 1',execution_type=>'compare performance');PL/SQL procedure successfully completed.2.7.2.生成SPA报表SQL> variable report1 clob;SQL>exec :report1 := DBMS_SQLPA.REPORT_ANALYSIS_TASK(task_name=>'spa_task1' ,type=>'text',level=>'typical',section=>'summary');PL/SQL procedure successfully completed.SQL> SQL> set long 100000 longchunksize 100000 linesize 120SQL> print :report1REPORT1------------------------------------------------------------------------------------------------------------------------General Information---------------------------------------------------------------------------------------------Task Information: Workload Information:--------------------------------------------- ---------------------------------------------Task Name : spa_task1 SQL Tuning Set Name : sql_testTask Owner : SYSTEM SQL Tuning Set Owner : SYSTEMDescription : Total SQL Statement Count : 10Execution Information:---------------------------------------------------------------------------------------------REPORT1------------------------------------------------------------------------------------------------------------------------Execution Name : EXEC_89 Started : 07/24/2012 02:56:05 Execution Type : COMPARE PERFORMANCE Last Updated : 07/24/2012 02:56:06 Description : Global Time Limit : UNLIMITED Scope : COMPREHENSIVE Per-SQL Time Limit : UNUSEDStatus : COMPLETED Number of Errors : 2Number of Unsupported SQL : 3Analysis Information:---------------------------------------------------------------------------------------------Before Change Execution: After Change Execution:--------------------------------------------- ---------------------------------------------REPORT1------------------------------------------------------------------------------------------------------------------------ Execution Name : before_change Execution Name : after_change Execution Type : TEST EXECUTE Execution Type : TEST EXECUTEScope : COMPREHENSIVE Scope : COMPREHENSIVE Status : COMPLETED Status : COMPLETED Started : 07/24/2012 02:24:25 Started : 07/24/2012 02:33:36 Last Updated : 07/24/2012 02:25:04 Last Updated : 07/24/2012 02:33:38 Global Time Limit : UNLIMITED Global Time Limit : UNLIMITEDPer-SQL Time Limit : UNUSED Per-SQL Time Limit : UNUSED Number of Errors : 2 Number of Errors : 2---------------------------------------------REPORT1------------------------------------------------------------------------------------------------------------------------ Comparison Metric: ELAPSED_TIME------------------Workload Impact Threshold: 1%--------------------------SQL Impact Threshold: 1%----------------------Report Summary---------------------------------------------------------------------------------------------Projected Workload Change Impact:REPORT1-------------------------------------------------------------------------------------------------------------------------------------------------------------------Overall Impact : 6.44%Improvement Impact : 6.44%Regression Impact : 0%SQL Statement Count-------------------------------------------SQL Category SQL Count Plan Change CountOverall 10 0Improved 2 0Unchanged 3 0REPORT1------------------------------------------------------------------------------------------------------------------------with Errors 2 0Unsupported 3 0Top 5 SQL Sorted by Absolute Value of Change Impact on the Workload--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | | Impact on | Execution | Metric | Metric | Impact | Plan || object_id | sql_id | Workload | Frequency | Before | After | on SQL | Change |-----------------------------------------------------------------------------------------| 28 | a4vxhbv8nxt57 | 4.25% | 1 | 55276 | 49395 | 10.64% | n | | 31 | c99yw1xkb4f1u | 2.19% | 1 | 19309 | 16283 | 15.67% | n | REPORT1------------------------------------------------------------------------------------------------------------------------| 29 | a50nw0ap6kv2c | .85% | 1 | 60288 | 59112 | 1.95% | n | | 26 | 767pug2dbpqpc | .05% | 3 | 1075 | 1052 | 2.14% | n | | 24 | 02suhrf4z78n3 | .03% | 2 | 145 | 127 | 12.41% | n | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------2.7.3.分析性能报表如上报表的黄色部分为报表的主要部分,报表最后给出了分析汇总.3.参考文档ORACLE 的官方文档Oracle? Database PL/SQL Packages and Types Reference11g Release 2 (11.2)Part Number E16760-05和Oracle? Database Real Application Testing User's Guide11g Release 2 (11.2)Part Number E16540-03。

Oracle 11g 分区新特性

Oracle 11g 分区新特性

前不久,曾经接手一个性能调优案例:这是一个报表系统,其基础数据主要存储于三张表中。

表的大小已经很大了,最大一张接近100G。

在生成报表时需要长时间才能返回结果,一些online查询甚至经常timeout。

表中存储的是2万多个公司的数据,报表的生成也是以公司为单位的,因此,这一调优方案的思路比较明确:将表按公司分区。

但是,这中间却存在一些麻烦:每个公司的数据并不是均衡的。

其中近200家公司属于VIP用户,他们的数据量最大,每个公司差不多是十几万到几十万的数据量,其总量占了全部数据的30%左右;而其它非VIP用户的数据基本上每个都在1万以内。

而我们的主要目标就是要优先保证VIP用户获取到最佳的性能(由于其数据量,当前最大的性能问题恰恰就出在这些VIP用户上)。

因此,我们提出了2中分区方案:基于Company Id的Hash分区;基于Company Id的List分区;但是,这两种方案各有优缺点:对于Hash分区,分区的大小更加均衡,因而性能也更加均衡。

但是,可能出现一些无法控制的极端现象:Hash分区仅仅是对Company Id使用Hash函数进行分组,它能做到每个分区分配基本相当数量的Company Id,但是每个Company Id对应的数据量并不考虑在内,因此可能出现某些分区集中的都是VIP数据或者都是非VIP数据,造成分区过大或过小;另外一个缺点就是我们很难直接干预某个公司的性能。

例如,可能有某个非VIP用户成为了VIP用户,其数据量激增,它又正好处于一个大的分区上,这时,我们很难将其从这个分区剥离出来,除非它所在分区正好出在一个即将分裂的分区上。

对于List分区,VIP用户的性能能够得到保证。

我们可以将每个VIP用户单独存储在一个分区上,但是,不可能将非VIP用户单独存储开(不仅增加维护难度,且增加整个表的大小),只能将非VIP用户存储在几个分区上。

但是这样还是造成DDL语句非常复杂,并且非VIP的分区很大(每个都在10G左右,而VIP分区最大才200M)。

Oracle 数据库11g新特性概述

Oracle 数据库11g新特性概述
<Insert Picture Here>
Oracle 数据库 11g 新特性概述
Martin.yang@
Oracle数据库进化史
Oracle exadata
Oracle 数据库 11g
数据库一体机
数据屏蔽
TDE 表空间加密 Oracle Audit Vault Oracle Database Vault 透明数据加密 (TDE)
• 表压缩技术
• 象在数据仓库应用中一样, 现在可以用在OLTP应用中
• 查询结果集缓存
• 查询或函数结果集的高速缓存, 可用于大量读操作的数据
• 新一代RAC Cache Fusion技术
• 更高的伸缩性
Oracle SecureFiles
Consolidated Secure Management of Data 许多应用同时使用文件和关系型数据 • 例: 文档管理系统, 医药, CAD, 图象管理
• • •
DataGuard创新
• DataGuard增强
• 支持只读物理备份 • APPLY性能提高
• 支持XML类型
• 支持透明数据加密
• 备份数据库快照
• 除作为HA和DR外, 充分利用备份数据库 资源 • 测试! • 保证无数据丢失
DataGuard从根本上改变了冗余架构的价值
Flashback创新
Oracle 数据库 10g
实时列屏蔽(VPD) 安全配置扫描
客户端身份传播 细粒度审计 Oracle 数据库 9i Oracle Label Security 代理身份验证 企业用户安全性 Oracle 8i 虚拟专用数据库 (VPD)
数据库加密 API 强身份验证 自带网络加密 Oracle 7 数据库审计 政府客户

oracle11gR2(oracle11.2)新特性

oracle11gR2(oracle11.2)新特性

oracle11gR2(oracle11.2)新特性by o8xv0123加强了升级包的安装功能1,直接从老版本升级到最新版,而不需要从老版本多次逐个执行小版本的升级比如,可以从11.0.1.0直接升级到11.0.3.0 或者从10.x直接升级到11.0.3.0而不需要先升级到11.0.2.0,再到11.0.3.02,可以将补丁包安装到新的独立的目录中,同时也支持用补丁覆盖安装到旧版oracle软件所在的目录,官方推荐前者3,新的软件安装包集成了安装程序和升级包,而不是先安装一个基础版本再打补丁包新的软件升级选项1,从oracle 11g r2开始,支持在线升级功能(动态地从oracle服务器下载,同时进行升级),也可以先将补丁包下载到本地,然后进行安装2,支持oracle客户端的覆盖安装升级3,TDE硬件设备加速功能(直译)新的oracl e网格架构安装选项Oracle Database 11g Release 2提供了新的oracle网格架构的安装,在单实例的数据库中,oracle的网格架构包括,ASM,listener和oracle restart(新特性),oracle restart将会监控oracle的运行并管理oracle的运行状况,如果一个包含了oracle数据库实例,oracle ASM管理实例和listener的oracle 环境出现故障,oracle restart将会自动对其进行重新启动。

在集群环境中,oracle网格架构包括,oracle 集群,oracle ASM和listeners。

如果想要在独立服务器中使用oracle 网格架构的话,必须要在安装oracle数据库之前安装oracle网格架构的相关软件。

新的桌面和服务器安装选项Oracle Database 11g Release 2提供了一个新的安装选项,你可以选择要安装数据库的系统的类型,如果是笔记本或者PC的话,可以选择"桌面类型“选项,否则可以选择服务器类型。

11g新特性-安全

11g新特性-安全

一.密码安全为了遵守各种安全性和隐私规定,必须使用更安全的口令。

如果口令非常短或仅包含有限的字符,则对于强力攻击就很脆弱,而包含较多不同字符的较长口令就很难被猜出或获得。

在Oracle Database 11g中,口令的处理方式与早期版本中的处理方式有所不同:(1) 口令区分大小写。

口令中使用的大写字符和小写字符现在是不同的字符。

(2) 口令可以包含未用引号括起来的多字节字符。

如果口令包含除$、_ 或# 外的任何特殊字符,则必须用引号括起来。

(3) 口令始终通过散列算法传递,然后作为用户身份证明进行存储。

用户提供口令时,系统会对其进行散列运算,然后将其与存储的身份证明进行比较。

在Oracle Database(4) 11g 中,散列算法是早期版本数据库中使用的公共算法SHA-1。

SHA-1 是一种使用160 位密钥的较强算法。

(5) 口令始终使用salt。

如果输入内容相同,散列函数将始终生成相同的输出。

Salt是添加到输入中的唯一(随机)值,用于确保输出身份证明是唯一的。

OracleDatabase 11g 中的口令:(1) 区分大小写(2) 包含更多的字符(3) 使用更安全的散列算法(4) 在散列算法中使用salt用户名仍是Oracle 标识符(最多30个字符,不区分大小写)。

之前整理的Blog:Oracle10g/11g 密码策略用户口令大小写敏感说明/tianlesoftware/article/details/7383110二.自动安全配置Oracle Database11g 使用由Internet 安全中心(CIS) 基准推荐的特定安全功能安装和创建数据库。

与10gR2 的默认安装相比,CIS 推荐的配置更安全,而且开放程度足以使大多数应用程序都能成功运行。

许多客户已采用了此基准。

CIS 基准的一些建议可能与一些应用程序不兼容。

2.1 Profile安全默认配置使用DatabaseConfiguration Assistant (DBCA) 创建自定义数据库时,可以指定Oracle Database11g 的默认安全配置。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Oracle 11g 新特性Oracle 11g现在已经开始进行beta测试,预计在2007年底要正式推出。

和她以前其他产品一样,新一代的oracle又将增加很多激动人心的新特性。

下面介绍一些11g 的新特性。

1.数据库管理部分•数据库重演(Database Replay)这一特性可以捕捉整个数据的负载,并且传递到一个从备份或者standby数据库中创建的测试数据库上,然后重演负责以测试系统调优后的效果。

•SQL重演(SQL Replay)和前一特性类似。

但是只是捕捉SQL负载部分,而不是全部负载。

•计划管理(Plan Management)这一特性允许你将某一特定语句的查询计划固定下来,无论统计数据变化还是数据库版本变化都不会改变她的查询计划。

•自动诊断知识库(Automatic Diagnostic Repository ADR)当Oracle探测到重要错误时,会自动创纪一个事件(incident),并且捕捉到和这一事件相关的信息,同时自动进行数据库健康检查并通知DBA。

此外,这些信息还可以打包发送给Oracle支持团队。

•事件打包服务(Incident Packaging Service)如果你需要进一步测试或者保留相关信息,这一特性可以将与某一事件相关的信息打包。

并且你还可以将打包信息发给oracle支持团队。

•基于特性打补丁(Feature Based Patching)在打补丁包时,这一特性可以使你很容易区分出补丁包中的那些特性是你正在使用而必须打的。

企业管理器(EM)使你能订阅一个基于特性的补丁服务,因此企业管理器可以自动扫描那些你正在使用的特性有补丁可以打。

•自动SQL优化(Auto SQL Tuning)10g的自动优化建议器可以将优化建议写在SQL profile中。

而在11g中,你可以让oracle自动将能3倍于原有性能的profile应用到SQL语句上。

性能比较由维护窗口中一个新管理任务来完成。

•访问建议器(Access Advisor)11g的访问建议器可以给出分区建议,包括对新的间隔分区(interval partitioning)的建议。

间隔分区相当于范围分区(range partitioning)的自动化版本,她可以在必要时自动创建一个相同大小的分区。

范围分区和间隔分区可以同时存在于一张表中,并且范围分区可以转换为间隔分区。

•自动内存优化(Auto Memory Tuning)在9i中,引入了自动PGA优化;10g中,又引入了自动SGA优化。

到了11g,所有内存可以通过只设定一个参数来实现全表自动优化。

你只要告诉oracle有多少内存可用,她就可以自动指定多少内存分配给PGA、多少内存分配给SGA和多少内存分配给操作系统进程。

当然也可以设定最大、最小阈值。

•资源管理器(Resource Manager)11g的资源管理器不仅可以管理CPU,还可以管理IO。

你可以设置特定文件的优先级、文件类型和ASM磁盘组。

•ADDMADDM在10g被引入。

11g中,ADDM不仅可以给单个实例建议,还可以对整个RAC(即数据库级别)给出建议。

另外,还可以将一些指示(directive)加入ADDM,使之忽略一些你不关心的信息。

•AWR 基线(AWR Baselines)AWR基线得到了扩展。

可以为一些其他使用到的特性自动创建基线。

默认会创建周基线。

2.PLSQL部分•结果集缓存(Result Set Caching)这一特性能大大提高很多程序的性能。

在一些MIS系统或者OLAP系统中,需要使用到很多"select count(*)"这样的查询。

在之前,我们如果要提高这样的查询的性能,可能需要使用物化视图或者查询重写的技术。

在11g,我们就只需要加一个/*+result_cache*/的提示就可以将结果集缓存住,这样就能大大提高查询性能。

当然,在这种情况下,我们可能还要关心另外一个问题:完整性。

因为在oracle中是通过一致性读来保证数据的完整性的。

而显然,在这种新特性下,为提高性能,是从缓存中的结果集中读取数据,而不会从回滚段中读取数据的。

关于这个问题,答案是完全能保证完整性。

因为结果集是被独立缓存的,在查询期间,任何其他DML语句都不会影响结果集中的内容,因而可以保证数据的完整性。

•对象依赖性改进在11g之前,如果有函数或者视图依赖于某张表,一旦这张表发生结构变化,无论是否涉及到函数或视图所依赖的属性,都会使函数或视图变为invalid。

在11g中,对这种情况进行了调整:如果表改变的属性与相关的函数或视图无关,则相关对象状态不会发生变化。

•正则表达式的改进在10g中,引入了正则表达式。

这一特性大大方便了开发人员。

11g,oracle再次对这一特性进行了改进。

其中,增加了一个名为regexp_count的函数。

另外,其他的正则表达式函数也得到了改进。

•新SQL语法 =>我们在调用某一函数时,可以通过=>来为特定的函数参数指定数据。

而在11g中,这一语法也同样可以出现在sql语句中了。

例如,你可以写这样的语句:select f(x=>6) from dual;•对TCP包(utl_tcp、utl_smtp…)支持FGAC(Fine Grained Access Control)安全控制•增加了只读表(read-only table)在以前,我们是通过触发器或者约束来实现对表的只读控制。

11g中不需要这么麻烦了,可以直接指定表为只读表。

•触发器执行效率提高了•内部单元内联(Intra-Unit inlining)在C语言中,你可以通过内联函数(inline)或者宏实现使某些小的、被频繁调用的函数内联,编译后,调用内联函数的部分会编译成内联函数的函数体,因而提高函数效率。

在11g的plsql中,也同样可以实现这样的内联函数了。

•设置触发器顺序可能在一张表上存在多个触发器。

在11g中,你可以指定它们的触发顺序,而不必担心顺序混乱导致数据混乱。

•混合触发器(compound trigger)这是11g中新出现的一种触发器。

她可以让你在同一触发器中同时具有申明部分、before过程部分、after each row过程部分和after过程部分。

•创建无效触发器(Disabled Trigger)11g中,开发人员可以可以闲创建一个invalid触发器,需要时再编译她。

•在非DML语句中使用序列(sequence)在之前版本,如果要将sequence的值赋给变量,需要通过类似以下语句实现:select seq_x.next_val into v_x from dual;在11g中,不需要这么麻烦了,下面语句就可以实现:v_x := seq_x.next_val;•PLSQL_Warning11g中。

可以通过设置PLSQL_Warning=enable all,如果在"when others"没有错误爆出就发警告信息。

•PLSQL的可继承性可以在oracle对象类型中通过super(和java中类似)关键字来实现继承性。

•编译速度提高因为不在使用外部C编译器了,因此编译速度提高了。

•改进了DBMS_SQL包其中的改进之一就是DBMS_SQL可以接收大于32k的CLOB了。

另外还能支持用户自定义类型和bulk操作。

•增加了continue关键字在PLSQL的循环语句中可以使用continue关键字了(功能和其他高级语言中的continue关键字相同)。

•新的PLSQL数据类型——simple_integer这是一个比pls_integer效率更高的整数数据类型。

3.其他部分•增强的压缩技术可以最多压缩2/3的空间。

•高速推进技术可以大大提高对文件系统的数据读取速度。

•增强了DATA Guard可以创建standby数据库的快照,用于测试。

结合数据库重演技术,可以实现模拟生成系统负载的压力测试•在线应用升级也就是热补丁——安装升级或打补丁不需要重启数据库•数据库修复建议器可以在错误诊断和解决方案实施过程中指导DBA。

•逻辑对象分区可以对逻辑对象进行分区,并且可以自动创建分区以方便管理超大数据库(Very Large Databases VLDBs)•新的高性能的LOB基础结构•新的PHP驱动Oracle 11g new FeaturesAt Oracle Openworld 2006, Oracle announced some exciting new features of Oracle 11g, and they promise 482 new Oracle11g features. Here is my list which I continually update as new Oracle11g new feature information is released:•11g SQL new features•11g language support new features•11g PL/SQL New Features•11g DBA features•11g RAC new features & enhancements•11g performance features•11g security new features•11g Enterprise Manager new featuresWe are also seeing upcoming books on Oracle 11g new features. Let's get started with the Oracle11g new features for general database administration:Oracle 11g DBA new features•Interval partitioning for tables - This is a new 11g partitioning scheme that automatically creates time-based partitions as new data is added. Source: MarkRittman This is a marvelous one ! You can now partition by date, one partition permonth for example, with automatic partition creation. Source: Laurent Schneider •New load balancing utilities -There are several new load balancing utilities in 11g (first introduced in 10gr2):•Web server load balancing - The web cache component includes Apache extension to load-balance transactions to the least-highly-loaded Oracle HTTP server (OHS).•RAC instance load balancing - Staring in Oracle 10g release 2, Oracle JDBC and provide connection pool load balancing facilities through integration withth e new “load balancing advisory” tool.This replaces the more-cumbersomelistener-based load balancing technique.•Automated Storage Load balancing - Oracle’s Automatic Storage Management (SAM) now enables a single storage pool to be shared by multiple databases foroptimal load balancing. Shared disk storage resources can alternatively be assignedto individual databases and easily moved from one database to another as processing requirements change.•Data Guard Load Balancing– Oracle Data Guard allows for load balancing between standby databases.•Listener Load Balancing - If advanced features such as load balancing and automatic failover are desired, there are optional sections of the listener.ora file that must be present•New table Data Type "simple_integer" - A new 11g datatype dubbed simple_integer is introduced. The simple_integer data type is always NOT NULL, wraps instead of overflows and is faster than PLS_INTEGER. Source: LewisCunningham•Improved table/index compression - Segment compression now works for all DML, not just direct-path loads, so you can create tables compressed and use them forregular OLTP work. Also supports column add/drop. Mark Rittman•Faster DML triggers - DML triggers are up to 25% faster. This especially impacts row level triggers doing updates against other tables (think Audit trigger). Source: Lewis Cunningham•Improved NFS data file management - Kevin Closson has some great notes on Oracle 11g improvement in Networked Attached Storage(NAS). "I’ve alreadyblogged that 11g “might” have an Oracle-provided NFS client. Why is this? It’sbecause Oracle knows full well that taking dozens of commodity servers and saddling them up with multi-protocol connectivity is a mess.•Server-side connection pooling - In 11g server-side connection pooling, an additional layer to the shared server, to enable faster [actually to bypass] sessioncreation. Source: Laurent Schneider Server-side connection pooling allows multiple Oracle clients to share a server-side pool of sessions (USERIDs must match). Clients can connect and disconnect (think PHP applications) at will without the cost ofcreating a new server session - shared server removes the process creation cost but not the session creation cost. Mark Rittman•RMAN UNDO bypass - Rman backup can bypass undo. Undo tablespaces are getting huge, but contain lots of useless information. Now rman can bypass those types of tablespace. Great for exporting a tablespace from backup. Source: Laurent Schneider•Capture/replay database workloads - Sounds appealing. You can capture theworkload in prod and apply it in development. Source: Laurent Schneider •Scalability Enhancements - The features in 11g focused on scalability andperformance can be grouped into four areas: Scalable execution, scalable storage, scalable availability and scalable management. Mark Rittman•Scalable execution - Scalable execution consists of a number of features, the first of which is query results caching; this feature automatically caches the results of an SQL query as opposed to the data blocks normally cached by the buffer cache, and works both client (OCI) and server side - this was described as "buffer cache taken to the next level". The DBA sets the size of the results cache and turns the feature on at a table level with the command "alter table DEPT cache results", the per-process cache is shared across multiple session and at the client level, is available with all 11gOCI-based clients. Mark Rittman•Virtual columns - Oracle 11g virtual table columns are columns that are actually functions ("create table t1 (c1 number, c2 number, c3 as (c1+c2) virtual"), andsimilarly, virtual indexes that are based on functions REF partitioning, allowing you to partition a table based on the partition scheme of another. Allows you to partition an order_items table based off of the order_date column in an orders table. Source: Source: Mark Rittman• A "super" object-oriented DDL keyword - This is used with OO Oracle when instantiating a derivative type (overloading), to refer to the superclass from whence the class was derived.•Oracle 11g XML data storage - Starting in 11g, you can store XML either as a CLOB or a binary data type, adding flexibility. Oracle11g will support querymechanisms for XML including XQuery and SQL XML, emerging standards forquerying XML data stored inside tables.•Data Guard supports "Flashback Standby".•New Trigger features - A new type of "compound" trigger will have sections for BEFORE, ROW and AFTER processing, very helpful for avoiding errors, andmaintaining states between each section.•Partitioning - partitioning by logical object and automated partition creation. •LOB's - New high-performance LOB features.•Automatic Diagnostic Repository (ADR) - When critical errors are detected, they automatically create an “incident”. Information relating to the incident isautomatically captured, the DBA is notified and certain health checks are runautomatically. This information can be packaged to be sent to Oracle support (seefollowing). Source: Dr. Tim Hall•Incident Packaging Service (IPS) - This wraps up all information about an incident, requests further tests and information if necessary, and allows you to send the wholepackage to Oracle Support. Source: Dr. Tim Hall•Feature Based Patching - All one-off patches will be classified as to which feature they affect. This allows you to easily identify which patches are necessary for thefeatures you are using. EM will allow you to subscribe to a feature based patchingservice, so EM automatically scans for available patches for the features you areusing. Source: Dr. Tim Hall•New Oracle11g Advisors - New 11g Oracle Streams Performance Advisor and Partitioning Advisor. Source: Mark Rittman•Enhanced Read only tables -•Table trigger firing order - Oracle 11g PL/SQL will you to specify trigger firing order.Oracle11g High Availability & RAC new featuresOracle continues to enhanced Real Application Clusters in Oracle11g and we see some exciting new features in RAC manageability and enhanced performance:•Oracle 11g RAC parallel upgrades - Oracle 11g promises to have a rolling upgrade features whereby RAC database can be upgraded without any downtime. Ellisonfirst promised this feature in 2002, and it is a very challenging and complex 11g newfeature.•Oracle RAC load balancing advisor - Starting in 10gr2 we see a RAC load balancing advisor utility.•ADDM for RAC -•Optimized RAC cache fusion protocols - moves on from the general cache fusion protocols in 10g to deal with specific scenarios where the protocols could be furtheroptimized. Source: Mark Rittman•Oracle 11g RAC Grid provisioning - Oracle 11g OEM has have easy server blade installs where a binary footprint is tar'ed to the server blade and configured, without a cumbersome install process.•Hot patching - Zero downtime patch application.•Standby snapshot - For the purpose of regression testing.•Quick Fault Resolution - Automatic capture of diagnostics (dumps) for a fault.OEM - Enterprise Manager Oracle 11g new features:•Interfaces to Applications - This note says "Oracle says that extending Enterprise Manager's capabilities are part of the firm's promise to seamlessly integrate the spoils of its many acquisitions -- including the purchases of Siebel Systems and PeopleSoftCorp. -- into a single platform."•OEM Easy de-install - This will uninstall both successful and unsuccessful Oracle installs.•Database repair wizard - A GUI to guide beginners through the steps to diagnose and repair Oracle issues.•Better OEM Grid tools - Another new Oracle11g feature may be improved RAC and Grid monitoring, especially on the cache fusion interconnect.•Enterprise Manager interfaces to foreign applications - This note says "Oracle says that extending Enterprise Manager's capabilities are part of the firm's promise to seamlessly integrate the spoils of its many acquisitions -- including the purchases ofSiebel Systems and PeopleSoft Corp. -- into a single platform."Oracle 11g programming language support New Features•PHP - Improved PHP driver for Oracle.•Compilers - Improved native Java & PL/SQL compilers.•Oracle 11g XML Enhancements - Oracle 11g will also support Content Repository API for Java Technology (JSR 170). Oracle 11g has XML "duality", meaning thatyou can also embed XML directives inside PL/SQL and embed PL/SQL inside XML code. Oracle 11g XML will also support schema-based document Type Definitions(DTD's), to describe internal structure of the XML document.•Scalable Java - The next scalable execution feature is automatic creation of "native"Java code, with just one parameter for each type with an "on/off" value. Thisapparently provides a 100% performance boost for pure Java code, and a 10%-30%boost for code containing SQL. Mark Rittman•Improved sequence management - A new features of Oracle 11g will bypass DML (sequence.nextval) and allow normal assignments on sequence values.•Intra-unit inlining. In C, you can write a macro that gets inlined when called. Now any stored procedure is eligible for inlining if Oracle thinks it will improveperformance. No change to your code is required. Now you have no reason for notmaking everything a subroutine! Source: Lewis CunninghamOracle 11g PL/SQL New Features•PL/SQL "continue" keyword - This will allow a C-Like continue in a loop, to bypass any "else" Boolean conditions. A nasty PL/SQL GOTO is no longer required to exit a Boolean within a loop.•Disabled state for PL/SQL - Another 11g new feature is a "disabled" state for PL/SQL (as opposed to "enabled" and "invalid" in dba_objects).•Easy PL/SQL compiling - Native Compilation no longer requires a C compiler to compile your PL/SQL. Your code goes directly to a shared library. Source: LewisCunningham•Improved PL/SQL stored procedure invalidation mechanism - A new 11g features will be fine grained dependency tracking, reducing the number of objects whichbecome invalid as a result of DDL.•Scalable PL/SQL - The next scalable execution feature is automatic creation of "native" PL/SQL (and Java code), with just one parameter for each type with an"on/off" value. This apparently provides a 100% performance boost for pure PL/SQL code, and a 10%-30% performance boost for code containing SQL. Mark Rittman•Enhanced PL/SQL warnings - The 11g PL/SQL compiler will issue a warning for a "when others" with no raise.•Stored Procedure named notation - Named notation is now supported when callinga stored procedure from SQL.Oracle 11g SQL New Features•The /*+result_cache*/ SQL hint - This suggests that the result data will be cached in the data buffers, and not the intermediate data blocks that were accessed to obtain the query results. You can cache both SQL and PL/SQL results for super-fast subsequent retrieval.•XML SQL queries - Oracle11g will support query mechanisms for XML including XQuery and SQL XML, emerging standards for querying XML data stored insidetables.•SQL Replay - Similar to the previous feature, but this only captures and applies the SQL workload, not total workload. Source: Dr. Tim Hall•Improved optimizer statistics collection speed - Oracle 11g has improved the dbms_stats performance, allowing for an order of magnitude faster CBO statisticscreation Mark Rittman•SQL execution Plan Management - Oracle 11g SQL will allow you to fix execution plans (explain plan) for specific statements, regardless of statistics or databaseversion changes. Source: Dr. Tim Hall•Dynamic SQL. DBMS_SQL is here to stay. It's faster and is being enhanced.DBMS_SQL and NDS can now accept CLOBs (no more 32k limit on NDS). A refcursor can become a DBMS_SQL cursor and vice versa. DBMS_SQL now supprtsuser defined types and bulk operations. Source: Lewis Cunningham•Fully Automatic SQL Tuning - The 10g automatic tuning advisor makes tuning suggestions in the form of SQL profiles that will improve performance. You can tell11g to automatically apply SQL profiles for statements where the suggested profilegive 3-times better performance that the existing statement. The performancecomparisons are done by a new administrative task during a user-specifiedmaintenance window.•Improved SQL Access Advisor - The 11g SQL Access Advisor gives partitioning advice, including advice on the new interval partitioning. Interval partitioning is anautomated version of range partitioning, where new equally-sized partitions areautomatically created when needed. Both range and interval partitions can exist for asingle table, and range partitioned tables can be converted to interval partitionedtables.11g Performance tuning optimization new features:•Automatic Memory Tuning - Automatic PGA tuning was introduced in Oracle 9i.Automatic SGA tuning was introduced in Oracle 10g. In 11g, all memory can betuned automatically by setting one parameter. You literally tell Oracle how muchmemory it has and it determines how much to use for PGA, SGA and OS Processes.Maximum and minimum thresholds can be set.•Resource Manager - The 11g Resource Manager can manage I/O, not just CPU. You can set the priority associated with specific files, file types or ASM disk groups.•ADDM - The ADDM in 11g can give advice on the whole RAC (database level), not just at the instance level. Directives have been added to ADDM so it can ignore issues you are not concerned about. For example, if you know you need more memory andare sick of being told it, you can ask ADDM not to report those messages anymore.•Faster sorting - Starting in 10gr2 we see an improved sort algorithm, “Oracle10gRw introduced a new sort algorithm which is using less memory and CPU resources. Ahidden parameter _newsort_enabled = {TRUE|FALSE} governs whether the new sort algorithm will be used.”•AWR Baselines - The AWR baselines of 10g have been extended to allow automatic creation of baselines for use in other features. A rolling week baseline is created bydefault.•Adaptive Metric Baselines - Notification thresholds in 10g were based on a fixed point. In 11g, notification thresholds can be associated with a baseline, so thenotification thresholds vary throughout the day in line with the baseline.Oracle 11g security & auditing new features•Enhanced Password - Pete Finnigan notes some new Oracle 11g security features "[Oracle 11g] will have case sensitive passwords and also the password algorithm has changed to SHA-1 instead of the old DES based hashing used."•Oracle SecureFiles - replacement for LOBs that are faster than Unix files to read/write. Lots of potential benefit for OLAP analytic workspaces, as the LOBs used to hold AWs have historically been slower to write to than the old Express .db files.Mark Rittman Securefiles are a huge improvement to BLOB data types. Faster, withcompression, encryption. Source: Laurent Schneider•Oracle 11g audit vault - Oracle Audit Vault is a new feature that will provide a solution to help customers address the most difficult security problems remainingtoday, protecting against insider threat and meeting regulatory compliancerequirements.•Proxy connect for SQL*Plus- New with 10r2 proxy identification in SQL*Plus, the "connect" command has been enhanced to allow for a "proxy", to aid applications that always connect with the same user ID:connect sapr3[scott]/tiger•FGAC for UTL_SMTP, UTL_TCP and UTL_HTTP. You can define security on ports and URLs. Source: Lewis Cunningham•Fine Grained Dependency Tracking (FGDT). This means that when you add a column to a table, or a cursor to a package spec, you don't invalidate objects that aredependant on them. Sweet! Source: Lewis Cunningham•Database Workload Replay - Oracle "Replay" allows the total database workload to be captured, transferred to a test database created from a backup or standby database, then replayed to test the affects of an upgrade or system change. Currently, they areworking to a capture performance overhead of 5%, so you could conceivably capture real production workloads. Source: Dr. Tim Hall。

相关文档
最新文档