<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Oracle on Café Com Cloud</title><link>https://blog.cafecomcloud.com.br/tags/oracle/</link><description>Recent content in Oracle on Café Com Cloud</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 14 Aug 2018 23:20:15 -0300</lastBuildDate><atom:link href="https://blog.cafecomcloud.com.br/tags/oracle/index.xml" rel="self" type="application/rss+xml"/><item><title>Dear boss, it's time to patch..</title><link>https://blog.cafecomcloud.com.br/2018/08/14/dear-boss-its-time-to-patch../</link><pubDate>Tue, 14 Aug 2018 23:20:15 -0300</pubDate><guid>https://blog.cafecomcloud.com.br/2018/08/14/dear-boss-its-time-to-patch../</guid><description>&lt;p&gt;I know. Its hard (even today) to get an planned downtime for your database. But when you tell your boss what this vulnerability can do, trust me, you&amp;rsquo;ll get your window.&lt;/p&gt;
&lt;p&gt;Some days ago, I receive the CVE-2018-3110 details. First of all, you know what a CVE is?&lt;/p&gt;
&lt;p&gt;CVE comes from Common Vulnerabilities and Exposures, so its not a &amp;ldquo;Oracle only&amp;rdquo; space. Every product (from middleware, processors, linux, switches to routers) have a dictionary of vulnerabilities.&lt;/p&gt;
&lt;p&gt;So, what this CVE states?&lt;/p&gt;
&lt;p&gt;&lt;img alt="CVE-2018-3110" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://blog.cafecomcloud.com.br/images/cve-2018-3110.jpg"&gt;&lt;/p&gt;
&lt;p&gt;So, what?? 9.9 of 10? Affected plataforms are windows, linux, unix (so all plataforms, right?)&lt;/p&gt;
&lt;p&gt;I cant make a how to about exploiting this..but check the image below and make some tests ( on your lab, please)&lt;/p&gt;
&lt;p&gt;&lt;img alt="CVE-2018-3110-exploit" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://blog.cafecomcloud.com.br/images/cve-2018-3110-exploit.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Its time to patch my friends.&lt;/p&gt;
&lt;p&gt;See you around.&lt;/p&gt;</description></item><item><title>Backup in the Cloud era - what is changing?</title><link>https://blog.cafecomcloud.com.br/2017/12/20/backup-in-the-cloud-era-what-is-changing/</link><pubDate>Wed, 20 Dec 2017 13:07:05 -0200</pubDate><guid>https://blog.cafecomcloud.com.br/2017/12/20/backup-in-the-cloud-era-what-is-changing/</guid><description>&lt;p&gt;Hello there!&lt;/p&gt;
&lt;p&gt;Hope this post find you well. These days one of my customers ask me to advise him on backup/restore procedures and solutions on a new environment running on AWS.&lt;/p&gt;
&lt;p&gt;Production databases will run on EC2 instances, on Oracle with BYOL (bring your own license). Customer is thinking about EBS (Elastic Block Storage) solutions or S3 (Simple Storage Service).&lt;/p&gt;
&lt;p&gt;Snapshots in Oracle world usually are used in conjunction with begin/end backup operations. If you take 1 snapshot per day only, and you are not willing to lost 24hs of commited data you need to have a second backup strategy. There is a product offered by N2WS which is quite amazing in orchestrating, scheduling and controlling the snapshots - you can configure to take a picture every 5 min - which is usually lower than a business RPO. But how about a logical corruption, a wrong delete done on last weekend. How to restore this? You must retain snaps for a week, maybe a month, maybe a year, restore this snap in another EC2 instance and manually restore data. Seems costly, right?&lt;/p&gt;
&lt;p&gt;The ideal world way - from the documentation - is to deploy OSBCS Oracle Secure Backup Cloud Service. This (paid) option give you the ability to use S3 as tape, so minimal adjustments need to be done in order to migrate your backup strategy to the cloud. You need to setup and install OSBCS on each EC2 instance, adjust your channels to use OSBCS and you are ready to go! RMAN retention, catalog, everything go smoothly if you choose to pay for this option. How OSBCS is charged? Per Channel.&lt;/p&gt;
&lt;p&gt;So, if you have 100 databases, you can buy for example 10 channels, and make 1 backup at time with 10 channels, or 10 backups at time with 1 channel, or 2 backups at time with 5 channels, or 5 backups at time with 2 channels, or - you got the idea.&lt;/p&gt;
&lt;p&gt;Comments are welcome =]&lt;/p&gt;
&lt;p&gt;See you around,&lt;/p&gt;
&lt;p&gt;Hang.&lt;/p&gt;</description></item><item><title>12cR1 + Suse 12 SP2 = take a look on this post</title><link>https://blog.cafecomcloud.com.br/2017/06/10/12cr1--suse-12-sp2-take-a-look-on-this-post/</link><pubDate>Sat, 10 Jun 2017 22:19:15 -0300</pubDate><guid>https://blog.cafecomcloud.com.br/2017/06/10/12cr1--suse-12-sp2-take-a-look-on-this-post/</guid><description>&lt;p&gt;Today I face a weird issue during a HAS 12.1.0.2 in Suse 12 SP2 for a customer.&lt;/p&gt;
&lt;p&gt;Everything went smooth during the runInstaller, but roothas.pl failed with the follow error:&lt;/p&gt;
&lt;h5 id="server_blau01grid12102--u01grid12102perlbinperl--iu01grid12102perllib--iu01grid12102crsinstall-u01grid12102crsinstallroothaspl-using-configuration-parameter-file-u01grid12102crsinstallcrsconfig_params-local-add-mode-creating-ocr-keys-for-user-ora12c-privgrp-dba-operation-successful-local-only-mode-successfully-accumulated-necessary-ocr-keys-creating-ocr-keys-for-user-root-privgrp-root-operation-successful-crs-4664-node-server_bla-successfully-pinned-20170610-004642-clsrsc-330-adding-clusterware-entries-to-file-oracle-ohasdservice"&gt;SERVER_BLA:/u01/grid/12.1.0.2 # /u01/grid/12.1.0.2/perl/bin/perl -I/u01/grid/12.1.0.2/perl/lib -I/u01/grid/12.1.0.2/crs/install /u01/grid/12.1.0.2/crs/install/roothas.pl Using configuration parameter file: /u01/grid/12.1.0.2/crs/install/crsconfig_params LOCAL ADD MODE Creating OCR keys for user &amp;lsquo;ora12c&amp;rsquo;, privgrp &amp;lsquo;dba&amp;rsquo;.. Operation successful. LOCAL ONLY MODE Successfully accumulated necessary OCR keys. Creating OCR keys for user &amp;lsquo;root&amp;rsquo;, privgrp &amp;lsquo;root&amp;rsquo;.. Operation successful. CRS-4664: Node SERVER_BLA successfully pinned. 2017/06/10 00:46:42 CLSRSC-330: Adding Clusterware entries to file &amp;lsquo;oracle-ohasd.service&amp;rsquo;
&lt;/h5&gt;&lt;h5 id="prcr-1006--failed-to-add-resource-oraons-for-ons-prcr-1115--failed-to-find-entities-of-type-resource-type-that-match-filters-type_name-ends-type-and-contain-attributes-crs-0184--cannot-communicate-with-the-crs-daemon-20170610-004704-clsrsc-180-an-error-occurred-while-executing-the-command-srvctl-add-ons-error-code-0"&gt;PRCR-1006 : Failed to add resource ora.ons for ons PRCR-1115 : Failed to find entities of type resource type that match filters (TYPE_NAME ends .type) and contain attributes CRS-0184 : Cannot communicate with the CRS daemon. 2017/06/10 00:47:04 CLSRSC-180: An error occurred while executing the command &amp;lsquo;srvctl add ons&amp;rsquo; (error code 0)
&lt;/h5&gt;&lt;h5 id="20170610-004755-clsrsc-115-start-of-resource-oraevmd-failed"&gt;2017/06/10 00:47:55 CLSRSC-115: Start of resource &amp;lsquo;ora.evmd&amp;rsquo; failed
&lt;/h5&gt;&lt;h5 id="20170610-004755-clsrsc-202-failed-to-start-evm-daemon"&gt;2017/06/10 00:47:55 CLSRSC-202: Failed to start EVM daemon
&lt;/h5&gt;&lt;p&gt;This PRCR-1006 drive me nuts. Turns out, after long hours digging the web + metalink + caffeine, that you need to:&lt;/p&gt;
&lt;p&gt;vi /etc/ld.so.conf and add /lib64/noelision on top of it.&lt;/p&gt;
&lt;p&gt;The file should be like this after vi:&lt;/p&gt;
&lt;h5 id="server_blau01grid12102crsinstall-cat-etcldsoconf-lib64noelision-usrlocallib64-usrlocallib-include-etcldsoconfdconf"&gt;SERVER_BLA:/u01/grid/12.1.0.2/crs/install# cat /etc/ld.so.conf /lib64/noelision /usr/local/lib64 /usr/local/lib include /etc/ld.so.conf.d/*.conf
&lt;/h5&gt;&lt;p&gt;And then, add the symlink on GI_HOME:&lt;/p&gt;
&lt;h5 id="server_blau01grid12102lib-lns--s-lib64noelisionlibpthread-222so-libpthreadso0"&gt;SERVER_BLA:/u01/grid/12.1.0.2/lib# lns -s /lib64/noelision/libpthread-2.22.so libpthread.so.0
&lt;/h5&gt;&lt;p&gt;And only after this run root.sh/roothas.pl. If you are reading this post problably you already executed roothas.pl ( =[ sadly). So you need to deconfigure first, execute the steps above, and then execute roothas.pl again.&lt;/p&gt;
&lt;p&gt;After this, happiness is back =]&lt;/p&gt;
&lt;p&gt;***Update***&lt;/p&gt;
&lt;p&gt;When patching GI home, remove the symlink created, apply the patch, and make the symlink again.&lt;/p&gt;
&lt;p&gt;Feedbacks are always welcome! See you around&lt;/p&gt;
&lt;p&gt;Hang,&lt;/p&gt;</description></item><item><title>db_multiblock_read_count - to be or not to be?</title><link>https://blog.cafecomcloud.com.br/2017/05/25/db_multiblock_read_count-to-be-or-not-to-be/</link><pubDate>Thu, 25 May 2017 18:37:21 -0300</pubDate><guid>https://blog.cafecomcloud.com.br/2017/05/25/db_multiblock_read_count-to-be-or-not-to-be/</guid><description>&lt;p&gt;Sometimes you wanna to use things with default options&amp;hellip;and sometimes the default is not good enough.&lt;/p&gt;
&lt;p&gt;We all know that db_file_multiblock_read_count is bumped by default on startup, usually you get 128 blocks per read. Why?&lt;/p&gt;
&lt;p&gt;From Oracle documentation, this value is high, but CBO will not favor full tables scans.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Even though the default value may be a large value, the optimizer will not favor large plans if you do not set this parameter. It would do so only if you explicitly set this parameter to a large value.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Okay. But Why? From a 10053 trace within a session, you can see that the CBO will compute db_file_multiblock_read_count always as &amp;ldquo;8&amp;rdquo;&amp;hellip;even if you see 128 in spfile.&lt;/p&gt;
&lt;p&gt;CBO you always use 8, if you dont set db_file_multiblock_read_count explicitly. How to know if you set db_file_multiblock_read_count as 128? Use this:&lt;/p&gt;
&lt;h5 id="select-nvlvaluenull-as-value-from-vspparameter-where-name--db_file_multiblock_read_count"&gt;SELECT nvl(value,&amp;rsquo;*NULL*&amp;rsquo;) AS value FROM v$spparameter WHERE name = &amp;lsquo;db_file_multiblock_read_count&amp;rsquo;;
&lt;/h5&gt;&lt;p&gt;If this return *NULL*, you have not set db_file_multiblock_read_count, Oracle is showing you 128, but CBO uses 8. Sad no?&lt;/p&gt;
&lt;p&gt;You all read the documentation and know the effects of bumping db_file_multiblock_read_count high. Full table scans will happen more often and as a result, in a OLTP system, usually you will get a call from your boss (hehe)&lt;/p&gt;
&lt;p&gt;But there is a way to set correctly the db_file_multiblock_read_count&amp;hellip;by testing&amp;hellip;for example, take a look on the block below. Its silly, I know, but it can give you a magic value for this parameter.&lt;/p&gt;
&lt;h5 id="set-serveroutput-on-declare-l_count-pls_integer-l_time-pls_integer-l_starting_time-pls_integer-l_ending_time-pls_integer-begin-dbms_outputput_linedbfmbrc-seconds-for-l_dbfmbrc-in-164-loop-execute-immediate-alter-session-set-db_file_multiblock_read_countl_dbfmbrc-execute-immediate-alter-system-flush-buffer_cache-execute-immediate-alter-session-disable-parallel-dml-l_starting_time--dbms_utilityget_time-select--fullt--count-into-l_count-from-big_table-t-l_ending_time--dbms_utilityget_time-l_time--roundl_ending_time-l_starting_time100-dbms_outputput_linel_dbfmbrc-l_time-end-loop-end-"&gt;set serveroutput on DECLARE l_count PLS_INTEGER; l_time PLS_INTEGER; l_starting_time PLS_INTEGER; l_ending_time PLS_INTEGER; BEGIN dbms_output.put_line(&amp;lsquo;dbfmbrc seconds&amp;rsquo;); FOR l_dbfmbrc IN 1..64 LOOP EXECUTE IMMEDIATE &amp;lsquo;ALTER SESSION SET db_file_multiblock_read_count=&amp;rsquo;||l_dbfmbrc; EXECUTE IMMEDIATE &amp;lsquo;ALTER system flush buffer_cache&amp;rsquo;; EXECUTE IMMEDIATE &amp;lsquo;ALTER session disable parallel dml&amp;rsquo;; l_starting_time := dbms_utility.get_time(); SELECT /*+ full(t) */ count(*) INTO l_count FROM big_table t; l_ending_time := dbms_utility.get_time(); l_time := round((l_ending_time-l_starting_time)/100); dbms_output.put_line(l_dbfmbrc||&amp;rsquo; &amp;lsquo;||l_time); END LOOP; END; /
&lt;/h5&gt;&lt;p&gt;(Thanks to Chris Antognini, you&amp;rsquo;re great)&lt;/p&gt;
&lt;p&gt;With this block (be carefull, it will take 60-90 minutes depending of the big table&amp;rsquo;s size, as a advice, use a 5GB table), you will have values, plot a graph and see the behavior. Dont choose a high value for OLTP.&lt;/p&gt;
&lt;p&gt;See you around!&lt;/p&gt;</description></item><item><title>To be or not to be (lazy)</title><link>https://blog.cafecomcloud.com.br/2017/03/06/to-be-or-not-to-be-lazy/</link><pubDate>Mon, 06 Mar 2017 20:49:44 -0300</pubDate><guid>https://blog.cafecomcloud.com.br/2017/03/06/to-be-or-not-to-be-lazy/</guid><description>&lt;p&gt;Sometimes you are an Oracle DBA just tired of perform setup ( I like to install everything from scratch&amp;hellip;since oracle 7.3 it was always an adventure for me :) )&lt;/p&gt;
&lt;p&gt;If you only want to download and have fun on some cool new features, a pre-installed ova is the gold medal for you..&lt;/p&gt;
&lt;p&gt;Check out last this Jeff Smith (SQL Developer and lots of fun on his blog)  &lt;a class="link" href="http://www.thatjeffsmith.com/archive/2017/03/oracle-database-12c-release-2-is-now-available-and-so-is-our-new-virtualbox-appliance/" target="_blank" rel="noopener"
 &gt;here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Its a OVA with 12.2, APEX, SQL Developer and other cool stuff :)&lt;/p&gt;
&lt;p&gt;See you around!&lt;/p&gt;</description></item></channel></rss>