Results tagged “10g”

About Oracle 10g/11g AWR

Oracle 10g 开始 引入了AWR (Automatic Workload Repository). Oracle 建议用户用这个取代 Statspack。不过这个需要注意的是使用 AWR 需要有 Diagnostic Pack License。Oracle 后来推出了一个解决方案可以禁止掉该特性。

在 Note. 436386.1 有说明:

SQL> @dbms_awr.plb
然后执行:
dbms_awr.disable_awr();

如果用 sys 之外的用户创建 AWR 报告,则需要进行合适的授权。否则会报告错误 PACKAGE 执行错误。

CONNECT / AS SYSDBA;
GRANT ADVISOR TO foo;
GRANT SELECT_CATALOG_ROLE TO foo;
GRANT EXECUTE ON sys.dbms_workload_repository TO foo;

注意 Bug 4597354 在创建基线数据的时候,对性能有很大影响。在一个非常繁忙的系统上不要进行此操作。

如果结合企业管理器用 AWR 是很方便的,如果用手工方式收集性能数据,多了很多可供调整的地方,是更加方便了呢?还是更加麻烦了?

--EOF--

Oracle 10g ASM 的一点经验

Oracle 10g 的 ASM (自动存储管理) 真是一把双刃剑,对于存储的管理给 DBA 带来了不少便利,可也存在无穷多的问题。

ASM_POWER_LIMIT 参数

这个参数 ASM_POWER_LIMIT 参数控制 ASM 后台进程 ARBx 的数量。ARBx 进程用来进行 ASM 磁盘数据重新分布打散。ASM_POWER_LIMIT 取值 从 0 到 11(据说从 10gR2 开始可以设置为 0 ). 当新添加磁盘或者删除磁盘后,ASM 会启动 ARBx 进行 IO 分散操作,这是个非常消耗资源的动作,所以一定要选择系统空闲的时候进行。

关于 ASM 的条带与分配单元

ASM 默认的 Stripe Size 为 128K。 (一般操作系统的一个 IO 最大是 1M,对于 Block Size 为 8K 的系统,一般来说,db_file_multiblock_read_count 设置为 16 即可)。分配单元( Allocation Unit ) 是 1M,这个 AU 对应 extent 。在一些 DW 环境,随着数据量增大,AU 会非常的多,会产生性能影响。Stripe Size 和 AU 是可以通过 ASM 实例上的两个隐含参数调整的:

  • _asm_ausize
  • _asm_stripesize(注意最大1M,否则会有负面影响)

磁盘组不能 mount

错误信息类似如下:
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "FOO"
这个问题是因为 设备 PVID 导致的,一般可以通过如下三个方法解决:
  • 对磁盘组中的设备进行 dd 操作抹去磁盘 0 块的内容
  • 用 FORCE 选项把磁盘添加到其他磁盘组中。
  • 用 FORCE 选项用所有这些磁盘创建新的磁盘组。
哪一种方式都有风险,操作需要谨慎。

--EOF--

Oracle 10g R2 的 Data Pump 是一个好工具,弥补了传统 export/import 工具的很多不足。相关信息可以参考一下我以前对 Data Pump 的介绍

最近在 Linux 平台上经常遇到 ORA-39095 错误。这个错误。这个错误号,文档的解释:

ORA-39095:Dump file space has been exhausted: Unable to allocate string bytes
Cause: The Export job ran out of dump file space before the job was completed.
Action: Reattach to the job and add additional dump files to the job restarting the job.

这个解释只针对一般情况。我遇到的这个案例,目录的空间还有很多,可是也一样报错了。而且,一般在第 100 个 导出文件出错(更正:%U参数是2位,定长的,最大99)。开始以为是 Bug,可是遍查 Metalink,发现和 ORA-39095 错误有关只有两条信息,和我遇到的情况不符。

偶然在阅读 Oracle Database Utilities 手册的时候,发现了这一段话:

Because each active worker process or I/O server process writes exclusively to one file at a time, an insufficient number of files can have adverse effects. Some of the worker processes will be idle while waiting for files, thereby degrading the overall performance of the job. More importantly, if any member of a cooperating group of parallel I/O server processes cannot obtain a file for output, then the export operation will be stopped with an ORA-39095 error. Both situations can be corrected by attaching to the job using the Data Pump Export utility, adding more files using the ADD_FILE command while in interactive mode, and in the case of a stopped job, restarting the job.

真是孤陋寡闻了,我的并行度用的是 4 ,减小这个并行度,该错误不再出现。

You can supply multiple file_name specifications as a comma-delimited list or in separate DUMPFILE parameter specifications. If no extension is given for the filename, then Export uses the default file extension of .dmp. The filenames can contain a substitution variable (%U), which implies that multiple files may be generated. The substitution variable is expanded in the resulting filenames into a 2-digit, fixed-width, incrementing integer starting at 01 and ending at 99. If a file specification contains two substitution variables, both are incremented at the same time. For example, exp%Uaa%U.dmp would resolve to exp01aa01.dmp, exp02aa02.dmp, and so forth.

--EOF--

Oracle 10g 中 CONNECT 角色的变化

其实是一个很老的"新"变化。Oracle 10g 对 CONNECT 角色作了一点调整。原来的 CONNECT 角色(9i) 包括

CREATE SESSION
CREATE TABLE
CREATE VIEW
CREATE SYNONYM
CREATE CLUSTER
CREATE DATABASE LINK
CREATE SEQUENCE
ALTER SESSION
其中象 ALTER SESSION 这样的权限还是很危险的,一个用户可以搞垮整个数据库。所以估计是出于安全的原因吧,Oracle 10g 现在只保留了 CREATE SESSION 这个权限。

在 Metalink Note:317258.1 描述了 CONNECT 的变迁,不看不知道,一看吓一跳,在 Oracle 7 上该角色还包括预定义角色 DBA , 即使是 Oracle 8i 上,该角色也包括了很多权限过大的预定义角色。

细微的东西往往隐藏着危险。

如果是从低版本升级到 10g 导致权限问题,可以用 $ORACLE_HOME/rdbms/admin/rstrconn.sql 这个脚本进行恢复.

--EOF--

2 3 4  

Tags

回到 首页 查看最近所有文章或者查看所有 归档文章.