标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 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-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)
- 操作系统 (102)
- 数据库 (1,683)
- DB2 (22)
- MySQL (73)
- Oracle (1,545)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (7)
- Oracle ASM (68)
- Oracle Bug (8)
- Oracle RAC (53)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (565)
- Oracle安装升级 (92)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (79)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- ORA-15411: Failure groups in disk group DATA have different number of disks.
- 断电引起的ORA-08102: 未找到索引关键字, 对象号 39故障处理
- ORA-00227: corrupt block detected in control file
- 手工删除19c rac
- 解决oracle数据文件路径有回车故障
- .wstop扩展名勒索数据库恢复
- Oracle Recovery Tools工具一键解决ORA-00376 ORA-01110故障(文件offline)
- OGG-02771 Input trail file format RELEASE 19.1 is different from previous trail file form at RELEASE 11.2.
- OGG-02246 Source redo compatibility level 19.0.0 requires trail FORMAT 12.2 or higher
- GoldenGate 19安装和打patch
- dd破坏asm磁盘头恢复
- 删除asmlib磁盘导致磁盘组故障恢复
- Kylin Linux 安装19c
- ORA-600 krse_arc_complete.4
- Oracle 19c 202410补丁(RUs+OJVM)
- ntfs MFT损坏(ntfs文件系统故障)导致oracle异常恢复
- .mkp扩展名oracle数据文件加密恢复
- 清空redo,导致ORA-27048: skgfifi: file header information is invalid
- A_H_README_TO_RECOVER勒索恢复
- 通过alert日志分析客户自行对一个数据库恢复的来龙去脉和点评
标签归档:InMemory Advisor
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)