标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-600 kcratr_nab_less_than_odr ORA-600 kdsgrp1 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,841)
- DB2 (22)
- MySQL (81)
- Oracle (1,669)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (69)
- Oracle Bug (8)
- Oracle RAC (55)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (632)
- Oracle安装升级 (103)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (89)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (4)
- 达梦恢复 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (47)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (30)
-
最近发表
- aix环境rac 私网直连导致haip启动异常
- 又一例TRIM导致asm磁盘数据丢失的故障
- 一次运气好的ORA-600 kcratr_nab_less_than_odr故障处理
- OraFHR快速open被勒索加密破坏的Oracle数据库
- obet一键恢复offline数据文件
- 记录一次win删除数据文件完美恢复案例
- Oracle典型故障:The controlfile header block returned by the OS has a sequence number that is too old
- 国产信创库fio破坏主备库以及备份故障处理
- .wman扩展名勒索mysql数据库恢复
- Oracle数据库被勒索加密一键open工具–OraFHR
- 通过alert日志回顾其他dba oracle异常恢复故障处理以及后续open数据库操作
- 年前几例Oracle数据库被加密为.wman的数据库故障恢复
- 文件系统损坏导致数据库异常故障处理
- expdp导出xml列报ORA-22924故障处理
- obet处理ORA-704 ORA-604 ORA-1578故障
- obet修复csc higher than block scn类型坏块
- ORA-600 kcratr_nab_less_than_odr和ORA-600 4193故障处理
- aix环境10g由于控制器异常导致ORA-600 4000故障处理
- ORA-600 3716故障处理
- 不当恢复truncate数据导致数据库不能open处理
标签归档:inmemory
InMemory评估利器—Oracle Database InMemory Advisor
我想大家都可能有一个疑问,数据库从以前版本升级到12C,计划使用in-memory特性,那我怎么评估哪些表放进去合适,放进去后,整体性能又会提升多少,需要in-memory内存为多大?这些问题如果人工去判断不一定准确,而且可能有很多遗落,Oracle也考虑到了这一点,因此发布了Oracle Database InMemory Advisor,从而来比较简单的实现数据库使用In-Memory简单配置.Oracle Database InMemory Advisor主要通过DBMS_INMEMORY_ADVISOR包分析 Active Session History (ASH), Automatic Workload Repository (AWR) and SQL Tuning Sets (STS)信息进行分析,给出建议.
Oracle Database InMemory Advisor使用前提
1.数据库版本为11.2.0.3及其以上版本(compatibility>=11.2.0.3)
2.需要有Database Tuning pack liscense支持(仅仅是liscense,不是功能)
安装Oracle Database InMemory Advisor
[oracle@localhost xff]$ unzip imadvisor.zip Archive: imadvisor.zip inflating: instimadv.sql inflating: dbmsimadv.sql inflating: prvtimadv.plb inflating: dbmsimadvint.plb inflating: prvtimadvint.plb inflating: schmimadv.sql inflating: imadvisor_version.sql inflating: imadvisor_load_report_templates.sql inflating: imadvisor_clone_view.sql inflating: imadvisor_analyze_and_report.sql inflating: imadvisor_spool_debug.sql inflating: imadvisor_export.sql inflating: imadvisor_DataPump.sql inflating: imadvisor_awr_augment_export.sql inflating: imadvisor_awr_augment_import.sql inflating: imadvisor_awr_augment_tables.sql inflating: imadvisor_fetch_recommendations.sql [oracle@localhost xff]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 18 16:21:08 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> @instimadv Welcome to the Oracle Database In-Memory Advisor (DBMS_INMEMORY_ADVISOR) installation. The Oracle Database In-Memory Advisor is licensed as part of the Oracle Tuning Pack. Do you currently have a valid Oracle Tuning Pack license with this database (Y/N)? Y DBMS_INMEMORY_ADVISOR uses Active Session History (ASH), Automatic Workload Repository (AWR) and optionally SQL Tuning Sets (STS) to determine which tables, partitions and subpartitions to place In Memory for optimized analytics processing performance. DBMS_INMEMORY_ADVISOR produces a recommendation report and a SQLPlus script to implement its recommendations. This installation script will create user IMADVISOR and add object definitions to the schema including the DBMS_INMEMORY_ADVISOR package. This installation script creates user IMADVISOR using the IDENTIFIED BY password method. If you prefer to use either the IDENTIFIED EXTERNALLY or IDENTIFIED GLOBALLY method, abort this installation by pressing ^C. Then create user IMADVISOR using your preferred method. Add no objects to the IMADVISOR schema. Then run this installation script again. These actions will be taken on the database to which you are currently connected. Please enter the connection ID for the current database? qsng This installation script creates a new Oracle database user and schema named IMADVISOR for the operation of DBMS_INMEMORY_ADVISOR... Please enter the password for user IMADVISOR? For confirmation, please re-enter the password for user IMADVISOR? Available tablespaces: TABLESPACE_NAME ------------------------------ FSDATA MYDATA SYSAUX SYSTEM TEMP UNDOTBS1 USERS Please enter the default tablespace name for user IMADVISOR? users The In-Memory Advisor uses the Oracle directory object IMADVISOR_DIRECTORY by default. If you wish to create the IMADVISOR_DIRECTORY object, please enter an OS host directory path for the IMADVISOR_DIRECTORY object. If not, please press ENTER to continue. ? /tmp/xff Connecting to IMADVISOR @ qsng.. Enter password: Connected. No errors. No errors. No errors. No errors. No errors. No errors. DBMS_INMEMORY_ADVISOR installation successful. Users who will use the DBMS_INMEMORY_ADVISOR package must be GRANTed EXECUTE on the DBMS_INMEMORY_ADVISOR package. Please enter a comma separated list of Oracle Database users to whom you wish EXECUTE on the DBMS_INMEMORY_ADVISOR package to be GRANTed? SYS GRANT EXECUTE ON dbms_inmemory_advisor TO SYS While logged in as IMADVISOR or with sufficient privileges, you can GRANT EXECUTE ON DBMS_INMEMORY_ADVISOR to additional users as needed. DBMS_INMEMORY_ADVISOR installation and setup complete. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
Oracle Database InMemory Advisor生成报告
[oracle@localhost xff]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 18 16:30:57 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @imadvisor_analyze_and_report
Specify the IM task name
The IM Advisor generates a report as imadvisor_<taskname>.html file
in the current working directory
The sql file is generated as imadvisor_sql_<taskname>.sql
Enter value for im_task_name: xifenfei
IM Task name Specified: xifenfei
Enter begin time for report:
-- Valid input formats:
-- To specify absolute begin time:
-- [MM/DD[/YY]] HH24:MI[:SS]
-- Examples: 02/23/03 14:30:15
-- 02/23 14:30:15
-- 14:30:15
-- 14:30
-- To specify relative begin time: (start with '-' sign)
-- -[HH24:]MI
-- Examples: -1:15 (SYSDATE - 1 Hr 15 Mins)
-- -25 (SYSDATE - 25 Mins)
Enter value for begin_time: -3
Report begin time specified: -3
old 102: lbtime_in := nvl('&&begin_time', '-60');
new 102: lbtime_in := nvl('-3', '-60');
old 104: :btime := to_char( begin_time, '&&imadvisor_time_format' );
new 104: :btime := to_char( begin_time, 'YYYY-MON-DD HH24:MI:SS.FF' );
Enter duration in minutes starting from begin time:
Defaults to SYSDATE - begin_time
Enter value for duration:
Report duration specified:
old 8: begin_time := to_timestamp(:btime, '&&imadvisor_time_format');
new 8: begin_time := to_timestamp(:btime, 'YYYY-MON-DD HH24:MI:SS.FF');
old 18: duration := nvl('&&duration', since_begin_time);
new 18: duration := nvl('', since_begin_time);
old 29: :etime := to_char( end_time, '&&imadvisor_time_format' );
new 29: :etime := to_char( end_time, 'YYYY-MON-DD HH24:MI:SS.FF' );
Using 2015-MAR-18 16:28:22.000000000 as report begin time
Using 2015-MAR-18 16:31:22.000000000 as report end time
IM Advisor: Adding Statistics..
IMADVISOR: Finished Adding Statistics
IMADVISOR: Finished Executing the task
IM Advisor: Generating Recommendations..
imadvisor_xifenfei.html
imadvisor_sql_xifenfei.html
imadvisor_object_xifenfei.html
imadvisor_xifenfei.sql
'Fetching recommendation files for task xifenfei'
IM Advisor generated report in imadvisor_xifenfei.html
IM Advisor genreated DDL script in imadvisor_xifenfei.sql
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost xff]$ ls -ltr *xifenfei*
-rw-r--r-- 1 oracle oinstall 887 Mar 18 16:33 imadvisor_xifenfei.sql
-rw-r--r-- 1 oracle oinstall 30175 Mar 18 16:33 imadvisor_xifenfei.html
-rw-r--r-- 1 oracle oinstall 13576 Mar 18 16:33 imadvisor_sql_xifenfei.html
-rw-r--r-- 1 oracle oinstall 8931 Mar 18 16:33 imadvisor_object_xifenfei.html
-rw-r--r-- 1 oracle oinstall 3405 Mar 18 16:33 imadvisor_auxiliary_xifenfei.html
这里输入的Task name为:xifenfei,Oracle Database InMemory Advisor结果
imadvisor_xifenfei.html是InMemory Advisor的一个整体描述
imadvisor_xifenfei.sql是InMemory Advisor生成的表级别的INMEMORY语句,可以直接通过@方式执行,或者修改后执行
imadvisor_sql_xifenfei.html主要是InMemory Advisor中关于sql的分析报告
imadvisor_object_xifenfei.html是InMemory Advisor中建议InMemory处理的对象分析报告
imadvisor_auxiliary_xifenfei.html 是一个辅助的总结
卸载Oracle Database InMemory Advisor
[oracle@localhost ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 18 21:55:49 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> drop user imadvisor cascade; User dropped.
补充内容
1.在某些情况下,可能无法直接创建用户imadvisor,或者创建目录imadvisor_directory,可以通过类似命令创建,并修改instimadv.sql脚本屏蔽掉交互式安装
create user IMADVISOR identified by Oracle_123 DEFAULT TABLESPACE system; CREATE OR REPLACE DIRECTORY imadvisor_directory AS '/tmp/xff/txt'; GRANT READ, WRITE ON DIRECTORY imadvisor_directory TO IMADVISOR;
2.在执行@imadvisor_analyze_and_report生成报告,可能会遇到ORA-24817: Unable to allocate the given chunk for current lob operation,解决方案为:
1. Copy the original script to a new location to serve as a backup. 2. Edit the script imadvisor_fetch_recommendations.sql and change the line in the script: SET LONGCHUNKSIZE 2000000000 to SET LONGCHUNKSIZE 32767 3. Save and run the script.
参考文档
Oracle Database InMemory Advisor (Doc ID 1965343.1)
Using Inmemory Advisor Errors When Running Imadvisor_analyze_and_report (Doc ID 1987462.1)

加我微信(17813235971)
加我QQ(107644445)

