<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6585541677364366622</id><updated>2026-09-21T10:44:21.406-07:00</updated><category term="Oracle"/><category term="performance"/><category term="database"/><category term="12c"/><category term="java"/><category term="EMC"/><category term="Linux"/><category term="OCI"/><category term="VMAX"/><category term="VMware"/><category term="storage"/><category term="streams"/><category term="11g"/><category term="12.1"/><category term="19c"/><category term="AWS"/><category term="Capital One"/><category term="Dell"/><category term="FusionIO ioDrive flash MLC SLC Oracle Sql Server Hana SAP performance IOPS MBPS configure swingbench orion"/><category term="RMAN"/><category term="Redhat"/><category term="backup"/><category term="compression"/><category term="datapump"/><category term="oci_install.jar"/><category term="rac"/><category term="security"/><category term="sga"/><category term="11.2"/><category term="12.2"/><category term="18c"/><category term="CentOS"/><category term="Data Warehouse"/><category term="RHEL"/><category term="adop"/><category term="cpu"/><category term="db cache advice"/><category term="exadata"/><category term="exp"/><category term="export"/><category term="goldengate"/><category term="imp"/><category term="import"/><category term="install"/><category term="memory"/><category term="memory settings"/><category term="oem"/><category term="parallel"/><category term="plsql"/><category term="preinstall"/><category term="speed"/><category term="streams_pool"/><category term="vertica"/><category term="12.1.0.2"/><category term="18.3"/><category term="18.7"/><category term="AES256"/><category term="BAT"/><category term="BI"/><category term="BTC"/><category term="Best Practices"/><category term="Bitcoin"/><category term="Blockchain"/><category term="C19"/><category term="CBC"/><category term="CII"/><category term="Carry Millsap"/><category term="Chrome browser"/><category term="Cloud"/><category term="Cloudberry"/><category term="Control Group"/><category term="Coronovirus"/><category term="DATA ARCH REDO RECO SAP DB_CACHE performance oracle emc vnx vmax real application testing compress for OLTP advanced compression merged incremental backup VCE compressed indexes sql profiles redhat"/><category term="DBMS_CRYPTO"/><category term="DES"/><category term="DW"/><category term="Drake"/><category term="ERROR"/><category term="Ellison"/><category term="Enterprise Linux"/><category term="Exadata &quot;Expert Oracle Exadata&quot; rman backup &quot;storage cell&quot; RTO ZFS 7420 DSS OLTP"/><category term="Exadata Compression OLTP HCC Swingbech Index"/><category term="Exadata Compression OLTP HCC Swingbench"/><category term="Exadata Poder Book Oracle"/><category term="Exadata database links encrypted values"/><category term="Exadata domain index rebuild dbms_pclxutil.build_part_index dbms_pclxutil ctxsys text_index ctxsys.context"/><category term="FusionIO ioDrive flash MLC SLC Oracle Sql Server Hana SAP mysql performance IOPS MBPS configure swingbench orion"/><category term="Goldengate golden gate oracle exadata 11.2.0.3 patch bundle pb2 pb3 11.2.1 HCC Advanced Compression EHCC Hybrid Columnar performance bugs"/><category term="IORM"/><category term="Jay-Z"/><category term="Jonathan Lewis"/><category term="Kanye West"/><category term="Kerry Osborne"/><category term="Kimball"/><category term="Large page usage restricted"/><category term="Lil Wayne"/><category term="Margy Ross"/><category term="Max Ehrich"/><category term="Mozilla"/><category term="OEL"/><category term="ORA-01110"/><category term="ORA-01157"/><category term="ORA-01187"/><category term="ORACLE IOPS AWR storage requirements"/><category term="ORACLE RMAN ASM ASRU THIN PROVISIONING HITACHI USP-V STORAGE VIRTUALIZATION BUG PROBLEM Netapp EMC ASRU"/><category term="ORM"/><category term="OS"/><category term="Oracheck"/><category term="Oracle 11.2.0.4 12.1 19.3 18.3 RHEL7 RHEL6 Support OS upgrade Grid ASM"/><category term="Oracle 12.1.0.2 PSU  29141015 25107334 ORA-65108 cursor restore recover open mount patch Jan Apr"/><category term="Oracle 19.3 Redhat 7 Suse OEL linux upgrade database"/><category term="Oracle Core: Essential Internals for DBAs and Developers"/><category term="Oracle Golden Gate vulnerabilities tips tricks bugs Director"/><category term="Oracle Support 11.2 12.2 19.2 19.3 EBS E-Business Suite"/><category term="PII"/><category term="PKCS5"/><category term="PKI"/><category term="PaaS"/><category term="Partitoning exadata ILM performance HCC compression OLTP compress for query high"/><category term="Partitoning exadata ILM performance HCC compression OLTP compress for query high cost storage expensive inexpensive"/><category term="PowerCLI Power Shell vmware vsphere 5 esx oracle rac advanced compression asmlib cisco ucs fusionio vmdk scsi thick eager zeroed multi-writer oem 12c sap real application testing multi-writer script"/><category term="RADIUS"/><category term="RMAN-03009"/><category term="Richard Niemic"/><category term="Roy Jones Jr"/><category term="SCSI"/><category term="SDE"/><category term="SLA"/><category term="SR"/><category term="SSL"/><category term="Seattle Kraken"/><category term="TDE"/><category term="TLS"/><category term="Tanel Poder"/><category term="UDev Rules ASMLib Oracle Red Hat 5 Red Hat 6 UUID bash Exadata OVM ODM RAC Failgroup SAP"/><category term="UTF8"/><category term="Validated RPM"/><category term="Washington Football Team"/><category term="Wharton"/><category term="X4170M2 X4270M2 Sun 7420 ZFS RMAN Oracle Secure Backup Exadata Performance RTO"/><category term="_linux_prepage_large_pages"/><category term="_px_cdb_view_enabled"/><category term="ascii"/><category term="asmlib"/><category term="backups"/><category term="blogspot"/><category term="book"/><category term="brave browser"/><category term="bucket"/><category term="bulk collect"/><category term="character set"/><category term="cleanse"/><category term="compartment"/><category term="compressed indexes index myths dNFS VMware NetApp swingbench Lady Gaga David Jones kim kardashian bernie madoff"/><category term="confidential"/><category term="crash"/><category term="data cleanup"/><category term="datafile"/><category term="dbakevlar hotsos tanel poder kerry osborne ric van dyke carlos sierra richard foote"/><category term="delete"/><category term="dimension"/><category term="direct-io direct path read exadata shared memory pga oracle 11.2 segment checkpoint wait"/><category term="dynamic query"/><category term="eNAS"/><category term="effective teams"/><category term="encryption"/><category term="exorcist"/><category term="expdp"/><category term="fact"/><category term="fetch"/><category term="forall"/><category term="goldengate oracle streams informatica performance Exadata"/><category term="growth"/><category term="hierarchial query dba role oracle sql server connect by prior start with"/><category term="hp"/><category term="impdp"/><category term="index compression compressed fast parallel parallelization procedure dynamic analyze index validate structure"/><category term="index compression compressed fast parallel parallelization procedure dynamic analyze validate structure"/><category term="instead of trigger"/><category term="internals"/><category term="jdbc"/><category term="kerberos"/><category term="latency"/><category term="leadership"/><category term="lemonade"/><category term="lifecycle"/><category term="limit"/><category term="linus torvalds"/><category term="lossy"/><category term="migration"/><category term="min_required_capture_change#  v$database rman Golden Gate Oracle GGSCI RMAN-08137 RMAN-08120 dba_capture 1079953.1"/><category term="monitor"/><category term="move datafile"/><category term="multitennant"/><category term="network protocol error ORA-28546 oracle 12c 12.1.01 12.1.0.2 JDBC 1960485.1 database performance OEM monitoring 11.1.0.7 11.2.0.1 dedicated_through_broker_listener trace files traces"/><category term="node"/><category term="oem 13c kellyn dbakevlar oracle"/><category term="ora-"/><category term="oracle 12c netbackup environment variables parms ENV= listener threaded_execution threaded execution thread process backup"/><category term="oracle CBO 10053 cost based optimizer jonathan lewis wolfgang breitling Exadata"/><category term="oracle partitioning partitioned table key column value range interval"/><category term="oracle social network sap salesforce"/><category term="oracle udev redhat Red Hat EMC vBlock IBM AIX asmlib"/><category term="ovf"/><category term="ovm"/><category term="planning"/><category term="processor group"/><category term="pythian jillians Openworld"/><category term="rap"/><category term="remove"/><category term="short stroke shortstroke Exadata HP HC X2-2 high performance capacity IOPS Throughput"/><category term="smallness logic small table direct-io direct path read exadata shared memory pga oracle 11.2 segment checkpoint wait"/><category term="stability"/><category term="system.slice/oracle-ohasd.service"/><category term="table"/><category term="tableau"/><category term="tablespace size"/><category term="team"/><category term="the Beyonce formation Tour"/><category term="throughput"/><category term="trump"/><category term="udev"/><category term="unwrap"/><category term="upgrade"/><category term="user.slice"/><category term="utilization"/><category term="view"/><category term="virtualization"/><category term="virtualized storage oracle asm usp-v vsp hitachi p595 IBM"/><category term="virtualized storage oracle asm usp-v vsp hitachi p595 IBM rman active duplicate"/><category term="virtualized storage oracle asm usp-v vsp hitachi p595 IBM rman active duplicate ORA-15099"/><category term="vmdk"/><category term="vmware vsphere 5 esx redhat red hat 6 oracle rac advanced compression asmlib cisco ucs fusionio vmdk scsi thick eager zeroed multi-writer oem 12c sap real application testing"/><category term="wrap"/><title type='text'>Oracle Tips and Tricks</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>82</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-6685683379414640879</id><published>2021-06-18T15:49:00.002-07:00</published><updated>2021-06-18T15:49:48.297-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="19c"/><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Enterprise Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="install"/><category scheme="http://www.blogger.com/atom/ns#" term="OEL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="OS"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="preinstall"/><category scheme="http://www.blogger.com/atom/ns#" term="rac"/><category scheme="http://www.blogger.com/atom/ns#" term="Redhat"/><category scheme="http://www.blogger.com/atom/ns#" term="RHEL"/><category scheme="http://www.blogger.com/atom/ns#" term="stability"/><title type='text'>Oracle 19c Preinstall-What does it actually do?</title><content type='html'>&lt;p&gt;I set up a lot of systems, lately about a new RAC cluster a week.&amp;nbsp; We use a lot of automation and scripting, but if some of that can be done for you, that just makes it even easier. I love what the pre-install Oracle DB rpm provides.&amp;nbsp; How do you use it?&lt;/p&gt;&lt;p&gt;yum install oracle-database-preinstall-19c.x86_64&amp;nbsp;&lt;/p&gt;&lt;p&gt;About 30 seconds later, the system is 99% ready for a RAC install.&amp;nbsp; In a previous post &lt;a href=&quot;https://otipstricks.blogspot.com/2016/01/how-to-modify-preinstall-rpm-for-non-oel.html&quot; target=&quot;_blank&quot;&gt;&amp;lt;&amp;lt;click here&amp;gt;&amp;gt;&lt;/a&gt;, I detailed how to download the version 12 RPM and modify it to work with Redhat.&amp;nbsp; That&#39;s no longer necessary, the 19c version will install into RHEL...there&#39;s no longer a requirement on OEL.&amp;nbsp; You may still want to look at that post to see how to make modifications to the RPM (for instance, how to change the parameters, the UID&#39;s and GID&#39;s to match your environment.)&lt;/p&gt;&lt;p&gt;Recently I had an issue where I was getting different results on my test system than other people were getting, and I suspected it came down to the OS parameters that were being set.&amp;nbsp; I had used a minimal RHEL 7 install and added the pre-install rpm.&amp;nbsp; I knew roughly what that did, but not the details.&amp;nbsp; I looked up the Oracle documentation and all I found was this (for 12c):&lt;/p&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;p&gt;When installed, the Oracle Preinstallation RPM does the following:&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Automatically downloads and installs any additional RPM packages needed for installing Oracle Grid Infrastructure and Oracle Database, and resolves any dependencies&lt;/li&gt;&lt;li&gt;Creates an oracle user, and creates the oraInventory (oinstall) and OSDBA (dba) groups for that user&lt;/li&gt;&lt;li&gt;As needed, sets sysctl.conf settings, system startup parameters, and driver parameters to values based on recommendations from the Oracle RDBMS Pre-Install program&lt;/li&gt;&lt;li&gt;Sets hard and soft resource limits&lt;/li&gt;&lt;li&gt;Sets other recommended parameters, depending on your kernel version&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Ok...that&#39;s not very detailed.&amp;nbsp; If you go to a sysadmin and say &quot;I set other recommended parameters...&quot; he&#39;ll have lots of follow up questions for you....&lt;/p&gt;&lt;p&gt;So...I once again tore open the RPM, found where the logs were sent and went through them.&amp;nbsp; This is what is ACTUALLY does:&lt;/p&gt;&lt;p&gt;When you install the RPM, it verifies several other rpms exist that are needed for Oracle (or installs them if they&#39;re missing).&amp;nbsp; If these rpms require rpms you don&#39;t have, yum will install those too.&amp;nbsp; Here&#39;s the list:&lt;/p&gt;procps module-init-tools ethtool initscripts bind-utils nfs-utils util-linux-ng pam&lt;br /&gt;xorg-x11-utils xorg-x11-xauth smartmontools&lt;br /&gt;binutils glibc glibc-devel&lt;br /&gt;ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel&lt;br /&gt;make sysstat openssh-clients&lt;br /&gt;psmisc net-tools unzip bc tar&lt;br /&gt;&lt;p&gt;...in addition,&amp;nbsp;&lt;/p&gt;&lt;p&gt;if you&#39;re on RHEL7, it&#39;ll also require&amp;nbsp;&lt;span face=&quot;Calibri, sans-serif&quot; style=&quot;font-size: 11pt;&quot;&gt;compat-libcap1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Calibri, sans-serif&quot; style=&quot;font-size: 11pt;&quot;&gt;if you&#39;re on RHEL8, it&#39;ll require both&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Calibri, sans-serif&quot; style=&quot;font-size: 11pt;&quot;&gt;libnsl
compat-openssl10&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Calibri, sans-serif&quot; style=&quot;font-size: 11pt;&quot;&gt;The next thing it does is add the required OS groups.&amp;nbsp; They are:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Calibri, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;oinstall,dba,oper,backupdba,dgdba,kmdba,racdba&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Calibri, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;...and then creates the oracle OS user and puts it in those groups.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Calibri, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;Next, it adjusts settings in sysctl.conf:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;fs.file-max = 6815744&lt;br /&gt;kernel.sem = 250 32000 100 128&lt;br /&gt;kernel.shmmni = 4096&lt;br /&gt;kernel.shmall = 1073741824&lt;br /&gt;kernel.shmmax = 4398046511104&lt;br /&gt;kernel.panic_on_oops = 1&lt;br /&gt;net.core.rmem_default = 262144&lt;br /&gt;net.core.rmem_max = 4194304&lt;br /&gt;net.core.wmem_default = 262144&lt;br /&gt;net.core.wmem_max = 1048576&lt;br /&gt;net.ipv4.conf.all.rp_filter = 2&lt;br /&gt;net.ipv4.conf.default.rp_filter = 2&lt;br /&gt;fs.aio-max-nr = 1048576&lt;br /&gt;net.ipv4.ip_local_port_range = 9000 65500&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Calibri, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 14.6667px;&quot;&gt;Be aware, it sets&amp;nbsp;&lt;/span&gt;&lt;/span&gt;fs.aio-max-nr to a value *much* lower than you likely need.&amp;nbsp; See note&amp;nbsp;&lt;span face=&quot;Tahoma, Verdana, Helvetica, sans-serif&quot; style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt;2229798.1 for details.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;Tahoma, Verdana, Helvetica, sans-serif&quot; style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt;Next, on my system it set up user limits with these values.&amp;nbsp; I *think* the memlock setting was based on the amount of ram I had in my VM at the time...which was, not much:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Adding oracle soft nofile  1024&lt;br /&gt;Adding oracle hard nofile  65536&lt;br /&gt;Adding oracle soft nproc  16384&lt;br /&gt;Adding oracle hard nproc  16384&lt;br /&gt;Adding oracle soft stack  10240&lt;br /&gt;Adding oracle hard stack  32768&lt;br /&gt;Adding oracle hard memlock  134217728&lt;br /&gt;Adding oracle soft memlock  134217728&lt;br /&gt;Adding oracle soft data  unlimited&lt;br /&gt;Adding oracle hard data  unlimited&lt;/p&gt;&lt;p&gt;Next, it adjusts the boot parameters:&lt;/p&gt;&lt;p&gt;Originally&amp;nbsp; &amp;nbsp;: crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet&lt;/p&gt;&lt;p&gt;Changed to : crashkernel=auto rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never (which also disabled thp’s memory compaction)&lt;/p&gt;&lt;p&gt;Lastly, it edits /etc/sysconfig/network:&lt;/p&gt;&lt;p&gt;Adding NOZEROCONF=yes&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div&gt;You may need to adjust those settings for your environment if its large.&amp;nbsp; Sizing issues aside, after you install the rpm, within a few seconds you&#39;ll have a very stable system, ready for a RAC install.&amp;nbsp; There are still other recommended things you should do...for example, verifying the network is using jumbo packets for the interconnect and reserving hugepages for your SGA, but the RPM does a lot of the OS work for you.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Hopefully this will help you better answer the question, &quot;What does the Oracle Pre-install RPM do?&quot;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/6685683379414640879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2021/06/oracle-19c-preinstall-what-does-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6685683379414640879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6685683379414640879'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2021/06/oracle-19c-preinstall-what-does-it.html' title='Oracle 19c Preinstall-What does it actually do?'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-6455723696750453460</id><published>2020-07-23T14:46:00.000-07:00</published><updated>2020-07-23T14:56:33.676-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="12.1"/><category scheme="http://www.blogger.com/atom/ns#" term="12c"/><category scheme="http://www.blogger.com/atom/ns#" term="18.3"/><category scheme="http://www.blogger.com/atom/ns#" term="18.7"/><category scheme="http://www.blogger.com/atom/ns#" term="18c"/><category scheme="http://www.blogger.com/atom/ns#" term="19c"/><category scheme="http://www.blogger.com/atom/ns#" term="_px_cdb_view_enabled"/><category scheme="http://www.blogger.com/atom/ns#" term="C19"/><category scheme="http://www.blogger.com/atom/ns#" term="Coronovirus"/><category scheme="http://www.blogger.com/atom/ns#" term="datafile"/><category scheme="http://www.blogger.com/atom/ns#" term="Max Ehrich"/><category scheme="http://www.blogger.com/atom/ns#" term="move datafile"/><category scheme="http://www.blogger.com/atom/ns#" term="oem"/><category scheme="http://www.blogger.com/atom/ns#" term="ORA-01110"/><category scheme="http://www.blogger.com/atom/ns#" term="ORA-01157"/><category scheme="http://www.blogger.com/atom/ns#" term="ORA-01187"/><category scheme="http://www.blogger.com/atom/ns#" term="RMAN-03009"/><category scheme="http://www.blogger.com/atom/ns#" term="Roy Jones Jr"/><category scheme="http://www.blogger.com/atom/ns#" term="Seattle Kraken"/><category scheme="http://www.blogger.com/atom/ns#" term="Washington Football Team"/><title type='text'>The complete post-12c online procedure to move a file from file system to ASM (ORA-01110,ORA-01157,ORA-01187,ORA-12850,RMAN-03009)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;In the Coronovirus-19 world, most of us would rather spend time learning about the Seattle Kraken,&amp;nbsp;&lt;/span&gt;Max Ehrich, Roy Jones Jr and the Washington Football Team.&amp;nbsp; They&#39;ll probably eventually do what Prince did and just call themselves, &quot;Symbol.&quot; Roy Jones and Max Ehrich will both get knocked out and the Blues will have one more team to beat before they get their next cup.&amp;nbsp; If you&#39;re reading this...you probably also care about Oracle databases...so let me tell you about a recent experience I had.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;A client I work with had an issue the other day (actually 2 issues) in a container database.&amp;nbsp; This database has very strict uptime SLA&#39;s...so downtime for a bounce of an instance isn&#39;t an option.&amp;nbsp; The online process to move a datafile from file system to ASM is a 3 step process in 12c+...until now I&#39;ve always thought it was a single &quot;move datafile&quot; command.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;1.&amp;nbsp;They hit a bug similar to the issue discussed in note&amp;nbsp;&lt;span style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt;2558640.1,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt;while doing a select from cdb_data_files, they got&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;ORA-12850: Could not allocate slaves on all specified instances: 3 needed, 0 allocated&quot;.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;2. This happened in a script that&#39;s used to add datafiles as needed.&amp;nbsp; Unfortunately, that script created a datafile with some of the error text instead of &quot;+DATA&quot;...so the file was created in the dbs directory on node 1 instead of putting it into ASM.&amp;nbsp; This is RAC, so the datafile was only able to be accessed on the first node.&amp;nbsp; RAC requires shared storage.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;First order of business, get it working again.&amp;nbsp; This is 18.7, so it was easy to move the file into ASM without downtime.&amp;nbsp; The filename was ridiculous&amp;nbsp;with special characters, and the file was on the file system on node 1, so from node 1 I did:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #252423; font-size: 14px;&quot;&gt;&lt;b&gt;alter database move datafile 1654 to &#39;+DATA&#39; ;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #252423; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #252423; font-size: 14px;&quot;&gt;...and that worked, now the datafile is in ASM&#39;s shared storage.&amp;nbsp; I kicked off a backup (which failed):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RMAN-03009: failure of backup command on ch4 channel at 07/23/2020 11:23:24&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ORA-01157: cannot identify/lock data file 1654 - see DBWR trace file&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ORA-01110: data file 1654: &#39;+DATA/DB/DATAFILE/sysaux.22113.1246514439&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;On node 1, this file is 100% working in ASM.&amp;nbsp; On other nodes, it was unavailable, giving ORA-01157&#39;s.&amp;nbsp; In gv$datafile I could see it was online and available on all nodes.&amp;nbsp; This made no sense to me.&amp;nbsp; I even double checked by going into asmcmd and doing an &quot;ls&quot; from one of the nodes that was failing...yep...it was there.&amp;nbsp; It was acting like it was offline, but reporting it was online.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;I googled/checked metalink and didn&#39;t really find a good hit.&amp;nbsp; Finally I thought...there&#39;s no harm in onlining a file that says its online...so I did an:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;b&gt;ALTER DATABASE DATAFILE 1654 ONLINE;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;The error changed from:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;ORA-01157: cannot identify/lock data file 1654&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;to:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;ORA-01187&amp;nbsp;cannot read from file 1654 because it failed verification tests&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;It was still working on node 1, but getting ORA-01187 on the other nodes.&amp;nbsp; This time I found a solution:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;b&gt;ALTER SYSTEM CHECK DATAFILES;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;...which I did on the nodes that were having issues.&amp;nbsp; After that, everything began to work.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;With the solution and the original error, I went back on MOS and this time found the ultimate solution: (DOC&amp;nbsp;&lt;span style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt;2499264.1) which states:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: x-small;&quot;&gt;ORA-01157 error is expected to occur when running a query on dba_datafiles on a particular instance (of RAC database) for a file moved (just after creation) from Filesystem to ASM, without instance wide identification.&lt;/span&gt;&lt;br style=&quot;background-color: white; font-size: small;&quot; /&gt;&lt;span style=&quot;background-color: white; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-size: small;&quot; /&gt;&lt;span style=&quot;background-color: white; font-size: x-small;&quot;&gt;This problem was previously addressed in&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://support.oracle.com/epmos/faces/BugDisplay?parent=DOCUMENT&amp;amp;sourceId=2499264.1&amp;amp;id=27268242&quot; style=&quot;background-color: white; font-size: small;&quot; target=&quot;_blank&quot;&gt;Bug 27268242&lt;/a&gt;&lt;span style=&quot;background-color: white; font-size: x-small;&quot;&gt;&amp;nbsp;which was also closed as &quot;Not a Bug&quot; because this is an expected behavior.&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;(I think they meant cluster or database-wide identification.)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&amp;lt;VENT&amp;gt; Come on, Oracle!&amp;nbsp; You shouldn&#39;t expect to get an error when running a correct query on a valid datafile.&amp;nbsp; This just causes more trouble and steps and after a datafile move, there&#39;s no reason to leave it in a partially working state.&amp;nbsp; If you&#39;re in RAC and somebody moves a file to ASM...let the other nodes know!&amp;nbsp; There&#39;s no conceivable situation where somebody would want to move a file in RAC and have it only available to a single instance...make the alter database datafile move check datafiles when its coming from the filesystem for us!&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&amp;lt;?VENT&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;Until Larry starts listening to me...this means we have multiple steps.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;That note also included a resolution:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;alter system check datafiles;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;alter system flush shared_pool;&lt;/span&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;...so at this point, the datafile is working correctly on all nodes.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;This means we have 3 statements to do when we move a file from the file system to ASM:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;b style=&quot;color: #252423;&quot;&gt;alter database move datafile 1654 to &#39;+DATA&#39;;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;alter system check datafiles;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;alter system flush shared_pool;&lt;/span&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;Now that its working, I can re-address problem #1 above...the root cause.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;segoe ui&amp;quot; , , &amp;quot;apple color emoji&amp;quot; , &amp;quot;segoe ui emoji&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: 14px;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; font-size: 14.3px; text-align: right;&quot;&gt;Note 2558640.1 discusses a similar problem when OEM is hitting the views that have the datafiles.&amp;nbsp; My issues isn&#39;t in OEM, but in every other way this matches up.&amp;nbsp; The work around:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14.3px; text-align: right;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, system-ui, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;alter system set &quot;_px_cdb_view_enabled&quot;=false comment=&#39;Work-around for internal view error and OEM-see bug 29595328&#39;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, system-ui, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;This prevents the issue from happening again, but it also slows down the query (and others) hitting the cdb_data_files from 45 seconds (there&#39;s a lot of datafiles) to 90 seconds.&amp;nbsp; I suppose that&#39;s better than getting this error...I opened an SR to ask this be fixed in future releases.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, system-ui, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;I love the new feature in 12c+ to do online datafile moves...but it would be great if the process was documented when moving a datafile from the file system...all I&#39;ve seen in the doc&#39;s is the basic move datafile command, not all 3 steps.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
With the system working and in a state where this won&#39;t happen again...I can now return to C19&#39;s bad hair and toilet paper and coin shortages.&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; font-family: &amp;quot;Segoe UI&amp;quot;, system-ui, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/6455723696750453460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2020/07/the-complete-post-12c-online-procedure.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6455723696750453460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6455723696750453460'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2020/07/the-complete-post-12c-online-procedure.html' title='The complete post-12c online procedure to move a file from file system to ASM (ORA-01110,ORA-01157,ORA-01187,ORA-12850,RMAN-03009)'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-711787186688504436</id><published>2020-05-06T10:48:00.000-07:00</published><updated>2020-05-06T12:45:27.539-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="_linux_prepage_large_pages"/><category scheme="http://www.blogger.com/atom/ns#" term="Control Group"/><category scheme="http://www.blogger.com/atom/ns#" term="cpu"/><category scheme="http://www.blogger.com/atom/ns#" term="exadata"/><category scheme="http://www.blogger.com/atom/ns#" term="IORM"/><category scheme="http://www.blogger.com/atom/ns#" term="Large page usage restricted"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="memory"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="ORM"/><category scheme="http://www.blogger.com/atom/ns#" term="processor group"/><category scheme="http://www.blogger.com/atom/ns#" term="RHEL"/><category scheme="http://www.blogger.com/atom/ns#" term="sga"/><category scheme="http://www.blogger.com/atom/ns#" term="system.slice/oracle-ohasd.service"/><category scheme="http://www.blogger.com/atom/ns#" term="user.slice"/><title type='text'>RHEL7 Control Groups on Oracle Database Servers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
After some linux patching on some database servers I was surprised to see an
entry in an alert log I hadn’t seen before…complete with a WARNING message.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;After digging around I found it was due to
Linux control groups.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;In an effort to
manage a server with multiple workloads, RHEL7 introduced control groups and
they’ve increased features/abilities with each dot release.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;On the affected &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;Oracle nodes in RHEL7 we see entries on
startup in the alert log:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;************************ Large
Pages Information *******************&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;Parameter use_large_pages =
ONLY&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;Per process system memlock
(soft) limit = UNLIMITED&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;Large page usage restricted to
processor group &quot;user.slice&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;Total Shared Global Region in
Large Pages = 60 GB (100%)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;WARNING:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;The parameter _linux_prepage_large_pages is
explicitly disabled.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Oracle strongly recommends setting the
_linux_prepage_large_pages&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;parameter since the instance&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;is running in a Processor Group. If there is&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;insufficient large page memory, instance may
encounter SIGBUS error&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;and may terminate abnormally.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;Large Pages used by this
instance: 30721 (60 GB)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;Large Pages unused in
Processor Group user.slice = 1722 (3444 MB)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;Large Pages configured in
Processor Group user.slice = 120000 (234 GB)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom: dotted windowtext 3.0pt; border: none; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: none; mso-border-bottom-alt: dotted windowtext 3.0pt; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 8.0pt;&quot;&gt;Large
Page size = 2048 KB&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;You may also see:&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Large page usage restricted to processor group &quot;system.slice/oracle-ohasd.service&quot;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
…this concerned me because if our large page usage is
restricted and we can’t do a prepage, eventually the db_cache would warm up and
allocate memory beyond the limitation, causing an instance crash.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Also, “WARNING” on startup is something to
take a closer look at.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;That undocumented
parameter was most definitely NOT explicitly disabled.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;This message appears in every database that’s
being controlled by processor groups, so it appears prepage of large pages is
disabled automatically.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;There’s a &lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;note (&lt;span style=&quot;background: white; color: black;&quot;&gt;2414778.1&lt;/span&gt;) that says this message can
be ignored and its removed in 12.2+.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
So…what amount of memory is our group being limited to by default?&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;gt;systemctl show user.slice|grep Mem&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in;&quot;&gt;
MemoryCurrent=18446744073709551615&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in;&quot;&gt;
MemoryAccounting=no&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in;&quot;&gt;
MemoryLimit=18446744073709551615&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
…which works out to be 17,179,869,184GB, (roughly 17
Exabytes) which is probably a sufficient amount of RAM (per node) for any
database out there…so we’re basically being limited to slightly less than
infinity….nothing to worry about.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Are control groups useful in a multi-database instance
server environment?&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;To set up CPU limits
per instance, you could use this or instance caging…I would prefer to set the cpu_count
parameter and use instance caging.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Memory Limits?&amp;nbsp; Memory utilization for the SGA is set via sga_target/max_size…so I don’t think there’s
a play for it here either.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;Maybe the
accounting features could be useful…if you wanted to see how much CPU one
instance in a multiple instance db server was using historically?&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;There are awr tables that track that…but getting
the information from CG might be easier….&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
One potentially useful way to use control groups for a
database server with multiple instances is to throttle bandwidth on IO to
prevent one instance from using up all the IO and affecting the performance of
a different instance (assuming each instance is on its own asm disks or luns.)&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;There’s a note about how to get that to work on
Metalink:&lt;span style=&quot;background: white; color: black; font-family: &amp;quot;tahoma&amp;quot; , sans-serif; font-size: 10.5pt;&quot;&gt; 2495924.1&lt;/span&gt;. &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;This has been a useful feature in Exadata for
years with IORM…now you can have similar functionality without Exadata.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
One other interesting feature of control groups is the
ability to look at the resources each group is using in real time (if you have
accounting on) with the systemd-cgtop command.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;
&lt;/span&gt;If you don’t have accounting, you’ll see something like this, which is a
summary of process counts, cpu, memory and IO for each group:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;mso-no-proof: yes;&quot;&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype
 id=&quot;_x0000_t75&quot; coordsize=&quot;21600,21600&quot; o:spt=&quot;75&quot; o:preferrelative=&quot;t&quot;
 path=&quot;m@4@5l@4@11@9@11@9@5xe&quot; filled=&quot;f&quot; stroked=&quot;f&quot;&gt;
 &lt;v:stroke joinstyle=&quot;miter&quot;/&gt;
 &lt;v:formulas&gt;
  &lt;v:f eqn=&quot;if lineDrawn pixelLineWidth 0&quot;/&gt;
  &lt;v:f eqn=&quot;sum @0 1 0&quot;/&gt;
  &lt;v:f eqn=&quot;sum 0 0 @1&quot;/&gt;
  &lt;v:f eqn=&quot;prod @2 1 2&quot;/&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelWidth&quot;/&gt;
  &lt;v:f eqn=&quot;prod @3 21600 pixelHeight&quot;/&gt;
  &lt;v:f eqn=&quot;sum @0 0 1&quot;/&gt;
  &lt;v:f eqn=&quot;prod @6 1 2&quot;/&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelWidth&quot;/&gt;
  &lt;v:f eqn=&quot;sum @8 21600 0&quot;/&gt;
  &lt;v:f eqn=&quot;prod @7 21600 pixelHeight&quot;/&gt;
  &lt;v:f eqn=&quot;sum @10 21600 0&quot;/&gt;
 &lt;/v:formulas&gt;
 &lt;v:path o:extrusionok=&quot;f&quot; gradientshapeok=&quot;t&quot; o:connecttype=&quot;rect&quot;/&gt;
 &lt;o:lock v:ext=&quot;edit&quot; aspectratio=&quot;t&quot;/&gt;
&lt;/v:shapetype&gt;&lt;v:shape id=&quot;Picture_x0020_3&quot; o:spid=&quot;_x0000_i1025&quot; type=&quot;#_x0000_t75&quot;
 style=&#39;width:778.8pt;height:124.2pt;visibility:visible;mso-wrap-style:square&#39;&gt;
 &lt;v:imagedata src=&quot;file:///C:/Users/blackan/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png&quot;
  o:title=&quot;&quot;/&gt;
&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src=&quot;file:///C:/Users/blackan/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg&quot; v:shapes=&quot;Picture_x0020_3&quot; /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmG0sfLBlaJ0b8NT8P5COjZ1-Vc5QaCdPHEzUa0JYCYCP-9OQDF5Mu1wfDnOdXXUptHpON8b1UZBcRJV35YW7EUwrdCHgQVpzEpwzmuBunfhs-cTReYxRP3XFnfNjkqCch-2vp1WccE4o/s1600/cgtop.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;256&quot; data-original-width=&quot;1600&quot; height=&quot;100&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmG0sfLBlaJ0b8NT8P5COjZ1-Vc5QaCdPHEzUa0JYCYCP-9OQDF5Mu1wfDnOdXXUptHpON8b1UZBcRJV35YW7EUwrdCHgQVpzEpwzmuBunfhs-cTReYxRP3XFnfNjkqCch-2vp1WccE4o/s640/cgtop.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
It took some time to find the details about what the new alert log entries were telling me with the new warning and processor group information.&amp;nbsp; Hopefully this information will save you some time.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/711787186688504436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2020/05/rhel7-control-groups-on-oracle-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/711787186688504436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/711787186688504436'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2020/05/rhel7-control-groups-on-oracle-database.html' title='RHEL7 Control Groups on Oracle Database Servers'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmG0sfLBlaJ0b8NT8P5COjZ1-Vc5QaCdPHEzUa0JYCYCP-9OQDF5Mu1wfDnOdXXUptHpON8b1UZBcRJV35YW7EUwrdCHgQVpzEpwzmuBunfhs-cTReYxRP3XFnfNjkqCch-2vp1WccE4o/s72-c/cgtop.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-6739629424044156841</id><published>2019-08-30T12:15:00.000-07:00</published><updated>2019-08-30T12:22:55.162-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="backups"/><category scheme="http://www.blogger.com/atom/ns#" term="bucket"/><category scheme="http://www.blogger.com/atom/ns#" term="Cloud"/><category scheme="http://www.blogger.com/atom/ns#" term="Cloudberry"/><category scheme="http://www.blogger.com/atom/ns#" term="compartment"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="delete"/><category scheme="http://www.blogger.com/atom/ns#" term="lifecycle"/><category scheme="http://www.blogger.com/atom/ns#" term="linus torvalds"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OCI"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="remove"/><category scheme="http://www.blogger.com/atom/ns#" term="SR"/><title type='text'>Oracle Cloud Backups - The easy way to mass delete files in a large OCI bucket</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/backups-to-oracles-cloud.html&quot; target=&quot;_blank&quot;&gt;In some previous posts&lt;/a&gt;, I talked about the benefits of doing backups to Oracle&#39;s cloud...if you run the numbers it will be significantly (magnitudes) less expensive than backups on prem or to other cloud vendors.&amp;nbsp; Its safer than keeping backups geographically close to you, they&#39;re very fast (depending on your WAN speed, the storage array&#39;s write speed will be the bottleneck for your restore), they&#39;re encrypted, compressed and secured.&amp;nbsp; Once you have everything scripted...its a &quot;set it and forget it.&quot;&amp;nbsp; The uptime far exceeds typical on-site backup MML systems...which is important because failing to do timely archivelog backups may translate into a database outage.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve really only had 1 complaint until now.&amp;nbsp; Here&#39;s the full story...skip down to &quot;The Solution&quot; if you&#39;re impatient.&lt;br /&gt;
&lt;br /&gt;
When I first helped a customer set up their backups to Oracle&#39;s Classic backup service (pre-OCI), there was a problem.&amp;nbsp; The design called for the database backups to go into a different bucket for each databases.&amp;nbsp; When the non-prod databases were refreshed from production, they wanted to delete the bucket that held those backups.&amp;nbsp; No problem...there&#39;s a big red delete button on the bucket page, right?&amp;nbsp; Wrong!&amp;nbsp; You can&#39;t delete a bucket that has files in it.&amp;nbsp; When you do a backup of even a medium sized database, you can have hundreds of thousands of files in it.&amp;nbsp; The only way to delete files on the console is to select 100 at a time and click delete.&amp;nbsp; I had 10 databases/buckets, over a million files and it took me about 5 seconds to delete 100 files.&amp;nbsp; If I did nothing else...we&#39;re talking ~14 hrs of work.&amp;nbsp; In reality it was going to take somebody days to delete the backups after every refresh.&amp;nbsp; Completely unacceptable....&lt;br /&gt;
&lt;br /&gt;
I opened an SR to ask for a better way.&amp;nbsp; They pointed me to Cloudberry Explorer (which is a pretty cool product.)&amp;nbsp; CBE allows you do pull up the files in Oracle&#39;s (or virtually any other) cloud in an interface similar to Window&#39;s file explorer.&amp;nbsp; Great!&amp;nbsp; I set it up, selected all the files I wanted to delete and clicked the little delete button.&amp;nbsp; After the files were indexed,&amp;nbsp; it kicked off multiple threads to get this done.&amp;nbsp; 3 by 3 (about 3 sec per file), they started to delete.&amp;nbsp; I left my laptop to it over the weekend.&amp;nbsp; When I came back on Mon...it was still deleting them.&lt;br /&gt;
&lt;br /&gt;
I updated the SR...they pointed me to using curl in batch to hit the API (&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 15.6px; text-align: right;&quot;&gt;Doc ID 2289491.1)&lt;/span&gt;.&amp;nbsp; Cool!&amp;nbsp; I love linux scripting...it took a while to set it up, but eventually I got it to work...and one by one (about 3 sec per file) they started to delete.&amp;nbsp; Argh.&lt;br /&gt;
&lt;br /&gt;
A colleague I work with wrote a similar procedure in perl...but it was using the same API, and had the same results.&lt;br /&gt;
&lt;br /&gt;
I updated the SR...they essentially said there&#39;s no way to do what I&#39;m trying to do any faster.&lt;br /&gt;
&lt;br /&gt;
I opened an new SR for an enhancement request to add a way to do mass deletes...here&#39;s the response:&lt;br /&gt;
&lt;br /&gt;
&quot;The expectation to delete the bucket directly is like a Self Destructive program ,Many customer will accidentally delete the container and will come back to US for recovery which is not possible.&quot;&lt;br /&gt;
...and then they closed my enhancement&amp;nbsp; request.&lt;br /&gt;
&lt;br /&gt;
My first thought was to send an email to Linus Torvalds and let him know about the terrible mistake he made introducing rm to his OS.&amp;nbsp; (sarcasm)&amp;nbsp; My second thought was that the company that charges for my TB&#39;s of storage usage isn&#39;t motivated to help me delete the storage.&lt;br /&gt;
&lt;br /&gt;
The Solution:&amp;nbsp; Lifecycle the files out.&lt;br /&gt;
1. First enable Service Permissions (&lt;a href=&quot;https://docs.cloud.oracle.com/iaas/Content/Object/Tasks/usinglifecyclepolicies.htm&quot; target=&quot;_blank&quot;&gt;click here&lt;/a&gt;).&lt;br /&gt;
2. In OCI, go to Object Storage, click on the bucket you want to clean up and click on &quot;Lifecycle Policy Rules.&quot;&amp;nbsp; Click on &quot;Create Rule.&quot;&lt;br /&gt;
3.&amp;nbsp; Put in anything for name (its going to be deleted in a minute, so this doesn&#39;t matter.) Select &quot;Delete&quot; from the lifecycle action and set the number of days to 1.&amp;nbsp; Leave the state at the default Enabled, then click the Create button.&amp;nbsp; This will immediately start deleting all the files in the bucket that are over 1 day old...in my case, that was all of them.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijvfQ-EHibsko1xrNNUM3s4QitWu7om2b_mhZHWcLc-GvsqaPPiLVOj2Yy_EinHdsT1q1j9JTkz-DNll7_Iy7CfCG9iEvS_H0s2gV1GhKQP_lrh1GE4xZ7t8veimqzXxBSF77tuw-K-UA/s1600/Lifecycle+Rule.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;776&quot; data-original-width=&quot;697&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijvfQ-EHibsko1xrNNUM3s4QitWu7om2b_mhZHWcLc-GvsqaPPiLVOj2Yy_EinHdsT1q1j9JTkz-DNll7_Iy7CfCG9iEvS_H0s2gV1GhKQP_lrh1GE4xZ7t8veimqzXxBSF77tuw-K-UA/s320/Lifecycle+Rule.jpg&quot; width=&quot;287&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
4. The Approximate Count for the bucket will update in a few minutes.&amp;nbsp; Soon (within a min or so) it will say 0 objects.&amp;nbsp; Now when you click the red Delete button to remove the bucket, it will go away.&amp;nbsp; I was able to remove about 150 Terrabytes in a few seconds.&lt;br /&gt;
&lt;br /&gt;
I have no idea why Oracle made this so difficult...their job is to provide a resource, not protect us from making a mistake.&amp;nbsp; Anyway, I hope this helps some of you out.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/6739629424044156841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/08/oracle-cloud-backups-easy-way-to-mass.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6739629424044156841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6739629424044156841'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/08/oracle-cloud-backups-easy-way-to-mass.html' title='Oracle Cloud Backups - The easy way to mass delete files in a large OCI bucket'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijvfQ-EHibsko1xrNNUM3s4QitWu7om2b_mhZHWcLc-GvsqaPPiLVOj2Yy_EinHdsT1q1j9JTkz-DNll7_Iy7CfCG9iEvS_H0s2gV1GhKQP_lrh1GE4xZ7t8veimqzXxBSF77tuw-K-UA/s72-c/Lifecycle+Rule.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-2937470076487801955</id><published>2019-08-13T09:03:00.001-07:00</published><updated>2019-08-13T09:14:08.531-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BAT"/><category scheme="http://www.blogger.com/atom/ns#" term="Bitcoin"/><category scheme="http://www.blogger.com/atom/ns#" term="Blockchain"/><category scheme="http://www.blogger.com/atom/ns#" term="blogspot"/><category scheme="http://www.blogger.com/atom/ns#" term="brave browser"/><category scheme="http://www.blogger.com/atom/ns#" term="BTC"/><category scheme="http://www.blogger.com/atom/ns#" term="Chrome browser"/><category scheme="http://www.blogger.com/atom/ns#" term="Ellison"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="Mozilla"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="PaaS"/><category scheme="http://www.blogger.com/atom/ns#" term="Wharton"/><title type='text'>How to monetize your blog with BAT</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I think one thing is clear at this point...you&#39;ll either get into blockchain technology, or you&#39;ll regret it when you get in later.&amp;nbsp; This is still the time of &quot;Early Adopters&quot;...you&#39;re not too late.&amp;nbsp; How does this tie in to a mainly Oracle/database blog?&amp;nbsp; Recently I heard Oracle&#39;s Larry Ellison gave a speech to Wharton Business School graduates about blockchain where he said this is the single most important new technology in decades.&amp;nbsp;&amp;nbsp;A Bloomberg report stated Oracle is ready to announce its entry into Blockchain including a platform as a service (PaaS) Blockchain product...IBM and others have already done the same thing.&amp;nbsp; We&#39;ve all seen blockchain enter the finance and IoT spaces, but the applications are endless...its my other passion, besides databases.&amp;nbsp; You could say blockchain is a new database technology.&amp;nbsp; Its going to change the world.&lt;br /&gt;
&lt;br /&gt;
Blockchain gave us Bitcoin and many other coins/tokens.&amp;nbsp; You&#39;ve all heard of Bitcoin, but you may not have heard of Basic Attention Coin (BAT).&amp;nbsp; BAT works with the Brave browser, which can generate BAT tokens as you use it.&amp;nbsp; It then allows you to tip websites automatically when you use them.&amp;nbsp; &lt;a href=&quot;https://player.vimeo.com/video/282341981?&quot; target=&quot;_blank&quot;&gt;*More info here*&lt;/a&gt;.&amp;nbsp; To do this you just need to download and use&amp;nbsp;&lt;a href=&quot;https://laptop-updates.brave.com/download/HPA811&quot; target=&quot;_blank&quot;&gt;the Brave browser&lt;/a&gt;&amp;nbsp;. Think &quot;Chrome&quot; but its faster, more secure, ads blocked, built by&amp;nbsp;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Brendan_Eich&quot; target=&quot;_blank&quot;&gt;Brendan Eich&lt;/a&gt;,&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;the guy that invented java script and Mozilla.&amp;nbsp; The idea is that from a user&#39;s perspective, you can reward content creators (like websites, twitter/youtube/blog channels, etc) when they help you out (at really no cost to you)...and from the content provider&#39;s perspective, they can get free money.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve used it for about a year, and it keeps getting better, but I wanted to monetize my blog with it.&amp;nbsp; To do this, you have to register your channel, to do that, you need to put in a file with a key into a folder called &quot;.well-known&quot;.&amp;nbsp; Blogger has no way to do this, but I found a way to get it to work.&lt;br /&gt;
&lt;br /&gt;
1. Go to&amp;nbsp;https://publishers.basicattentiontoken.org/publishers/home&lt;br /&gt;
2. Create an account and click on &quot;Add Channel&quot;&lt;br /&gt;
3. Click on Website&lt;br /&gt;
4. Add your website: ie: otipstricks.blogspot.com&lt;br /&gt;
You&#39;re then given two options to verify via DNS or by adding a file...choose to add the file.&lt;br /&gt;
&lt;br /&gt;
That will give you the instructions to add a file called /.well-known/brave-rewards-verification.txt with metadata in it.&lt;br /&gt;
&lt;br /&gt;
5. Now go into your blog&#39;s settings and go to &quot;Pages&quot; and click &quot;New Page.&quot;&lt;br /&gt;
6. I named my page brave-rewards-verification.txt, although I&#39;m not sure that was necessary, and then I pasted in the metadata I got from step 4.&lt;br /&gt;
7. Click save and publish...this gives you a page you can access like this:&lt;br /&gt;
&lt;a href=&quot;https://otipstricks.blogspot.com/p/this-is-brave-rewards-publisher.html&quot;&gt;https://otipstricks.blogspot.com/p/this-is-brave-rewards-publisher.html&lt;/a&gt;&lt;br /&gt;
8. Back to blogger settings-&amp;gt;search preferences-&amp;gt;&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;Custom Redirects-&amp;gt;Edit-&amp;gt;New Redirect&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;9. Create a redirect that looks like this, with relative paths:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;From:/.well-known/brave-rewards-verification.txt&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;To:/p/this-is-brave-rewards-publisher.html&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;Permanent:Yes&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #222222; font-family: &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;10. Now go back to&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;https://publishers.basicattentiontoken.org/publishers/home&quot;&gt;https://publishers.basicattentiontoken.org/publishers/home&lt;/a&gt;&amp;nbsp;and click on the verify button.&amp;nbsp; Within a few seconds it will say, &quot;Channel Verified.&quot;&lt;br /&gt;
11. Now create an uphold wallet (which is another link on that page and follow the instructions to connect it to your new bat publishers account, and you&#39;re done.&amp;nbsp; Now, when people come to your page, they can tip your blog automatically, in the background.&lt;br /&gt;
&lt;br /&gt;
Now, when you go into brave and click on brave rewards, you can check your website:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6SS24VXg0R9nGtJZUU0XQSiQMzyEI7wsbA5AE58UHdbXOP-J-hl4lYEbyt6QSDvI2MQWTaysBR8ov0x1ZmWVipmzDMZyr4Kpms7dqJf49E5L8U8rCr7Is0XMxiFEaz-RkeYiubPEtwts/s1600/otips-brave.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;63&quot; data-original-width=&quot;279&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6SS24VXg0R9nGtJZUU0XQSiQMzyEI7wsbA5AE58UHdbXOP-J-hl4lYEbyt6QSDvI2MQWTaysBR8ov0x1ZmWVipmzDMZyr4Kpms7dqJf49E5L8U8rCr7Is0XMxiFEaz-RkeYiubPEtwts/s1600/otips-brave.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/2937470076487801955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/08/how-to-monetize-your-blog-with-bat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/2937470076487801955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/2937470076487801955'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/08/how-to-monetize-your-blog-with-bat.html' title='How to monetize your blog with BAT'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6SS24VXg0R9nGtJZUU0XQSiQMzyEI7wsbA5AE58UHdbXOP-J-hl4lYEbyt6QSDvI2MQWTaysBR8ov0x1ZmWVipmzDMZyr4Kpms7dqJf49E5L8U8rCr7Is0XMxiFEaz-RkeYiubPEtwts/s72-c/otips-brave.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-6992664096342570221</id><published>2019-08-08T09:44:00.000-07:00</published><updated>2019-08-08T10:29:19.430-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><category scheme="http://www.blogger.com/atom/ns#" term="Capital One"/><category scheme="http://www.blogger.com/atom/ns#" term="compression"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="Dell"/><category scheme="http://www.blogger.com/atom/ns#" term="EMC"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="OCI"/><category scheme="http://www.blogger.com/atom/ns#" term="oci_install.jar"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="RMAN"/><category scheme="http://www.blogger.com/atom/ns#" term="VMAX"/><title type='text'>Oracle&#39;s Backup Cloud Service (OCI) - 3 setup your backup</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;In this series of posts:&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/backups-to-oracles-cloud.html&quot; style=&quot;color: #436590; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Oracle&#39;s Backup Cloud Service (OCI)-1 -&amp;nbsp;The Oracle OCI Backup Cloud&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, sans-serif;&quot; /&gt;
&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-2.html&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;background-color: white; color: #436590; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-stretch: normal;&quot;&gt;Oracle&#39;s Backup Cloud Service (OCI) - 2&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-stretch: normal;&quot;&gt;setup OCI and your server environment&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: blue; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif; font-stretch: normal; line-height: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: blue; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif; font-stretch: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;color: black; font-stretch: normal; line-height: normal;&quot;&gt;&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-3.html&quot; style=&quot;color: black; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Oracle&#39;s Backup Cloud Service (OCI)&amp;nbsp;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-stretch: normal;&quot;&gt;- 3&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;- You are here&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
At this point, you&#39;ve read about why you want to use OCI and the benefits and you&#39;ve read how to setup your environment for it.&amp;nbsp; This one is about setting up your backups to use it.&amp;nbsp; The only negative I can say after using OCP/OCI for over a year is that they change the security certificates without warning.&amp;nbsp; If you install/setup the software per the docs and you have a lot of databases...this can easily occupy many hours that day, reinstalling all the OCI software for every Oracle_Home in your infrastructure.&amp;nbsp; This is why in my previous post, I recommended you use a shared mount.&lt;br /&gt;
&lt;br /&gt;
You have already:&lt;br /&gt;
1. Installed OCI software on a shared mount&lt;br /&gt;
2. Setup a container in the cloud web page&lt;br /&gt;
3. Used the jar file to create the environment files you need&lt;br /&gt;
4. Enabled block change tracking in the database (for incrementals)&lt;br /&gt;
5. Enabled medium compression in rman (per the OCI backup docs, this is normally licensed as part of the compression pack, but it appears if you&#39;re paying for OCI backups, this is included.&amp;nbsp; Talk to your Oracle sales guy.)&lt;br /&gt;
&lt;br /&gt;
In the server you used in the last post, as the db software owner:&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif; font-size: 16px; text-indent: -24px;&quot;&gt;1. cd /nas/dba/backups/cfg&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;2. ls&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...you should see a file called opc[database name].ora&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;3. You can use this as a template for all your other databases...just copy the file to have the new database name and update the container parameter in the file.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 4. If you use stored scripts in an rman repository, you can add the backup scripts similar to this.&amp;nbsp; This is just the archivelog backup...you&#39;ll want incrementals and fulls, obviously, but the key is the allocate channel commands, which are the same.&amp;nbsp; Add more channels to increase performance...until your network guys complain:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;printing stored global script: tstoracle01_TSTDB1_arch&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;allocate channel ch1 DEVICE TYPE &#39;SBT_TAPE&#39; CONNECT &#39;sys/[the_pw]@TSTDB1&#39; PARMS&amp;nbsp; &#39;SBT_LIBRARY=/nas/dba/backups/cfg/libopc.so, SBT_PARMS=(OPC_PFILE=/nas/dba/backups/cfg/opcTSTDB_a.ora)&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;allocate channel ch2 DEVICE TYPE &#39;SBT_TAPE&#39; CONNECT &#39;sys/[the_pw]@TSTDB2&#39; PARMS&amp;nbsp; &#39;SBT_LIBRARY=/nas/dba/backups/cfg/libopc.so, SBT_PARMS=(OPC_PFILE=/nas/dba/backups/cfg/opcTSTDB_a.ora)&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;allocate channel ch3 DEVICE TYPE &#39;SBT_TAPE&#39; CONNECT &#39;sys/[the_pw]@TSTDB3&#39; PARMS&amp;nbsp; &#39;SBT_LIBRARY=/nas/dba/backups/cfg/libopc.so, SBT_PARMS=(OPC_PFILE=/nas/dba/backups/cfg/opcTSTDB_a.ora)&#39;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;crosscheck archivelog all;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;delete expired archivelog all;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;backup as compressed backupset archivelog filesperset 8 not backed up 1 times delete input;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;5. Make sure your rman environment is set up correctly:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;div&gt;
CONFIGURE COMPRESSION ALGORITHM &#39;MEDIUM&#39;;&lt;/div&gt;
&lt;div&gt;
CONFIGURE DEFAULT DEVICE TYPE TO SBT_TAPE;&lt;/div&gt;
&lt;div&gt;
CONFIGURE CHANNEL DEVICE TYPE &#39;SBT_TAPE&#39; PARMS &#39;SBT_LIBRARY=/nas/dba/backups/cfg/libopc.so, SBT_PARMS=(OPC_PFILE=/nas/dba/backups/cfg/opcTSTDB_a.ora)&#39;;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; 6. Assuming you can tnsping to each node from node 1, and you kick off the script from node 1, when you kick off the backup, it should work from all 3 nodes.&amp;nbsp; You&#39;ll also need a maint script to delete backups that are outside of your retention period...otherwise your OCI storage will grow too large.&amp;nbsp; Here&#39;s an example of a maint script:&lt;br /&gt;
printing stored global script: global_maint_backup&lt;br /&gt;
{&lt;br /&gt;
crosscheck backupset device type sbt_tape;&lt;br /&gt;
crosscheck archivelog all;&lt;br /&gt;
delete noprompt expired archivelog all;&lt;br /&gt;
delete noprompt expired backup;&lt;br /&gt;
delete noprompt obsolete;&lt;br /&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; 7. One of the requirements for OCI is that the backups MUST be encrypted.&amp;nbsp; This is easy...before your backup script, after you get in to rman, just add:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set encryption on identified by &#39;1VeryGoodPassword!&#39; ONLY;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;...and when you do the restore, you have to add a line to decrypt:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set decryption
identified by &#39;1VeryGoodPassword!&#39;;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; 8. When you do the restore, you&#39;ll probably want to use many more channels then you do when you&#39;re backing up...assuming its an emergency and you need the restore done asap.&amp;nbsp; When you add lots of channels, depending on your network equipment, it may help you compete for bandwidth favorably from the cat videos being watched by all the marketing managers at your company.&lt;/div&gt;
&lt;div class=&quot;MsoNormalCxSpFirst&quot; style=&quot;line-height: normal;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/6992664096342570221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6992664096342570221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6992664096342570221'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-3.html' title='Oracle&#39;s Backup Cloud Service (OCI) - 3 setup your backup'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-6206015028072066295</id><published>2019-08-08T08:51:00.000-07:00</published><updated>2019-08-08T10:28:36.154-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><category scheme="http://www.blogger.com/atom/ns#" term="Capital One"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="Dell"/><category scheme="http://www.blogger.com/atom/ns#" term="EMC"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="OCI"/><category scheme="http://www.blogger.com/atom/ns#" term="oci_install.jar"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="RMAN"/><category scheme="http://www.blogger.com/atom/ns#" term="VMAX"/><title type='text'>Oracle&#39;s Backup Cloud Service (OCI) - 2 (setup OCI and your server environment)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;In this series of posts:&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot;, trebuchet, sans-serif;&quot; /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/backups-to-oracles-cloud.html&quot; target=&quot;_blank&quot;&gt;Oracle&#39;s Backup Cloud Service (OCI)-1 -&amp;nbsp;The Oracle OCI Backup Cloud&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot;, trebuchet, sans-serif;&quot; /&gt;
&lt;span style=&quot;color: #436590; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-stretch: normal;&quot;&gt;Oracle&#39;s Backup Cloud Service (OCI) - 2&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;- You are here&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-3.html&quot; style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot;, trebuchet, sans-serif;&quot; target=&quot;_blank&quot;&gt;Oracle&#39;s Backup Cloud Service (OCI) - 3 setup your backup&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
In my previous post, I talked about OCI Backups and their advantages.&amp;nbsp; Here&#39;s how you do it:&lt;br /&gt;
&lt;br /&gt;
Before you start, verify you have Java 1.7+ installed on your server (java -version) and download the MML software:&lt;br /&gt;
&lt;a class=&quot;new-window&quot; href=&quot;http://www.oracle.com/technetwork/database/availability/oracle-cloud-backup-2162729.html&quot; style=&quot;background-color: white; box-sizing: border-box; color: #226aa8; font-family: &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;Segoe UI&amp;quot;, Roboto, sans-serif-regular, sans-serif; font-size: 14px; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;code class=&quot;codeph&quot; style=&quot;background: inherit; border-radius: 4px; box-sizing: border-box; color: inherit; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 15.4px; padding: 0px;&quot;&gt;http://www.oracle.com/technetwork/database/availability/oracle-cloud-backup-2162729.html&lt;/code&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In a browser, go to:&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt; line-height: 15.6933px;&quot;&gt;&lt;a href=&quot;https://console.us-ashburn-1.oraclecloud.com/&quot;&gt;https://console.us-ashburn-1.oraclecloud.com/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
1. Setup your tenant&lt;br /&gt;
2. Create your user&lt;br /&gt;
&lt;br /&gt;
...those steps keep changing, so I&#39;m not going to tell you how to do them...but if you go to that page, it should be pretty self-explanatory.&amp;nbsp; Ok, so at this point you&#39;re in.&lt;br /&gt;
&lt;br /&gt;
3. On the top right, select the region that&#39;s geo-located closest to you.&amp;nbsp; Be aware of any in-country requirements for your database backups.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhSHydf4fMpOJiHKMD30YADhMNFR-4Q9nvug4bk1OidEp76Xj2H9HEobzRViMvTKsFgO8Ark5agrgCbxpLkTN6tettHxopemL7vZq5QVSaovjXJLEf6qKoktVBkLG4HroQBUh33Nj0AtM/s1600/oci-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;446&quot; data-original-width=&quot;654&quot; height=&quot;218&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhSHydf4fMpOJiHKMD30YADhMNFR-4Q9nvug4bk1OidEp76Xj2H9HEobzRViMvTKsFgO8Ark5agrgCbxpLkTN6tettHxopemL7vZq5QVSaovjXJLEf6qKoktVBkLG4HroQBUh33Nj0AtM/s320/oci-1.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;&quot;&gt;&lt;span style=&quot;mso-list: Ignore;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;4.&amp;nbsp;&lt;span style=&quot;font: 7.0pt &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;On the top left, click on the hamburger (the button with 3
lines), and then click “Object Storage”.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;
&lt;/span&gt;The Object Storage page will appear:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8GHM75SfW5pQFJpxqggr_ZkoDZ7gfAaD0juqQImoaXrjioSElQTrnAmSQI3mvWZHWQefqBPXcfLXhLiYNQeYQN0xgAMhL4Fdz-Ohnh8sHe_wvGN9anM8Fh3-oTPPtxOvjIv4RRHHrUVk/s1600/oci-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;522&quot; data-original-width=&quot;1600&quot; height=&quot;130&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8GHM75SfW5pQFJpxqggr_ZkoDZ7gfAaD0juqQImoaXrjioSElQTrnAmSQI3mvWZHWQefqBPXcfLXhLiYNQeYQN0xgAMhL4Fdz-Ohnh8sHe_wvGN9anM8Fh3-oTPPtxOvjIv4RRHHrUVk/s400/oci-3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
5.&amp;nbsp;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;To make management easier, put each database’s backups into its
own bucket.&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;If you don’t see the bucket
for the database you’re working on, create one by clicking on the “Create
Bucket” button.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;6.&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;Fill in the “Bucket Name” text box with the
database you want to add and select “standard
tier”, then click the “Create Bucket” button.&amp;nbsp; The&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;list
price of standard tier is $0.025 cents/GB, and archive price is $0.0025 cents,
but you’re required to keep archive for 90 days and there’s up to a 4 hour lag
if you need to pull back archived files...so unless its a rare backup you&#39;re going to keep for an extended time, you want standard.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh1gUyG5MgnAJQPiocdueI3yWjiK_0sWhIHgLIxuBhptYGyGGioGvtvh32V-m_pLj6lr53Hl3mK48TnxgvwzolO4NvNFfQHQgXLySSfWJuddLFN8Ja1FyCTfzob0bEWAgrhQOcZrsZyBA/s1600/oci-6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;867&quot; data-original-width=&quot;1600&quot; height=&quot;345&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh1gUyG5MgnAJQPiocdueI3yWjiK_0sWhIHgLIxuBhptYGyGGioGvtvh32V-m_pLj6lr53Hl3mK48TnxgvwzolO4NvNFfQHQgXLySSfWJuddLFN8Ja1FyCTfzob0bEWAgrhQOcZrsZyBA/s640/oci-6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 11pt;&quot;&gt;7.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; text-indent: -0.25in;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;For the install to work, we first need to get: &lt;/span&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a.Cloud Infrastructure API signing keys&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b.tenant OCID&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.user OCID&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; d.fingerprint of our RSI key.&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 8. Click the profile button in the top right corner (it looks like a head in a circle) and select user details. Click &quot;copy&quot; and paste the USER OCID to the editor of your choice.&amp;nbsp; It should start out with: &quot;ocid1.user.oc1..&quot;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 9. Click again on the profile button in the top right corner (that looks like a head in a circle) and this time select &quot;Tenancy: [whatever your tenancy is called]&quot;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;10. Under the Tenancy information, click on &quot;Copy&quot; and copy the tenant OCID and paste it into the editor of your choice.&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;11. Assuming you have an nfs mount that&#39;s shared on all your database servers, make a directory on that mount...&amp;nbsp; ie: mkdir /nas/dba/backups/cfg/opc_wallet&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 12. In your database server, go to the directory you unzipped the software into and get a new RSA key pair:&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;java -jar oci_install.jar -newRSAKeyPair -walletDir&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;/nas/dba/backups/cfg/opc_wallet&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 13. View the oci_pub file and select it so it loads into your laptop&#39;s clipboard (starting at the first dash, stopping after the last dash)&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 14. Once again back to the Profile button in the top right corner, click on your user and scroll down to the bottom of the page where it says, &quot;API Keys&quot; and click Ad Public Keys and paste in your new key from the previous step...when complete, click ADD.&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 15. A new fingerprint will be displayed.&amp;nbsp; Select that fingerprint and paste into the text editor of your choice.&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 16. Using all the things you put in your editor of choice, create the install command.&amp;nbsp; Put yours all in one line...I broke this out to make it more readable:&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; java -jar oci_install.jar -host&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 10pt;&quot;&gt;https://objectstorage.us-phoenix-1.oraclecloud.com&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp; &amp;nbsp; -pvtKeyFile&amp;nbsp;&amp;nbsp;&lt;/span&gt;/nas/dba/backups/cfg/opc_wallet/oci_pvt&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp;-pubFingerPrint [paste finger print here]&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp;-tOCID [paste tenancy OCID]&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp;-uOCID [paste user OCID]&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp;-libDir /nas/dba/backups/cfg&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp;-walletDir /nas/dba/backups/cfg/opc_wallet&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp;-bucket [the bucket you created in step 5]&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp;-cOCID [the OCID of the compartment you&#39;re using, if any]&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp; &amp;nbsp;-configFile /nas/dba/backups/cfg&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-3.html&quot; target=&quot;_blank&quot;&gt;&amp;nbsp; &amp;nbsp;...at this point the environment is set up and you&#39;re ready to move on to the next post.&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-indent: -24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/6206015028072066295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6206015028072066295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6206015028072066295'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-2.html' title='Oracle&#39;s Backup Cloud Service (OCI) - 2 (setup OCI and your server environment)'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhSHydf4fMpOJiHKMD30YADhMNFR-4Q9nvug4bk1OidEp76Xj2H9HEobzRViMvTKsFgO8Ark5agrgCbxpLkTN6tettHxopemL7vZq5QVSaovjXJLEf6qKoktVBkLG4HroQBUh33Nj0AtM/s72-c/oci-1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-437023323529073939</id><published>2019-08-08T08:09:00.001-07:00</published><updated>2019-08-08T10:28:50.054-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="backup"/><category scheme="http://www.blogger.com/atom/ns#" term="Capital One"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="Dell"/><category scheme="http://www.blogger.com/atom/ns#" term="EMC"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="OCI"/><category scheme="http://www.blogger.com/atom/ns#" term="oci_install.jar"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="RMAN"/><category scheme="http://www.blogger.com/atom/ns#" term="VMAX"/><title type='text'>Oracle&#39;s Backup Cloud Service (OCI)-1</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
In this series of posts:&lt;br /&gt;
Oracle&#39;s Backup Cloud Service (OCI)-1 - You are here&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-2.html&quot; style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot;, trebuchet, sans-serif; font-stretch: normal; line-height: normal;&quot;&gt;Oracle&#39;s Backup Cloud Service (OCI) - 2 setup OCI and your server environment&lt;/a&gt;&lt;br /&gt;
&lt;h3 class=&quot;post-title entry-title&quot; itemprop=&quot;name&quot; style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot;, trebuchet, sans-serif; margin: 20px 0px 0px; position: relative;&quot;&gt;
&lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-3.html&quot; style=&quot;font-stretch: normal; line-height: normal;&quot;&gt;&lt;span style=&quot;background-color: white; color: blue; font-size: small;&quot;&gt;Oracle&#39;s Backup Cloud Service (OCI) - 3 setup your backup&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
IMHO, one of the best use cases for the cloud is backups.&amp;nbsp; I honestly don&#39;t know why Oracle doesn&#39;t market this more...its been the best Oracle Cloud experience I&#39;ve seen.&amp;nbsp; The bar is low there...but this service has been flawless.&amp;nbsp; The questions re:security have been MOSTLY answered (&lt;a href=&quot;https://it.toolbox.com/article/capital-ones-aws-server-data-breach-trips-alarms-over-cloud-security&quot; target=&quot;_blank&quot;&gt;save a few for AWS at Capital One&lt;/a&gt;).&amp;nbsp; One of the trends I&#39;m seeing is for companies to move some of their database backups to the cloud.&amp;nbsp; If you can&#39;t handle downtime more than a few minutes, this isn&#39;t for you, you may need storage array snaps or a fast dataguard failover...but what about your dev/test/qa database backups?&amp;nbsp; Putting at least some of your backups in the cloud might make a lot of financial sense.&amp;nbsp; In a recent analysis, I saw a company that found it was (all things considered) about 400% cheaper to put their dev/test backups in Oracle&#39;s cloud.&amp;nbsp; Backing up to Oracle&#39;s new OCI cloud (as opposed to Oracle&#39;s Classic Cloud Backup service) was even cheaper than AWS Glacier for their use case.&lt;br /&gt;
&lt;br /&gt;
What about restore performance?&amp;nbsp; Dev/Test might be more tolerant than prod for an outage during a restore/recovery, but how long are we talking here?&amp;nbsp; The answer:it really depends more on your infrastructure than it does on the OCI cloud...it is FAST.&amp;nbsp; My test used an all-flash Dell/EMC VMax and my 3 RAC nodes were the only things on the new array.&amp;nbsp; I have no way to know how much spare network bandwidth there was, but I did this test at night using a 1Gb link.&amp;nbsp; The key is...using Oracle backups allows you to use medium compression.&amp;nbsp; So...whatever your bandwidth is...multiple that by your compression ratio, and that&#39;s the restore speed you can expect (unless you hit a different bottleneck...storage array performance, cpu, etc...).&amp;nbsp; &lt;u&gt;&lt;a href=&quot;https://otipstricks.blogspot.com/2011/05/exadata-backup-and-recovery-2.html&quot; target=&quot;_blank&quot;&gt;I posted in the past about the performance benefits for using rman compression.&lt;/a&gt;&lt;/u&gt;&amp;nbsp; In a recent test, my waits were on writing to the storage array, not the network or OCI itself.&lt;br /&gt;
&lt;br /&gt;
The Test:&lt;br /&gt;
Oracle RAC 12.2&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Almost 14TB (13,940,708 MB)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Starting at 9:53&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Finishing at 12:52&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
...so 3 hrs...~4.66TB/hr.&lt;br /&gt;
&lt;br /&gt;
So you ask...its secured, its much cheaper and its as fast as it could possibly be?&amp;nbsp; You also get an automatic air-gap, offsite backup.&amp;nbsp; What&#39;s the downside?&lt;br /&gt;
&lt;br /&gt;
Once you understand it, its easy to do and the up-time has been great, too, but the instructions are almost impossible to locate online...and when you do, they&#39;re obsolete or talking about classic, not OCI.&amp;nbsp; The only instructions (that weren&#39;t wrong) I found were in the README...but they weren&#39;t great and they were about how to set it up for a database...you probable have more than 1, right?&amp;nbsp; Several times/yr, maybe without warning, Oracle will update their security certificates which will force you to do a re-install...but if you plan your installation with this in mind, you can make that almost painless.&amp;nbsp; &lt;a href=&quot;https://otipstricks.blogspot.com/2019/08/oracles-backup-cloud-service-oci-2.html&quot; target=&quot;_blank&quot;&gt;In my next post, I&#39;ll describe what I did.....&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/437023323529073939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/08/backups-to-oracles-cloud.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/437023323529073939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/437023323529073939'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/08/backups-to-oracles-cloud.html' title='Oracle&#39;s Backup Cloud Service (OCI)-1'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-522471790173910069</id><published>2019-08-07T14:25:00.000-07:00</published><updated>2019-08-19T10:12:19.416-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="12.1.0.2"/><category scheme="http://www.blogger.com/atom/ns#" term="18c"/><category scheme="http://www.blogger.com/atom/ns#" term="19c"/><category scheme="http://www.blogger.com/atom/ns#" term="ascii"/><category scheme="http://www.blogger.com/atom/ns#" term="bulk collect"/><category scheme="http://www.blogger.com/atom/ns#" term="character set"/><category scheme="http://www.blogger.com/atom/ns#" term="cleanse"/><category scheme="http://www.blogger.com/atom/ns#" term="data cleanup"/><category scheme="http://www.blogger.com/atom/ns#" term="datapump"/><category scheme="http://www.blogger.com/atom/ns#" term="exorcist"/><category scheme="http://www.blogger.com/atom/ns#" term="expdp"/><category scheme="http://www.blogger.com/atom/ns#" term="fetch"/><category scheme="http://www.blogger.com/atom/ns#" term="forall"/><category scheme="http://www.blogger.com/atom/ns#" term="impdp"/><category scheme="http://www.blogger.com/atom/ns#" term="limit"/><category scheme="http://www.blogger.com/atom/ns#" term="lossy"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="plsql"/><category scheme="http://www.blogger.com/atom/ns#" term="upgrade"/><category scheme="http://www.blogger.com/atom/ns#" term="UTF8"/><title type='text'>Data Cleanup (how to exercise the ghost from the machine)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The scariest movie I ever saw was the Exorcist...to tell the truth, I don&#39;t think I actually saw it...while I was watching it I had my eyes closed half the time and I left early.&amp;nbsp; This is relevant to Oracle Databases...stay with me here.&amp;nbsp; Database upgrades are a *HOT* topic right now...with the extinction of 12.1.0.2 free support, everybody is moving to 18c or 19c.&amp;nbsp; I recently helped a customer with a problem that was preventing their database upgrades from being successful.&amp;nbsp; They were moving a legacy database into a multi-tenant pluggable database using datapump and rows were being dropped.&amp;nbsp; We initially assumed it was a character set issue, but we were going from UTF8 to UTF8.&amp;nbsp; We eventually learned that this database had long ago migrated to UTF8 from a different character set, and the conversion was done incorrectly, so we were left with bad data in the legacy tables.&lt;br /&gt;
&lt;br /&gt;
They said they&#39;ve had issues with &quot;ghosts&quot; in the data...two columns that appeared to equal each other not equaling each other in plsql, that kind of thing...but they always attributed it to bugs.&amp;nbsp; Now we knew the column&#39;s data had hidden, invisible characters in them.&amp;nbsp; They didn&#39;t care about the hidden characters, but the rest of the data in the column needed to be saved.&amp;nbsp; They only needed the basic, common ascii character set, so I wrote this quick little stored procedure to dynamically take the data and scan it, replacing any unusual characters with a space.&amp;nbsp; After this the import worked without an issue, and the database ghosts were exercised (no young and old priest required).&amp;nbsp; There were many 100 mil+ row tables, but the number of rows with bad data were only in the thousands...so I didn&#39;t do a forall update...if your data has a larger number of rows to change, you might want to modify this.&lt;br /&gt;
&lt;br /&gt;
When its complete, you can see if everything worked ok with this:&lt;br /&gt;
select /*+ PARALLEL 8 */ * from ascii_check where CPOS=-1 order by 1,2,3;&lt;br /&gt;
&lt;br /&gt;
[insert usual disclaimer here] I used this on many very large tables and it appears to do what I intended (which was to use the character&#39;s ascii code range to decide if it was a character we wanted to not), but review it closely to make sure it does what you want it to do in your environment before you use it. No warranties/promises...it&#39;ll probably not work...yada yada yada....&lt;br /&gt;
&lt;br /&gt;
First, create this table that will serve as a log to keep all the data that was changed, in case something unexpected happens or you need to revert back:&lt;br /&gt;
&lt;br /&gt;
create table ascii_check (Table_Owner varchar2(30),Table_Name varchar2(255), Col_Name varchar2(255), old_rowid varchar2(255), cpos number, code number, old_value varchar2(255 char));&lt;br /&gt;
&lt;br /&gt;
...once you feel confident its doing what you want...you can submit it as a job, and have many tables being scanned and corrected at the same time.&lt;br /&gt;
&lt;br /&gt;
CREATE OR REPLACE procedure data_cleanup&lt;br /&gt;
&amp;nbsp; (&lt;br /&gt;
&amp;nbsp; Table_Owner_in in varchar2,&lt;br /&gt;
&amp;nbsp; Table_Name_in in varchar2,&lt;br /&gt;
&amp;nbsp; Column_Name_in in varchar2,&lt;br /&gt;
&amp;nbsp; Testing_in in varchar2&lt;br /&gt;
&amp;nbsp; )&lt;br /&gt;
is&lt;br /&gt;
&amp;nbsp; v_Char number;&lt;br /&gt;
&amp;nbsp; v_String2 varchar2(32000);&lt;br /&gt;
&amp;nbsp; v_Flag boolean;&lt;br /&gt;
&amp;nbsp; v_Flag2 boolean := true;&lt;br /&gt;
&amp;nbsp; v_Counter number :=0;&lt;br /&gt;
&amp;nbsp; v_Errm varchar2(255);&lt;br /&gt;
&amp;nbsp; v_ErrTrack number :=0;&lt;br /&gt;
&amp;nbsp; v_Count number := 0;&lt;br /&gt;
&amp;nbsp; already_completed exception;&lt;br /&gt;
&amp;nbsp; pragma exception_init(already_completed,-20001);&lt;br /&gt;
&amp;nbsp; type rct_RowIDs is ref cursor;&lt;br /&gt;
&amp;nbsp; rc_RowIDs rct_RowIDs;&lt;br /&gt;
&amp;nbsp; v_Err_Rowid varchar2(18);&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&amp;nbsp; type t_Row is record&lt;br /&gt;
&amp;nbsp; (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Old_RowID varchar2(18),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Old_Data varchar2(32000)&lt;br /&gt;
&amp;nbsp; );&lt;br /&gt;
&amp;nbsp; type t_Rows is table of t_Row index by pls_integer;&lt;br /&gt;
&amp;nbsp; c_Rows t_Rows;&lt;br /&gt;
begin&lt;br /&gt;
&amp;nbsp; execute immediate &#39;ALTER SESSION SET ddl_lock_timeout=900&#39;;&lt;br /&gt;
&amp;nbsp; select /*+ PARALLEL 16 */ count(0) into v_Count from ascii_check where table_owner=Table_Owner_in and Table_Name=Table_Name_in and col_name=Column_Name_in and old_value=&#39;Completed Successfully.&#39;;&lt;br /&gt;
&amp;nbsp; if v_Count!=0 then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; raise already_completed;&lt;br /&gt;
&amp;nbsp; end if;&lt;br /&gt;
&amp;nbsp; delete /*+ PARALLEL 16 */ from ascii_check where table_owner=Table_Owner_in and Table_Name=Table_Name_in and col_name=Column_Name_in and cpos=-1;&lt;br /&gt;
&amp;nbsp; v_ErrTrack := 1;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; OPEN rc_RowIDs FOR&amp;nbsp; &#39;select /*+ PARALLEL 16 */ rowid,&#39;||Column_Name_in||&#39; from &#39;||Table_Owner_in||&#39;.&#39;||Table_Name_in||&#39; order by rowid&#39;;&lt;br /&gt;
&amp;nbsp; loop&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FETCH rc_RowIDs BULK COLLECT INTO c_Rows LIMIT 50000;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; v_ErrTrack := 2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- for each row&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for i in 1..c_Rows.count loop&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_String2 := &#39;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_Flag := false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- for each character in each row&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for j in 1..nvl(length(c_Rows(i).Old_Data),0) loop&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 4;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_Char := ascii(substr(c_Rows(i).Old_Data,j,1));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 5;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (v_Char&amp;lt;32 or v_Char&amp;gt;126) then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_String2 := v_String2||&#39; &#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_Flag := true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 6;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; insert into ascii_check values (Table_Owner_in,Table_Name_in,Column_Name_in,c_Rows(i).Old_RowID,j,v_Char,substr(c_Rows(i).Old_Data,1,240));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elsif v_Char=39 then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_String2 := v_String2||&#39;&#39;&#39;&#39;&#39;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_Flag := true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 6;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; insert into ascii_check values (Table_Owner_in,Table_Name_in,Column_Name_in,c_Rows(i).Old_RowID,j,v_Char,substr(c_Rows(i).Old_Data,1,240));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 7;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_String2 := v_String2||substr(c_Rows(i).Old_Data,j,1);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end if;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end loop;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 8;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if v_Flag then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_Counter := v_Counter +1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if Testing_in =&#39;FALSE&#39; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 9;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_Err_Rowid := c_Rows(i).Old_RowID;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; begin&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; execute immediate &#39;update &#39;||Table_Owner_in||&#39;.&#39;||Table_Name_in||&#39; set &#39;||Column_Name_in||&#39;=&#39;&#39;&#39;||v_String2||&#39;&#39;&#39; where rowid=&#39;&#39;&#39;||c_Rows(i).Old_RowID||&#39;&#39;&#39;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exception&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; when DUP_VAL_ON_INDEX then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; execute immediate &#39;update &#39;||Table_Owner_in||&#39;.&#39;||Table_Name_in||&#39; set &#39;||Column_Name_in||&#39;=&#39;&#39;EDITED-&#39;||v_String2||&#39;&#39;&#39; where rowid=&#39;&#39;&#39;||c_Rows(i).Old_RowID||&#39;&#39;&#39;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --insert into ascii_check values (Table_Owner_in,Table_Name_in, Column_Name_in, v_Err_Rowid, -1,-1,v_ErrTrack||&#39;-&#39;||v_String2);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_Flag2 := False;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end if;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end if;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v_ErrTrack := 10;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; end loop;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; v_ErrTrack := 11;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; exit when c_Rows.count &amp;lt; 50000;&lt;br /&gt;
&amp;nbsp; end loop;&lt;br /&gt;
&amp;nbsp; close rc_RowIDs;&lt;br /&gt;
&amp;nbsp; dbms_output.put_line(&#39;There were &#39;||v_Counter||&#39; issues detected.&#39;);&lt;br /&gt;
&amp;nbsp; if v_Flag2 then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; insert into ascii_check values (Table_Owner_in,Table_Name_in,Column_Name_in,&#39;&#39;,-1,-1,&#39;Completed Successfully.&#39;);&lt;br /&gt;
&amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; insert into ascii_check values (Table_Owner_in,Table_Name_in,Column_Name_in,&#39;&#39;,-1,-1,&#39;Completed Unsuccessfully.&#39;);&lt;br /&gt;
&amp;nbsp; end if;&amp;nbsp; &lt;br /&gt;
&amp;nbsp; commit;&lt;br /&gt;
exception&lt;br /&gt;
&amp;nbsp; when already_completed then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dbms_output.put_line(&#39;Already completed.&amp;nbsp; Exiting...&#39;);&lt;br /&gt;
&amp;nbsp; when others then&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; v_Errm := sqlerrm;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dbms_output.put_line(v_Errm||&#39;@&#39;||v_ErrTrack);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; insert into ascii_check values (Table_Owner_in,Table_Name_in, Column_Name_in, substr(v_Errm,1,240), -1,-1,v_ErrTrack||&#39;-&#39;||v_String2||&#39;-&#39;||v_Err_Rowid);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; commit;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; close rc_RowIDs;&amp;nbsp;&lt;br /&gt;
end;&lt;br /&gt;
/&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/522471790173910069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/08/data-cleanup-how-to-exercise-ghost-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/522471790173910069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/522471790173910069'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/08/data-cleanup-how-to-exercise-ghost-from.html' title='Data Cleanup (how to exercise the ghost from the machine)'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-2991729326610688763</id><published>2019-07-23T08:28:00.002-07:00</published><updated>2019-08-07T14:35:41.875-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data Warehouse"/><category scheme="http://www.blogger.com/atom/ns#" term="dimension"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamic query"/><category scheme="http://www.blogger.com/atom/ns#" term="fact"/><category scheme="http://www.blogger.com/atom/ns#" term="goldengate"/><category scheme="http://www.blogger.com/atom/ns#" term="growth"/><category scheme="http://www.blogger.com/atom/ns#" term="oem"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="planning"/><category scheme="http://www.blogger.com/atom/ns#" term="storage"/><category scheme="http://www.blogger.com/atom/ns#" term="streams"/><category scheme="http://www.blogger.com/atom/ns#" term="tableau"/><category scheme="http://www.blogger.com/atom/ns#" term="tablespace size"/><category scheme="http://www.blogger.com/atom/ns#" term="utilization"/><category scheme="http://www.blogger.com/atom/ns#" term="VMware"/><title type='text'>We&#39;re using up storage too fast!  Where is all the growth coming from?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Technical challenges aside, its difficult to navigate the politics of being an Oracle DBA.&amp;nbsp; In today&#39;s world, data warehouses/data lakes are expected to ingest massive amounts of data and still perform well.&amp;nbsp; Ok, no problem...this can be done...but when the storage utilization spikes, the storage guys (who write the checks for the expensive storage arrays the data is on)...they want to know if/why they need to buy another storage array.&amp;nbsp; DBA&#39;s are expected to perform storage planning, but are rarely informed when the data owners increase utilization until after the fact.&lt;br /&gt;
&lt;br /&gt;
This question comes up pretty often...why is the database growing so fast?&amp;nbsp; Coming in to a new environment I&#39;m not familiar with...I have a bunch of scripts I usually run to get a profile of the databases.&amp;nbsp; Usually a non-technical manager wants to see a summary, so if this data can be presented graphically as part of a presentation, communication flows better, and it looks more professional.&lt;br /&gt;
&lt;br /&gt;
All the storage utilization data is being kept in the history tables...its just a matter of pulling it .&amp;nbsp; This is a dynamic query that creates a query...the results of that can be put into Excel and graphed.&amp;nbsp; Once the results are graphed, things pretty clearly jump out at you.&amp;nbsp; So...&lt;br /&gt;
&lt;br /&gt;
1. Run this query (if you aren&#39;t using 8k block size, change 8192 below to w/e you&#39;re using):&lt;br /&gt;
&lt;br /&gt;
select stmnt from (&lt;br /&gt;
select 1 o1, 0 o2, &#39;with stacked as&lt;br /&gt;
(&lt;br /&gt;
select snap_id, tablespace_id, trunc(to_date(rtime,&#39;&#39;MM/DD/YYYY HH24:MI:SS&#39;&#39;)) rtime, (tablespace_size*&lt;span style=&quot;color: red;&quot;&gt;8192&lt;/span&gt;)/1024/1024/1024 ts_size&lt;br /&gt;
from dba_hist_tbspc_space_usage tdu&lt;br /&gt;
where snap_id in (select max(snap_id) from dba_hist_tbspc_space_usage tdu2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where trunc(to_date(tdu.rtime,&#39;&#39;MM/DD/YYYY HH24:MI:SS&#39;&#39;))=trunc(to_date(tdu2.rtime,&#39;&#39;MM/DD/YYYY HH24:MI:SS&#39;&#39;)))&lt;br /&gt;
)&lt;br /&gt;
select distinct rtime,&#39;&amp;nbsp; stmnt from dual&lt;br /&gt;
union all&lt;br /&gt;
select 2, TS#,&#39;(select ts_size from stacked s2 where s2.tablespace_id=&#39;||TS#||&#39; and s1.rtime=s2.rtime and rownum=1) as &quot;&#39;||NAME||&#39;&quot;&#39;||decode((tsm-ts#),0,null,&#39;,&#39;) from v$tablespace ts1 , (select max(TS#) tsm from v$tablespace) ts2&lt;br /&gt;
union all&lt;br /&gt;
select 3,0,&#39;from stacked s1&lt;br /&gt;
&amp;nbsp;where (select ts_size from stacked s2 where s2.tablespace_id=0 and s1.rtime=s2.rtime) is not null;&#39; from dual&lt;br /&gt;
&amp;nbsp;) order by o1,o2;&lt;br /&gt;
&lt;br /&gt;
2. Take the output of that query, and run it.&amp;nbsp; It&#39;ll create a very wide data set with daily storage size data for each tablespace.&lt;br /&gt;
&lt;br /&gt;
3. Cut/Paste and put that data into Excel.&lt;br /&gt;
&lt;br /&gt;
4. Select the data columns in Excel and at the top, select insert, then on the &quot;Charts&quot; group, select your favorite chart type...&quot;2-D, stacked area&quot; works well for this data, IMHO.&lt;br /&gt;
&lt;br /&gt;
You should now see something like this (GB on the Y axis):&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpBTLanq-oityuNAZpGnb83D0UXAyfDYeZdvIzBfNvCsBpl2uc7hXJg-wQi7IQ23wbHsY5vsDlRFAV3fL_nnB_BLmp3XDI2VKgU8IGsp4Dh9pLCH4Ofra7OKu2MHoVM-5iN_Un1Jq5DD0/s1600/Swamp.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;810&quot; data-original-width=&quot;1600&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpBTLanq-oityuNAZpGnb83D0UXAyfDYeZdvIzBfNvCsBpl2uc7hXJg-wQi7IQ23wbHsY5vsDlRFAV3fL_nnB_BLmp3XDI2VKgU8IGsp4Dh9pLCH4Ofra7OKu2MHoVM-5iN_Un1Jq5DD0/s1600/Swamp.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
...so now its clear where the acceleration in growth came from.&amp;nbsp; The relatively new, orange &quot;troublemaker_data&quot; tablespace had a ~10TB growth spurt until May 1st, where it looks like it leveled off.&amp;nbsp; This empowers you to go after the data owners and ask them if this will continue, and you can tell the storage guys there was growth but it settled down and they don&#39;t need to panic and buy more storage.&lt;br /&gt;
&lt;br /&gt;
I hope this helps you with your storage planning!&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/2991729326610688763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/07/were-using-up-storage-too-fastwhere-is.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/2991729326610688763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/2991729326610688763'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/07/were-using-up-storage-too-fastwhere-is.html' title='We&#39;re using up storage too fast!  Where is all the growth coming from?'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpBTLanq-oityuNAZpGnb83D0UXAyfDYeZdvIzBfNvCsBpl2uc7hXJg-wQi7IQ23wbHsY5vsDlRFAV3fL_nnB_BLmp3XDI2VKgU8IGsp4Dh9pLCH4Ofra7OKu2MHoVM-5iN_Un1Jq5DD0/s72-c/Swamp.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-1507157698432159818</id><published>2019-07-22T09:08:00.003-07:00</published><updated>2019-07-25T07:46:22.642-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle 12.1.0.2 PSU  29141015 25107334 ORA-65108 cursor restore recover open mount patch Jan Apr"/><title type='text'>Watch out for the latest 12.1 PSU/proactive patches!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
We all have horror stories about &quot;That one time, when we restored and recovered the database, and the CIO was calling out managers every few minutes, reminding them the company is at a stand-still...this is costing us $XXX,XXX per minute!!!!!&quot;&amp;nbsp; Now imagine after a few hours in to your restore you have to say, &quot;We hit a bug. We have to open an SR, get a patch and start over.&quot;&amp;nbsp; Discovering you can&#39;t successfully restore/recover when the heat is on due to a bug would make a great horror movie...nothing is more scary.&amp;nbsp; Luckily I hit this bug during a restore test...so I had some time to deal with it...but I thought I should let everybody know about it.&lt;br /&gt;
&lt;br /&gt;
I know a lot of people are still running 12.1.0.2.&amp;nbsp; The Jan and Apr 2019 PSU (the two latest PSU&#39;s) introduce a bug (25107334) that cause you to be unable to open the database.&amp;nbsp; I hit this 3 hours into a restore:&lt;br /&gt;
&lt;br /&gt;
ORA-65108: invalid use of a cursor belonging to another container&lt;br /&gt;
&lt;br /&gt;
The work around is that you manually put the $SEED database into read-only mode.&amp;nbsp; Simple enough...but if you&#39;re restoring/recovering a database, that&#39;s not a option.&amp;nbsp; There&#39;s now a patch (25107334), that solves the issue.&amp;nbsp; While waiting for MOS to come up with a solution, I used a 19.3 home to restore the database, and it worked fine...so that&#39;s an optional work-around too.&lt;br /&gt;
&lt;br /&gt;
As people migrate to 19.3, there are earlier bugs that prevent 12.1 from working with a 19.3 GI...those bugs are fixed in these PSU&#39;s...so patching 12.1.0.2 needs to be part of the 19.3 upgrade plan, and this patch needs to be part of the 12.1.0.2 patch.&lt;br /&gt;
&lt;br /&gt;
Hopefully this will be part of future PSU/proactive patch bundles...and we can keep the nightmares in the movies!&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
/*+ UPDATE */&lt;br /&gt;
The July PSU is out (12.1.0.2.190716) and per (&lt;span style=&quot;background-color: white; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: 14.3px; font-weight: 700; text-align: right;&quot;&gt;1924126.1),&amp;nbsp;&lt;/span&gt;25107334 is fixed in that PSU.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/1507157698432159818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/07/watch-out-for-latest-121-psuproactive.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/1507157698432159818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/1507157698432159818'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/07/watch-out-for-latest-121-psuproactive.html' title='Watch out for the latest 12.1 PSU/proactive patches!'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-2640808366181214685</id><published>2019-07-22T08:49:00.001-07:00</published><updated>2019-07-22T09:21:36.713-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle 11.2.0.4 12.1 19.3 18.3 RHEL7 RHEL6 Support OS upgrade Grid ASM"/><title type='text'>Upgrade to Oracle 19.3!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Oracle has postponed End of Support for 11.2.0.4 many, many times, but no mas!&amp;nbsp; In fact, if you&#39;re running EBS, 11.2.0.4 is STILL supported with extended support fees waived, almost 11 years after its initial release.&amp;nbsp; I know a couple of large EBS shops that are still running on 11.2.0.4.&amp;nbsp; To upgrade the database for EBS is a huge task...so its understandable why they&#39;d put this off as long as possible...but time is running out. See&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; font-weight: 700; text-align: right;&quot;&gt;742060.1 &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; text-align: right;&quot;&gt;for details.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; text-align: right;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif; text-align: right;&quot;&gt;Also, 12.1 premier support ran out almost a year ago, but I know there are a lot of people still running critical databases on that version.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
At this point, everybody is aware that Oracle changed their naming convention...so you can think of 19.3 really being 12.2.X.&amp;nbsp; There are *many* great new features in 19.3...its the terminal release of Oracle 12.2.&amp;nbsp; Oracle recommends you not upgrade at this point to anything other that 19c.&amp;nbsp; I&#39;ve heard rumors that the next db version that&#39;ll be supported for EBS is 19.3 (currently the max is 12.1...they&#39;re skipping 12.2 and 18.3.)&lt;br /&gt;
&lt;br /&gt;
So its inevitable...you&#39;re going to go to 19c.&amp;nbsp; Here&#39;s are some things to keep in mind:&lt;br /&gt;
&lt;br /&gt;
1. In order to upgrade your database to 19.3, you...of course...need to upgrade your ASM&#39;s Grid Infrastructure to 19.3&lt;br /&gt;
&lt;br /&gt;
2. In order to upgrade your Grid Infrastructure to 19.3, (assuming you&#39;re on RHEL) you MUST be on RHEL 7.&amp;nbsp; 18.X was fine with RHEL 6, but 19.3 requires RHEL 7.&lt;br /&gt;
&lt;br /&gt;
3. There are a lot of changes in the OS requirements.&amp;nbsp; Make sure you review/verify the install documentation before you install it.&lt;br /&gt;
&lt;br /&gt;
I&#39;ll post more about the changes in the 19.3 upgrade process later.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #fafafa; color: #003d5b; font-family: &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #fafafa; color: #003d5b; font-family: &amp;quot;tahoma&amp;quot; , &amp;quot;verdana&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/2640808366181214685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/07/upgrade-to-oracle-193.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/2640808366181214685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/2640808366181214685'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/07/upgrade-to-oracle-193.html' title='Upgrade to Oracle 19.3!'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-8817996196520033783</id><published>2019-04-26T10:59:00.000-07:00</published><updated>2019-07-22T09:26:21.431-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle 19.3 Redhat 7 Suse OEL linux upgrade database"/><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;19c Linux x86-64&amp;nbsp;&amp;nbsp;for on-prem/non-Exadata is available for download!&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&lt;a href=&quot;https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle19c-linux-5462157.html&quot;&gt;https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle19c-linux-5462157.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;Some interesting things to know...&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1. Its available as the traditional download or as an RPM to download.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;2. Just like the Exadata version that requires OEL 7, the on-prem version&amp;nbsp;requires:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OEL 7.4, UEK 4 (4.1.12-112.16.7+)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;OEL 7.4, UEK 5 (4.14.35-1818.1.6+)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OEL 7.4, RH Compat (3.10.0-693.5.2.0.1+)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RHEL 7.4+ (3.10.0-693.5.2.0.1+)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUSE ES 12 SP3 (4.4.103-92.56+)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;Have fun!&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0in 0in 0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/8817996196520033783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/04/19c-linux-x86-64-on-premnon-exadata-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/8817996196520033783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/8817996196520033783'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/04/19c-linux-x86-64-on-premnon-exadata-is.html' title=''/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-8298221478821690376</id><published>2019-04-12T13:46:00.003-07:00</published><updated>2019-07-22T09:49:51.120-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle Support 11.2 12.2 19.2 19.3 EBS E-Business Suite"/><title type='text'>Yet one more End Of Support date push for 11.2.0.4</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If you haven&#39;t heard, on 1/26 Oracle updated their release/end of life document (742060.1) to say Extended Support fees have been waived through 12/31/2018. &amp;nbsp;I understand Oracle trying to work with their customers, but a lot of people took that to mean, &quot;Great, I can postpone working on this upgrade.&quot;&lt;br /&gt;
&lt;br /&gt;
12.1.0.2 has been around since 7/22/2014, so we&#39;re coming up to 3 years to plan and execute an upgrade. &amp;nbsp;11.2 has been around since 9/1/2010...the terminal patchset isn&#39;t as old, but 7 years for a database is an eternity.&lt;br /&gt;
&lt;br /&gt;
/* UPDATE */&lt;br /&gt;
&lt;br /&gt;
As of 4/6/2019, if you&#39;re on Oracle E-Business Suite, database 11.2 and 12.1 extended support fee waiver has been extended again through Dec 2020...Wow!&amp;nbsp; That&#39;s an extension of almost 2 years! (&lt;span style=&quot;margin: 0px;&quot;&gt;&lt;span style=&quot;border: 1pt; color: black; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 11.5pt; margin: 0px; padding: 0in;&quot;&gt;&lt;b&gt;2522948.1)&amp;nbsp; &lt;/b&gt;That means 11.2 will have had a 10+year supported run!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
This is understandable since I&#39;ve heard Oracle is skipping 12.2 database support, and 18.3 isn&#39;t the &quot;long-term&quot; version (and 12.2 and 18.X) isn&#39;t going to be supported by EBS.&amp;nbsp; This means the database version you would need to upgrade to for EBS is 19.2.&amp;nbsp; Unfortunately, 19.2 isn&#39;t available yet for non-Exadata/ODA, so there&#39;s nothing to upgrade to for the majority of EBS customers.&amp;nbsp; They couldn&#39;t end support on 12.1 at the end of June and release 19.2 support for EBS at that same time.&amp;nbsp; It typically takes months to upgrade an entire EBS landscape...so...this was inevitable. &lt;br /&gt;
&lt;br /&gt;
Still, I hope you don&#39;t read this and think this grants you more time to procrastinate.&amp;nbsp; There are *a lot* of great features in 19.2!&amp;nbsp; Don&#39;t allow getting kicked off the old database version to be your primary motivation!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/8298221478821690376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2019/04/yet-one-more-end-of-support-date-push.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/8298221478821690376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/8298221478821690376'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2019/04/yet-one-more-end-of-support-date-push.html' title='Yet one more End Of Support date push for 11.2.0.4'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-728078163987852280</id><published>2018-04-27T12:00:00.002-07:00</published><updated>2018-04-27T12:00:58.124-07:00</updated><title type='text'>Poor query performance after stats were gathered?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Although the Oracle optimizer is brilliant, its not infallible.&amp;nbsp; Its vulnerability is that it depends on good table statistics to determine an optimal plan.&amp;nbsp; I optimized a query today that was projecting to use over 2PB of temp space.&amp;nbsp; It was a *horrible* plan...I started to try to rewrite it and thought...why is Oracle doing this...there isn&#39;t THAT much data.&amp;nbsp; The first thing I checked was the accuracy of the table stats...within about 10 minutes I had the query completing in ~5 seconds.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
When it comes to gathering stats, there are 2 schools of thought out there...those that gather stats frequently and those that gather stats that generate plans they&#39;re happy with, then lock them...or at least gather them much less frequently and intentionally.&lt;br /&gt;
&lt;br /&gt;
Some people believe stats should be gathered frequently to always have the optimal query performance all the time.&amp;nbsp; If the table data changes sizes dramatically and frequently...this might be ok.&amp;nbsp; If the stats were gathered with estimates (which is commonly done), its possible that you&#39;ll gather stats based on a subset of your data that doesn&#39;t represent the whole table.&amp;nbsp; So then your stats aren&#39;t great...but even then...usually the optimizer gets the right plan or a plan that&#39;s &quot;close enough&quot; that it doesn&#39;t cause any pain.&amp;nbsp; Jonathan Lewis points out in &quot;The Cost-Based Optimizer&quot; (great book, by the way), that one of the primary purposes of table statistics are to mathematically create relativity between the table row counts in a join.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
This means, if the largest table in a join today is the largest table tomorrow...ie: if you have 1mil rows today and it grows to 2 mil rows, you probably don&#39;t want your plan to change and so you don&#39;t need to regather stats.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say the 1mil row table becomes a 1 row table, you could regather stats and get a new plan and everything would be great.&amp;nbsp; The next day a data load brings it up to 10 mil rows...suddenly the plan that ran great isn&#39;t finishing in its SLA.&amp;nbsp; A good plan for a query today isn&#39;t necessarily a good plan tomorrow.&lt;br /&gt;
&lt;br /&gt;
My opinion is...if your table sizes fluctuate, you probably want to gather stats when the tables are large and lock them, which will cause your plans to be stable.&amp;nbsp; If the table is much smaller tomorrow, your plan might not be optimal, but it won&#39;t be worse than it is today...so you&#39;ll have ~ consistency in run time performance (and you meet your SLA&#39;s.)&lt;br /&gt;
&lt;br /&gt;
Oracle has made great strides to improve this...with 12.1&#39;s&amp;nbsp;OPTIMIZER_ADAPTIVE_FEATURES and 12.2&#39;s OPTIMIZER_ADAPTIVE_STATISTICS, Oracle will correct itself with statistics feedback...which will prevent you from &quot;falling off the temp usage cliff.&quot;&amp;nbsp; Although these features are great...it would be better to not have a problem that needs to be corrected in the first place.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Since these problems are usually on complex views (on views, on views, on views...ets...)&amp;nbsp; Here&#39;s a little query you can run to find the dependencies of the top level view, gather stats on its tables/indexes, and lock them (so the problem doesn&#39;t happen again.)&amp;nbsp; I&#39;m gathering them w/null est % (ie:compute)...adjust that and the degree/method_opt to fit your needs.&amp;nbsp; This should generate pretty good stats and lock them, allowing the optimizer to make its brilliant decisions once again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
select&lt;br /&gt;
&amp;nbsp; distinct &#39;begin&#39;||chr(13)||&#39;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;SYS.DBMS_STATS.GATHER_TABLE_STATS (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ownname=&amp;gt;&#39;&#39;&#39;||o2.owner||&#39;&#39;&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; tabname=&amp;gt;&#39;&#39;&#39;||o2.object_name||&#39;&#39;&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; estimate_percent&amp;nbsp; =&amp;gt; NULL,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; method_opt=&amp;gt; &#39;&#39;FOR ALL INDEXED COLUMNS SIZE AUTO &#39;&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; degree&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; 32,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; cascade&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; TRUE,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; no_invalidate&amp;nbsp; =&amp;gt; FALSE);&#39;||chr(13)||&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;end;&#39;||chr(13)||&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &#39;exec dbms_stats.lock_table_stats(&#39;&#39;&#39;||o2.owner||&#39;&#39;&#39;,&#39;&#39;&#39;||o2.object_name||&#39;&#39;&#39;);&#39;&lt;br /&gt;
from&amp;nbsp; &amp;nbsp;sys.dba_objects o1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sys.dba_objects o2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; (Select object_id, referenced_object_id&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from&amp;nbsp; &amp;nbsp;(select object_id, referenced_object_id&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from&amp;nbsp; &amp;nbsp;public_dependency&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;where&amp;nbsp; referenced_object_id &amp;lt;&amp;gt; object_id) pd&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;start with&amp;nbsp; object_id = (select object_id from dba_objects where object_name=&#39;YOUR_TABLE_NAME&#39; and owner=&#39;YOUR_TABLE_OWNER&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;connect by nocycle prior referenced_object_id =&amp;nbsp; object_id) o3&lt;br /&gt;
where o1.object_id = o3.object_id&lt;br /&gt;
and&amp;nbsp; &amp;nbsp;o2.object_id = o3.referenced_object_id&lt;br /&gt;
and o2.object_type=&#39;TABLE&#39;&lt;br /&gt;
and&amp;nbsp; &amp;nbsp;o1.owner not in (&#39;SYS&#39;, &#39;SYSTEM&#39;)&lt;br /&gt;
and&amp;nbsp; &amp;nbsp;o2.owner not in (&#39;SYS&#39;, &#39;SYSTEM&#39;)&lt;br /&gt;
and&amp;nbsp; &amp;nbsp;o1.object_name &amp;lt;&amp;gt; &#39;DUAL&#39;&lt;br /&gt;
and&amp;nbsp; &amp;nbsp;o2.object_name &amp;lt;&amp;gt; &#39;DUAL&#39;;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/728078163987852280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2018/04/poor-query-performance-after-stats-were.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/728078163987852280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/728078163987852280'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2018/04/poor-query-performance-after-stats-were.html' title='Poor query performance after stats were gathered?'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-7336400596548127501</id><published>2017-08-24T14:22:00.000-07:00</published><updated>2017-08-24T14:22:20.185-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EMC"/><category scheme="http://www.blogger.com/atom/ns#" term="eNAS"/><category scheme="http://www.blogger.com/atom/ns#" term="latency"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="storage"/><category scheme="http://www.blogger.com/atom/ns#" term="throughput"/><category scheme="http://www.blogger.com/atom/ns#" term="VMAX"/><title type='text'>Effect of MBPS vs Latency</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I do *a lot* of performance testing on high performance storage arrays for multiple vendors.&amp;nbsp; Usually if I&#39;m involved, the client is expecting to put mission critical databases on their new expensive storage, and they need to know it performs well enough to meet their needs.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
So...parsing that out...&quot;meet their needs&quot;...means different things to different people.&amp;nbsp; Most businesses are cyclical, so the performance they need today is likely not the performance they need at their peek.&amp;nbsp; For example...Amazon does much more business the day after Thanksgiving than they do in a random&amp;nbsp;day in May.&amp;nbsp; If you gather the usage stats being used in&amp;nbsp;May and size it appropriately, you&#39;re going to get a call in a few months when performance is exposed.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Before I talk about latency, let me just say AWR does a great job of keeping performance data, if you have your data kept long enough...preferably at least 2 business cycles so you can do comparisons and projections.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
This statement will keep AWR data for 3 years, capturing it at an aggressive 15 minute interval:&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
execute dbms_workload_repository.modify_snapshot_settings (interval =&amp;gt; 15,retention =&amp;gt; 1576800);&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
...at that point, &lt;a href=&quot;http://otipstricks.blogspot.com/2012/03/iops-requirements.html&quot; target=&quot;_blank&quot;&gt;see my other post re:gathering IOPS and Throughput requirements&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Anyway, I often have discussions with people who don&#39;t understand the effect of latency on OLTP databases.&amp;nbsp; This is a overly-focused serial example, but its enough to make the point.&amp;nbsp; Think about this...let&#39;s say you have a normal 8K block Oracle database using Netapp or EMC NFS on an active-active&amp;nbsp;10Gb network.&amp;nbsp; Let&#39;s say your amazing all-SSD storage array is capable of flowing 10Gb between multiple paths.&amp;nbsp;&amp;nbsp; So...the time to move 8K over a 10Gb pipe is...&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Throughput...&lt;br /&gt;
10Gb/s=10485760Kb/s&lt;br /&gt;
(8Kb/s)/(10485760Kb/s)=0.000000762939453125 seconds to copy 8Kb over the 10Gb pipe.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Latency...by the time it passes through your FC network, gets processed by the storage array, gets retrieved from disk, and makes it back to your server&amp;nbsp;can easily exceed a few ms...but for fun let&#39;s say we&#39;re getting an 8ms response time.&amp;nbsp; That&#39;s .008 seconds.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
.008/0.000000762939453125=10,485.76...&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
...so the effect of latency on your block is 10,485X greater than the effect of throughput.&amp;nbsp; If your throughput magically got faster but your latency stayed the same...performance wouldn&#39;t really improve very much.&amp;nbsp; If you went from 8ms to 5ms, on the other hand, this would have a huge effect on your database performance.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
There&#39;s a lot that can affect latency...usually the features in use on the storage array play a big part.&amp;nbsp; CPU utilization on the storage array can become too high.&amp;nbsp; This is ultra complicated for the storage array guys to diagnose.&amp;nbsp; On EMC VMAX3&#39;s for example, CPU is allocated to &quot;pools&quot; for different features.&amp;nbsp; So...even though you may not use eNAS, by default, you allocate a lot of your VMAX CPU cores to it.&amp;nbsp; When your FC traffic pegs its cores and&amp;nbsp;latency tanks...the administrator may think to look at the&amp;nbsp;CPU utilization and not see an issue...there&#39;s free CPU available...just not in the pool used for the FC front end cores, so it creates a bottleneck.&amp;nbsp; Awesome performance improvements are possible by working closely with your storage vendor to reduce latency during testing...about 6 months ago I worked with a team that achieved improvements by over 50% from the standard VMAX3 as delivered by adjusting those allocations.&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
All this to say...Latency is very important for common OLTP databases.&amp;nbsp; Don&#39;t ignore throughput, but don&#39;t focus on it.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/7336400596548127501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2017/08/effect-of-mbps-vs-latency.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/7336400596548127501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/7336400596548127501'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2017/08/effect-of-mbps-vs-latency.html' title='Effect of MBPS vs Latency'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-6976392871244762316</id><published>2017-08-24T08:52:00.000-07:00</published><updated>2017-08-24T14:26:09.728-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="11.2"/><category scheme="http://www.blogger.com/atom/ns#" term="11g"/><category scheme="http://www.blogger.com/atom/ns#" term="12.1"/><category scheme="http://www.blogger.com/atom/ns#" term="12.2"/><category scheme="http://www.blogger.com/atom/ns#" term="12c"/><category scheme="http://www.blogger.com/atom/ns#" term="adop"/><category scheme="http://www.blogger.com/atom/ns#" term="datapump"/><category scheme="http://www.blogger.com/atom/ns#" term="db cache advice"/><category scheme="http://www.blogger.com/atom/ns#" term="exp"/><category scheme="http://www.blogger.com/atom/ns#" term="export"/><category scheme="http://www.blogger.com/atom/ns#" term="imp"/><category scheme="http://www.blogger.com/atom/ns#" term="import"/><category scheme="http://www.blogger.com/atom/ns#" term="memory settings"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="sga"/><category scheme="http://www.blogger.com/atom/ns#" term="speed"/><category scheme="http://www.blogger.com/atom/ns#" term="streams"/><category scheme="http://www.blogger.com/atom/ns#" term="streams_pool"/><title type='text'>The last secret tweak for improving datapump performance (Part 2)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving.html&quot; target=&quot;_blank&quot;&gt;In my previous post&lt;/a&gt;, I mentioned some of the common datapump performance tweaks we see.&amp;nbsp; In this one, I want to talk about one that&#39;s never mentioned, and it might be the best of all.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5.&amp;nbsp; ADOP - The last tweak...I don&#39;t think I&#39;ve seen any blog posts or Oracle documentation about this as it applies to datapump...is ADOP-Auto degree of parallelization.&amp;nbsp; This can be a *huge*...by 4X or more...improvement on imports, which is typically where most of your datapump time is spent.&amp;nbsp; This has been around since 11.2, but until recently (12.1,12.2) its been a little difficult to control how parallel things would run at.&amp;nbsp;&amp;nbsp;To enable it, you simply set:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
parallel_degree_policy=auto&lt;br /&gt;
parallel_min_time_threshold=60 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(which means, if the optimizer thinks this statement will take more than 60 seconds, it will consider parallelizing it)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is nice because quick queries will run without the overhead of parallelism, and long running queries might find value in parallelism.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Today in 12c, we have the parallel_degree_level parameter, but in 11.2 we could tweak the parallelism by adjusting max_pmbps in sys.resource_io_calibrate$.&amp;nbsp; From my testing, 200=~parallel 2 or 3.&amp;nbsp; A SMALLER value increases the amount of parallelism (50=~parallel 20.)&amp;nbsp; Effectively this gives us the same effect as the new 12c feature...which is to make Oracle make rational decisions on how parallel the auto parallelism should be.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Datapump is a logical copy (as opposed to a physical backup/restore) so it can&#39;t copy the original indexes, it has to rebuild them.&amp;nbsp; If you have a typical import with 10,000 tables and indexes, the last 100 are big, the last 10 are huge.&amp;nbsp; Datapump&#39;s parallelism will rip through the small objects very quickly, with one process per object.&amp;nbsp; When the time comes to rebuild the indexes on the huge tables, datapump will again assign one process per index rebuild.&amp;nbsp; When the create index statement is analyzed by the optimizer, it will create it in parallel based on the algorithm derived from max_pmbps&amp;nbsp;&amp;nbsp;(even though the create index statement may be parallel 2 or noparallel).&amp;nbsp; This will save many hours on a large datapump import.&amp;nbsp; Its crazy to see a serialized create index statement with 50 busy parallel slaves...but that&#39;s what can happen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When its done, the indexes all have the original parallel spec they started with.&amp;nbsp; Nothing is any different than it would have been if you hadn&#39;t used ADOP (other than it was done much, much faster.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One word of caution:&amp;nbsp; You have to watch your system resources and parallel limits.&amp;nbsp; If you have datapump running at parallel 50, that means potentially you&#39;ll be rebuilding 50 indexes simultaneously.&amp;nbsp; If they&#39;re each &quot;large&quot; and the optimizer thinks they&#39;ll take over [parallel_min_time_threshold] seconds to rebuild, each of them could be built parallel and you could have hundreds (datapump 50 * adop 50) of parallel processes.&amp;nbsp; This is a wonderful thing if your system can handle it.&amp;nbsp; Depending on your parallel limit parameters, ADOP may queue the statements until you have enough parallel processes...to prevent the system from overloading.&amp;nbsp; IMHO, that&#39;s also a wonderful thing, but it may be unexpected.&amp;nbsp; The truly unfortunate situation is when you have them too high.&amp;nbsp; You&#39;ll use up your server resources and inefficiently use CPU...and may even swap if you run low on RAM.&amp;nbsp; So test!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
...but that&#39;s what dry runs are for.&amp;nbsp; I hope this last tweak helps you.&amp;nbsp; I&#39;ve seen it make miraculous&amp;nbsp;differences meeting otherwise impossible SLA&#39;s for datapump export/imports.&amp;nbsp; Two other posts you may want to read are:&lt;br /&gt;
1. &lt;a href=&quot;https://www.pythian.com/blog/secrets-of-oracles-automatic-degree-of-parallelism/&quot; target=&quot;_blank&quot;&gt;Gwen Shapira has the best post on it, IMHO)&lt;/a&gt;&lt;br /&gt;
2. &lt;a href=&quot;http://kerryosborne.oracle-guy.com/2013/07/12c-auto-dop-parallel_degree_level/&quot; target=&quot;_blank&quot;&gt;Kerry Osborne has a nice post on the 12c changes.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Previous post -&amp;gt; &lt;a href=&quot;http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving.html&quot; target=&quot;_blank&quot;&gt;The last secret tweak for improving datapump performance (Part 1)&lt;/a&gt;&lt;br /&gt;
This post -&amp;gt; &lt;a href=&quot;http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving_24.html&quot; target=&quot;_blank&quot;&gt;The last secret tweak for improving datapump performance (Part 2)&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/6976392871244762316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving_24.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6976392871244762316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/6976392871244762316'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving_24.html' title='The last secret tweak for improving datapump performance (Part 2)'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-5764618631397119673</id><published>2017-08-24T08:51:00.000-07:00</published><updated>2017-08-24T13:34:02.186-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="11.2"/><category scheme="http://www.blogger.com/atom/ns#" term="11g"/><category scheme="http://www.blogger.com/atom/ns#" term="12.1"/><category scheme="http://www.blogger.com/atom/ns#" term="12.2"/><category scheme="http://www.blogger.com/atom/ns#" term="12c"/><category scheme="http://www.blogger.com/atom/ns#" term="adop"/><category scheme="http://www.blogger.com/atom/ns#" term="datapump"/><category scheme="http://www.blogger.com/atom/ns#" term="db cache advice"/><category scheme="http://www.blogger.com/atom/ns#" term="exp"/><category scheme="http://www.blogger.com/atom/ns#" term="export"/><category scheme="http://www.blogger.com/atom/ns#" term="imp"/><category scheme="http://www.blogger.com/atom/ns#" term="import"/><category scheme="http://www.blogger.com/atom/ns#" term="memory settings"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel"/><category scheme="http://www.blogger.com/atom/ns#" term="performance"/><category scheme="http://www.blogger.com/atom/ns#" term="sga"/><category scheme="http://www.blogger.com/atom/ns#" term="speed"/><category scheme="http://www.blogger.com/atom/ns#" term="streams"/><category scheme="http://www.blogger.com/atom/ns#" term="streams_pool"/><title type='text'>The last secret tweak for improving datapump performance (Part 1)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
There are 10,000 blog posts and oracle docs on the internets (thank you, Mr Bush) for improving datapump performance.&amp;nbsp; This is one of the features used very frequently in Oracle shops around the world.&amp;nbsp; And DBA&#39;s are under huge stress to meet impossible downtime SLA&#39;s for their export/import. I think they all miss the best tweak (ADOP)...but they basically summarize to&amp;nbsp;one simple fact...outside of parallelism, if you have a well-tuned database on fast storage, there&#39;s not a lot more you can do to improve performance more than a few percentage.&amp;nbsp; The obvious improvements are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Parallelize!&amp;nbsp;To quote&amp;nbsp;Vizzini, &quot;I do not think&amp;nbsp;it means what you think it means.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will create multiple processes and each will take&amp;nbsp;one object and work with it, each one serialized (usually).&amp;nbsp; This is great,&amp;nbsp;and if all your objects are&amp;nbsp;equally sized, this is perfect...but that&#39;s not typically&amp;nbsp;reality.&amp;nbsp; Usually you have a few objects that are much bigger than the rest and each of them&amp;nbsp;by default will only get a single process.&amp;nbsp; This limit really hurts&amp;nbsp;during imports, when you need to rebuild large indexes...more on this later.&lt;br /&gt;
&lt;br /&gt;
Check that its working as expected by hitting control-c and typing in status.&amp;nbsp; Ideally, you should see all parallel slaves working.&amp;nbsp; Check not just that they exist, but that they&#39;re working (verify you used %U in your dump filename if they aren&#39;t.)&amp;nbsp; ie: DUMPFILE=exaexp%U.dmp PARALLEL=100&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. If you&#39;re importing into a new database, you have the flexibility to make some temporary changes to tweak things.&amp;nbsp; Verify Disk Asynchronous IO is set to true (DISK_ASYNCH_IO=true) and disable all the block verification (DB_BLOCK_CHECK=FALSE, DB_BLOCK_CHECKSUM=FALSE)&amp;nbsp; These aren&#39;t &quot;game changers&quot; but they&#39;ll give you 10-20% improvements, depending on how you had them set previously.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Memory Settings - Datapump parallelization uses some of the streams API&#39;s, and so the streams pool is used.&amp;nbsp; Make sure you have enough memory for the shared_pool, streams_pool and the db_cache_size parameters.&amp;nbsp; Consult your gv$streams_pool_advice, gv$shared_pool_advice, gv$db_cache_advice and gv$sga_target_advice&amp;nbsp;&amp;nbsp;views.&amp;nbsp; I like to tune it so as the&amp;nbsp;delta in ESTD_DB_TIME_FACTOR from one row to the row below it approaches zero, the corresponding size of the pool is close to 1.&amp;nbsp; (Any more than that is a waste, any less than that is lost performance.)&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Sometimes you&#39;ll see a huge dropoff and its more clear than this example...but you get the idea.&amp;nbsp; If you&#39;re importing into a new database, you&#39;ll need to run the import dry run and then check these views to make sure this is tuned well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 540px;&quot;&gt;

 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 2730; mso-width-source: userset; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 4664; mso-width-source: userset; width: 98pt;&quot; width=&quot;131&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 3925; mso-width-source: userset; width: 83pt;&quot; width=&quot;110&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 5603; mso-width-source: userset; width: 118pt;&quot; width=&quot;158&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;/col&gt;
 &lt;tbody&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt; width: 58pt;&quot; width=&quot;77&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;SGA_SIZE&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-image: none; border: 0px black; width: 98pt;&quot; width=&quot;131&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;SGA_SIZE_FACTOR&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-image: none; border: 0px black; width: 83pt;&quot; width=&quot;110&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;ESTD_DB_TIME&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-image: none; border: 0px black; width: 118pt;&quot; width=&quot;158&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;ESTD_DB_TIME_FACTOR&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-image: none; border: 0px black; width: 48pt;&quot; width=&quot;64&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;Time Factor Diff&lt;/span&gt;&lt;/strong&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;158720&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.5&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;12162648&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.2045&lt;/span&gt;&lt;/td&gt;
  &lt;td style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;178560&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.5625&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;11421479&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.1311&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0734&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;198400&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.625&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;10937800&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.0832&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0479&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;218240&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.6875&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;10607608&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.0505&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0327&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;238080&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.75&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;10604578&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.0502&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0003&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;257920&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.8125&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;10375361&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.0275&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0227&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;277760&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.875&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;10222886&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.0124&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0151&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;297600&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.9375&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;10101716&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.0004&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.012&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;317440&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;10097674&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0004&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;337280&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.0625&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;10017905&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.9921&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0079&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;357120&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.125&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;9955300&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.9859&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0062&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;376960&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.1875&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;9908850&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.9813&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0046&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;396800&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.25&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;9905821&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.981&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0003&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;416640&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.3125&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;9870479&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.9775&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0035&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;436480&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.375&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;9844225&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.9749&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0026&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;456320&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.4375&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;9826049&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.9731&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0018&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td align=&quot;right&quot; height=&quot;19&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black; height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;476160&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;1.5&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;9821001&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.9726&lt;/span&gt;&lt;/td&gt;
  &lt;td align=&quot;right&quot; style=&quot;background-color: transparent; border-image: none; border: 0px black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot;;&quot;&gt;0.0005&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/colgroup&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Something often missed when importing into a new database, size your redo logs to be relatively huge.&amp;nbsp; The redo logs will work like a cache and cycle around.&amp;nbsp; Eventually if you&#39;re adding data extremely fast, the last log will fill and can&#39;t switch until the next log is cleared.&amp;nbsp; &quot;Huge&quot; is relative to the size, speed of your database and hardware.&amp;nbsp; While you&#39;re running your import, select * from v$log and make sure you see at least one &quot;inactive&quot; logs in front of the current log.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The best, virtually unused&amp;nbsp;tweak is in the next post....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;This post:&amp;nbsp; &lt;a href=&quot;http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving.html&quot; target=&quot;_blank&quot;&gt;The last secret tweak for improving datapump performance (Part 1)&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: black; display: inline; float: none; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;&quot;&gt;Next post: &lt;a href=&quot;http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving_24.html&quot; target=&quot;_blank&quot;&gt;The last secret tweak for improving datapump performance (Part 2)&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/5764618631397119673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/5764618631397119673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/5764618631397119673'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2017/08/the-last-secret-tweak-for-improving.html' title='The last secret tweak for improving datapump performance (Part 1)'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-3135078962496730011</id><published>2017-02-22T14:53:00.001-08:00</published><updated>2017-08-24T13:35:53.790-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compression"/><category scheme="http://www.blogger.com/atom/ns#" term="hp"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="storage"/><category scheme="http://www.blogger.com/atom/ns#" term="vertica"/><title type='text'>Vertica Architecture (Part 2)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This is continued from &lt;a href=&quot;http://otipstricks.blogspot.com/2017/02/vertica-capacity-architecture.html&quot; target=&quot;_blank&quot;&gt;my previous post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In review, I spoke with some very smart and experienced Vertica consultants regarding the DR architecture, and found &lt;a href=&quot;https://my.vertica.com/get-started-vertica/database-recovery/&quot; target=&quot;_blank&quot;&gt;the most obvious solutions&lt;/a&gt; all had huge drawbacks.&lt;br /&gt;
&lt;br /&gt;
1. Dual-Load: Double your license costs(?), there&#39;s also the potential to have the two clusters out of synch, which means you need to put logic in your loads to handle the possibility that a load succeeds in datacenter 1 and fails in datacenter 2.&lt;br /&gt;
2. Periodic Incremental Backups:Need identical standby system (aka, half the capacity and performance of your hardware because the standby is typically idle)&lt;br /&gt;
3. Replication solutions provided by storage vendors: The recommended design uses local storage, not storage arrays, so this is difficult to implement, in addition to the expense and the potential of replicating media failures.&lt;br /&gt;
&lt;br /&gt;
At first, here&#39;s what we did instead:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQn3_QFKpjooaFB5xIJFwMWmPBI8P3Y7AEx3fpCfCUvsic5mIoso0P-DMSjukLY847yoGSNf1NB1dCFQfx7piN5WsgLxTveVeU6LMRUK_U-Zj31qXiCm907CW8x79IgMaSRs-9ef5DlGw/s1600/Arch_Design_1.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;137&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQn3_QFKpjooaFB5xIJFwMWmPBI8P3Y7AEx3fpCfCUvsic5mIoso0P-DMSjukLY847yoGSNf1NB1dCFQfx7piN5WsgLxTveVeU6LMRUK_U-Zj31qXiCm907CW8x79IgMaSRs-9ef5DlGw/s320/Arch_Design_1.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Initially (aka don&#39;t do this), we set up 2 failgroups, 3 nodes in datacenter 1 and 3 in datacenter 2. Failgroups in Vertica are intended for use where you could have known dependencies that are transparent to Vertica...for example, a server rack. &amp;nbsp;Both failgroups are in the same cluster, and so data that&#39;s entered into nodes 1,2 or 3 get replicated automatically by Vertica to the other failgroup&#39;s nodes 4, 5 and 6.&lt;br /&gt;
&lt;br /&gt;
We were trying to protect ourselves from the possibility of a complete datacenter failure, or a WAN failure. &amp;nbsp;The WAN is a 10Gb, low latency dark fiber link with a ring design, so highly available. &amp;nbsp;Although the network is HA, the occasional &quot;blip&quot; happens, where a very brief outage causes a disconnection. &amp;nbsp;Clusters don&#39;t like disconnections.&lt;br /&gt;
&lt;br /&gt;
We were very proud of this design until we tested it...it completely failed. &amp;nbsp;It made sense...although logically we had all the data we needed in a single failgroup, if we simulated a network outage we&#39;d see all 6 nodes go down. &amp;nbsp;This is actually an intentional outcome, and a good thing. &amp;nbsp;If you&#39;ve worked with clusters before...you know its much better to have the cluster go down than to have it stay up in a &lt;a href=&quot;https://en.wikipedia.org/wiki/Split-brain_(computing)&quot; target=&quot;_blank&quot;&gt;split brain&lt;/a&gt; scenario and corrupt all your data. &amp;nbsp;If the cluster stays up and becomes out of synch, you have to fix whatever the initial issue was, and you compound the problem with the need to restore all your data.&lt;br /&gt;
&lt;br /&gt;
So...intentionally, if you have half your nodes go down, Vertica causes the whole cluster to go down, even if you have all the data you need to stay up in the surviving nodes. &amp;nbsp;Oracle RAC uses a disk voting mechanism to decide which part of the cluster stays up, but there&#39;s no such mechanism in Vertica.&lt;br /&gt;
&lt;br /&gt;
We were back to the 3 original options...all with their drawbacks. &amp;nbsp;While pouring over the documentation looking for an out-of-the-box solution, I noticed Vertica 8 introduced a new type of node called an Execute node. &amp;nbsp;Again...very little documentation on this, but I was told this was a more official way to deal with &lt;a href=&quot;http://vertica.tips/2014/08/27/how-vertica-met-facebooks-35tb-per-hour-ingest-sla/&quot; target=&quot;_blank&quot;&gt;huge ingest problems like they had at Facebook&lt;/a&gt;&amp;nbsp;(35TB/hr). &amp;nbsp;Instead of using Ephimeral nodes (nodes in transition between being up and being down) like they did, you could create execute nodes that only store the catalog...they store no other data, but only exist for the purpose of ingestion.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdiRwhp70zVUkWjQYRBZxn1SPhkrmwyMVtg6Wl0-39px9hfG89rN18ETwukk_rwGZqYOvQ8oXUtmHwAYjG2cawZ1GRpAxhGeAB9RoXzcsX2e-hiOCm00voH3cOVswY0ZaSdzx6qnGIuoc/s1600/Arch_Design_2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;193&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdiRwhp70zVUkWjQYRBZxn1SPhkrmwyMVtg6Wl0-39px9hfG89rN18ETwukk_rwGZqYOvQ8oXUtmHwAYjG2cawZ1GRpAxhGeAB9RoXzcsX2e-hiOCm00voH3cOVswY0ZaSdzx6qnGIuoc/s320/Arch_Design_2.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Upon testing, we also found Execute nodes &quot;count&quot; as a node in the cluster...so instead of having 6 nodes-3 nodes in DC1 and 3 in DC2, we&#39;d add a 7th node in a cloud (we chose Oracle&#39;s cloud.) &amp;nbsp;Its a great use case for a cloud server because it has almost no outgoing data, almost no CPU utilization (only enough to maintain the catalog) and the only IO is for the catalog. &amp;nbsp;So now, if DC1 went down, we had a quorum of 4 surviving nodes (4,5,6,7)...if DC2 went down, we still have 4 surviving nodes (1,2,3,7). &amp;nbsp;If all the nodes stayed up, but the WAN between DC1 and DC2 stopped functioning, Vertica would kill one of the failgroups and continue to function...so no risk of a split brain. &lt;br /&gt;
&lt;br /&gt;
We&#39;re continuing to test, but at this point, its performed perfectly. &amp;nbsp;This has effectively doubled our performance and capacity because we have a 6 node cluster instead of two 3 node clusters. &amp;nbsp;Its all real time, and there&#39;s no complex dual load logic to program in our application.&lt;br /&gt;
&lt;br /&gt;
Next, I&#39;ll talk about Vertica backups.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/3135078962496730011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2017/02/vertica-architecture-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/3135078962496730011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/3135078962496730011'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2017/02/vertica-architecture-part-2.html' title='Vertica Architecture (Part 2)'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQn3_QFKpjooaFB5xIJFwMWmPBI8P3Y7AEx3fpCfCUvsic5mIoso0P-DMSjukLY847yoGSNf1NB1dCFQfx7piN5WsgLxTveVeU6LMRUK_U-Zj31qXiCm907CW8x79IgMaSRs-9ef5DlGw/s72-c/Arch_Design_1.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-2728752907789373</id><published>2017-02-21T15:00:00.001-08:00</published><updated>2017-08-24T13:35:13.502-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compression"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="storage"/><category scheme="http://www.blogger.com/atom/ns#" term="vertica"/><title type='text'>Vertica Capacity Architecture</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Since nearly the first time I logged in to an Oracle database, I remember finding issues with documentation and the occasional error in documentation. &amp;nbsp;Its understandable...usually this was due to a change or a new feature that was introduced and the documentation just wasn&#39;t updated. &amp;nbsp;The real problem was in me...I was judging Oracle&#39;s documentation vs perfection...I should have lowered my expectations and appreciated what it was instead of being upset for what it wasn&#39;t.&lt;br /&gt;
&lt;br /&gt;
While evaluating and designing the architecture for an HP Vertica database for a client, I gained a new appreciation for Oracle&#39;s documentation. &amp;nbsp;I expected to find everything I needed to do a perfect Vertica cluster install across 2 data centers in an active/active configuration for DR. &amp;nbsp;When the documentation failed and I resorted to gGoogle, I mostly found people with the same questions I had and no solutions. &lt;br /&gt;
&lt;br /&gt;
Soooo...I thought I&#39;d make a few notes on what I learned and landed on. I am by no means a Vertica expert, but I&#39;ve definitely learned a lot about and I&#39;ve had the opportunity to stand on the shoulders of a few giants recently.&lt;br /&gt;
&lt;br /&gt;
Our requirement is to store 10TB of actual data, we don&#39;t know how well it will compress...so we&#39;re ignoring compression for capacity planning purposes. &amp;nbsp;How much physical storage do you need for that much data? &amp;nbsp;Vertica licensing is based on data capacity, but that&#39;s not the amount of capacity used...its the amount of data ingested. &amp;nbsp;Vertica makes &quot;projections&quot; that (in Oracle terms) I think of as self-created materialized views and aggregates that can later be used for query re-write. &amp;nbsp;Vertica will learn from your queries what it needs to do in the future to improve performance, it&#39;ll create projections and these projections use storage. &amp;nbsp;Since there&#39;s columnar compression in Vertica by default, these projections are stored efficiently...and they aren&#39;t counted toward your licensed total. &amp;nbsp;I&#39;ve heard stories that companies have had so many (200+) that the performance of importing data was hampered...these physically stored objects are updated as data is loaded. &amp;nbsp;Since projections will take up storage you have to account for that in the early design, but it completely depends on your dataset and access patterns. &amp;nbsp;Estimates based on other companies I&#39;ve spoken with are between 0% (everything is deduped) and 50% (their ETL is done in Vertica, so less deduplication), so lets say 35%.&lt;br /&gt;
&lt;br /&gt;
Also, you&#39;re strongly recommended to use local storage (raid 1+0...mirrored and striped), and the storage is replicated in multiple nodes for protection. &amp;nbsp;They call this concept &lt;a href=&quot;https://my.vertica.com/docs/7.1.x/HTML/Content/Authoring/Glossary/K-Safety.htm&quot; target=&quot;_blank&quot;&gt;k-safety&lt;/a&gt;. The idea is that you can lose &quot;k&quot; nodes, and the database would still continue to run normally. &amp;nbsp;We would run K+1 (the default).&lt;br /&gt;
&lt;br /&gt;
In order to do a rebalance (needed when you add or remove a node), the documentation suggests you have 40% capacity free. &lt;br /&gt;
&lt;br /&gt;
Also, Vertica expects you to isolate your &quot;catalog&quot; metadata from your actual data, so you need to set up one mirrored raid group with ~150GB for catalog...and OS, etc. &amp;nbsp;They give an example architecture using HP hardware with servers that have 24 slots for drives. &amp;nbsp;2 of them are used for mirroring the OS/Catalog, leaving 22 for your actual data. &amp;nbsp;Knowing SSD&#39;s are the future for storage, the systems we worked on are Cisco UCS C-series with 24 slots filled with 100% SSD&#39;s. &amp;nbsp;From the feedback from Vertica, this will help with rebuild times, but not so much with normal processing performance, since so much of Vertica is done in memory. &amp;nbsp;There&#39;s a huge price increase in $/GB between 400 and 800GB drives.&lt;br /&gt;
&lt;br /&gt;
So...if you have 6 nodes with 22 slots, each populated with 400GB SSD&#39;s, you have 52,800GB. Half that for raid 1+0=26,400. &amp;nbsp;If you have an HA architecture, you&#39;d expect to half that again (3 nodes in datacenter 1, 3 nodes in datacenter 2)...which brings you to 13,200GB. &amp;nbsp;Since you have to keep at least 40% free for a rebalance operation, that brings you down to 7,920GB. &amp;nbsp;We have to account for projections...we said the would be 35% of our dataset...which brings us to 5,148GB. &amp;nbsp;All the data in Vertica is copied to 2 nodes, so half the storage again....2,574GB.&lt;br /&gt;
&lt;br /&gt;
Hmmm...2.5TB of storage is less than our 10TB requirement. &amp;nbsp;I&#39;ll show you how we changed the design to double capacity in my next post.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/2728752907789373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2017/02/vertica-capacity-architecture.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/2728752907789373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/2728752907789373'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2017/02/vertica-capacity-architecture.html' title='Vertica Capacity Architecture'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-261379845264790415</id><published>2017-01-19T12:42:00.000-08:00</published><updated>2017-08-24T13:37:37.141-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asmlib"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="node"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="rac"/><category scheme="http://www.blogger.com/atom/ns#" term="SCSI"/><category scheme="http://www.blogger.com/atom/ns#" term="udev"/><category scheme="http://www.blogger.com/atom/ns#" term="vmdk"/><category scheme="http://www.blogger.com/atom/ns#" term="VMware"/><title type='text'>UDEV updated</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;a href=&quot;http://otipstricks.blogspot.com/2017/01/updated-vmware-6-oracle-rac-vm-create.html&quot; target=&quot;_blank&quot;&gt;In my previous post&lt;/a&gt;, I wrote about automating the creation of your Oracle RAC cluster. &amp;nbsp;One of the more complicated parts to that is using shared VMDK&#39;s and configuring UDEV to create aliases so all your RAC nodes have the same name for the same ASM disk, no matter what order udev finds the devices.&lt;br /&gt;
&lt;br /&gt;
Assuming you used the VM create script in the previous post, the prerequisites of:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;1.&amp;nbsp;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&quot;disk.EnableUUID&quot;=&quot;true&quot;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; font-size: 16px;&quot;&gt;2. Data on SCSI adapter 1, Redo on SCSI adapter 2, and FRA on SCSI adapter 3&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: inherit; font-size: 16px;&quot;&gt;3. Node equivalence&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-size: 16px;&quot;&gt;...should already be met, and this should just work. &amp;nbsp;This needs to be executed as root, and should be tested in a sandbox environment until you&#39;re confident. &amp;nbsp;I&#39;ve used it for years, but like everything on the internet, no warranties or promises implied or otherwise. &amp;nbsp;It may be found to connect to a secret government computer and play&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #252525; font-size: 14px;&quot;&gt;Global Thermonuclear War.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;#! /bin/sh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;###################################&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# Name: udev_rules.sh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# Date: 5/9/2012&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# Purpose: &amp;nbsp;This script will create all the udev rules necessary to support&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Oracle ASM for RH 5 or RH6. &amp;nbsp;It will name the aliased devices&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;appropriately for the different failgroups, based on the contoller&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;they&#39;re assigned to.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# Revisions:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# &amp;nbsp; 5/8/2012 &amp;nbsp;- JAB: Created&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# &amp;nbsp; 5/10/2012 - JAB: Will now modify the existing rules to allow the addition of a&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;single new disk.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;# &amp;nbsp; 1/8/2013 &amp;nbsp;- JAB: assorted RH6 related issues corrected.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;###################################&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;data_disk=0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;redo_disk=0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;arch_disk=0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;release_test=`lsb_release -r | awk &#39;BEGIN {FS=&quot; &quot;}{print $2}&#39; | awk &#39;BEGIN {FS=&quot;.&quot;}{print $1}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;echo &quot;Detected RH release ${release_test}&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;if [ -f &quot;/etc/udev/rules.d/99-oracle-asmdevices.rules&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; echo -e &quot;Detected a pre-existing asm rules file. &amp;nbsp;Analyzing...\c&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; for y in {1..50}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; do&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; found_data_disk=`cat /etc/udev/rules.d/99-oracle-asmdevices.rules|grep asm-data-disk${y}`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; found_redo_disk=`cat /etc/udev/rules.d/99-oracle-asmdevices.rules|grep asm-redo-disk${y}`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; found_arch_disk=`cat /etc/udev/rules.d/99-oracle-asmdevices.rules|grep asm-arch-disk${y}`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; if [ -n &quot;${found_data_disk}&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; let &quot;data_disk++&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; if [ -n &quot;${found_redo_disk}&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; let &quot;redo_disk++&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; if [ -n &quot;${found_arch_disk}&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; let &quot;arch_disk++&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; echo -e &quot;.\c&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; done&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; echo &quot;complete.&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; echo &quot;Existing rules file contains:&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; echo &quot; ASM Data Disks: ${data_disk}&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; echo &quot; ASM Redo Disks: ${redo_disk}&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; echo &quot; ASM Arch Disks: ${arch_disk}&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; new_file=&quot;false&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; echo &quot;Detected no pre-existing asm udev rules file. &amp;nbsp;Building...&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; new_file=&quot;true&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;for x in {a..z}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; if [ -n &quot;`ls /dev/sd* | grep sd${x}1 `&quot; ] ; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; asm_test1=`file -s /dev/sd${x}1 |grep &quot;/dev/sd${x}1: data&quot; `&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; asm_test2=`file -s /dev/sd${x}1 |grep &quot;Oracle ASM&quot; `&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; #echo &quot;Testing for sd${x}1 complete.&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; if [[ -n &quot;${asm_test1}&quot; || -n &quot;${asm_test2}&quot; ]] ; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; # ie: scsi_device:1:0:1:0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &quot;${release_test}&quot; = &quot;5&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; controller=`ls /sys/block/sd${x}/device|grep scsi_device | awk &#39;BEGIN {FS=&quot;:&quot;}{print $2}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result=`/sbin/scsi_id -g -u -s /block/sd${x}`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; elif [ &quot;${release_test}&quot; = &quot;6&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; controller=`ls /sys/block/sd${x}/device/scsi_device | awk &#39;BEGIN {FS=&quot;:&quot;}{print $1}&#39;`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result=`/sbin/scsi_id -g -u -d /dev/sd${x}`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &quot;${controller}&quot; = &quot;3&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ -f &quot;/etc/udev/rules.d/99-oracle-asmdevices.rules&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found_uuid=`cat /etc/udev/rules.d/99-oracle-asmdevices.rules|grep $result`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found_uuid=&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [[ -z &quot;${found_uuid}&quot; || &quot;${new_file}&quot; = &quot;true&quot; ]]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;Detected a new data disk. &amp;nbsp;Adding rule to /etc/udev/rules.d/99-oracle-asmdevices.rules&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let &quot;data_disk++&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &quot;${release_test}&quot; = &quot;5&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;KERNEL==\&quot;sd?1\&quot;, BUS==\&quot;scsi\&quot;, PROGRAM==\&quot;/sbin/scsi_id -g -u -s /block/\$parent\&quot;, RESULT==\&quot;${result}\&quot;, NAME=\&quot;asm-data-disk${data_disk}\&quot;, OWNER=\&quot;oracle\&quot;, GROUP=\&quot;dba\&quot;, MODE=\&quot;0660\&quot;&quot; &amp;gt;&amp;gt; /etc/udev/rules.d/99-oracle-asmdevices.rules&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elif [ &quot;${release_test}&quot; = &quot;6&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;KERNEL==\&quot;sd?1\&quot;, BUS==\&quot;scsi\&quot;, PROGRAM==\&quot;/sbin/scsi_id -g -u -d /dev/\$parent\&quot;, RESULT==\&quot;${result}\&quot;, NAME=\&quot;asm-data-disk${data_disk}\&quot;, OWNER=\&quot;oracle\&quot;, GROUP=\&quot;dba\&quot;, MODE=\&quot;0660\&quot;&quot; &amp;gt;&amp;gt; /etc/udev/rules.d/99-oracle-asmdevices.rules&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; elif [ &quot;${controller}&quot; = &quot;4&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ -f &quot;/etc/udev/rules.d/99-oracle-asmdevices.rules&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found_uuid=`cat /etc/udev/rules.d/99-oracle-asmdevices.rules|grep $result`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found_uuid=&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [[ -z &quot;${found_uuid}&quot; || &quot;${new_file}&quot; = &quot;true&quot; ]]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;Detected a new Redo disk. &amp;nbsp;Adding rule to /etc/udev/rules.d/99-oracle-asmdevices.rules&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let &quot;redo_disk++&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &quot;${release_test}&quot; = &quot;5&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;KERNEL==\&quot;sd?1\&quot;, BUS==\&quot;scsi\&quot;, PROGRAM==\&quot;/sbin/scsi_id -g -u -s /block/\$parent\&quot;, RESULT==\&quot;${result}\&quot;, NAME=\&quot;asm-redo-disk${redo_disk}\&quot;, OWNER=\&quot;oracle\&quot;, GROUP=\&quot;dba\&quot;, MODE=\&quot;0660\&quot;&quot; &amp;gt;&amp;gt; /etc/udev/rules.d/99-oracle-asmdevices.rules&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elif [ &quot;${release_test}&quot; = &quot;6&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;KERNEL==\&quot;sd?1\&quot;, BUS==\&quot;scsi\&quot;, PROGRAM==\&quot;/sbin/scsi_id -g -u -d /dev/\$parent\&quot;, RESULT==\&quot;${result}\&quot;, NAME=\&quot;asm-redo-disk${redo_disk}\&quot;, OWNER=\&quot;oracle\&quot;, GROUP=\&quot;dba\&quot;, MODE=\&quot;0660\&quot;&quot; &amp;gt;&amp;gt; /etc/udev/rules.d/99-oracle-asmdevices.rules&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; elif [ &quot;${controller}&quot; = &quot;5&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ -f &quot;/etc/udev/rules.d/99-oracle-asmdevices.rules&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found_uuid=`cat /etc/udev/rules.d/99-oracle-asmdevices.rules|grep $result`&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; found_uuid=&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [[ -z &quot;${found_uuid}&quot; || &quot;${new_file}&quot; = &quot;true&quot; ]]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;Detected a new Arch disk. &amp;nbsp;Adding rule to /etc/udev/rules.d/99-oracle-asmdevices.rules&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let &quot;arch_disk++&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ &quot;${release_test}&quot; = &quot;5&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;KERNEL==\&quot;sd?1\&quot;, BUS==\&quot;scsi\&quot;, PROGRAM==\&quot;/sbin/scsi_id -g -u -s /block/\$parent\&quot;, RESULT==\&quot;${result}\&quot;, NAME=\&quot;asm-arch-disk${arch_disk}\&quot;, OWNER=\&quot;oracle\&quot;, GROUP=\&quot;dba\&quot;, MODE=\&quot;0660\&quot;&quot; &amp;gt;&amp;gt; /etc/udev/rules.d/99-oracle-asmdevices.rules&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; elif [ &quot;${release_test}&quot; = &quot;6&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;KERNEL==\&quot;sd?1\&quot;, BUS==\&quot;scsi\&quot;, PROGRAM==\&quot;/sbin/scsi_id -g -u -d /dev/\$parent\&quot;, RESULT==\&quot;${result}\&quot;, NAME=\&quot;asm-arch-disk${arch_disk}\&quot;, OWNER=\&quot;oracle\&quot;, GROUP=\&quot;dba\&quot;, MODE=\&quot;0660\&quot;&quot; &amp;gt;&amp;gt; /etc/udev/rules.d/99-oracle-asmdevices.rules&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;/dev/sd${x} is not an asm disk.&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp; fi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;done&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;echo &quot;Complete.&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;trebuchet ms&amp;quot; , &amp;quot;trebuchet&amp;quot; , sans-serif;&quot;&gt;echo &quot;To see the ASM UDEV rules: cat /etc/udev/rules.d/99-oracle-asmdevices.rules&quot;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/261379845264790415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2017/01/udev-updated.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/261379845264790415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/261379845264790415'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2017/01/udev-updated.html' title='UDEV updated'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-5723911746988238212</id><published>2017-01-19T12:24:00.002-08:00</published><updated>2017-08-24T13:38:50.048-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="ovf"/><category scheme="http://www.blogger.com/atom/ns#" term="ovm"/><category scheme="http://www.blogger.com/atom/ns#" term="rac"/><category scheme="http://www.blogger.com/atom/ns#" term="Redhat"/><category scheme="http://www.blogger.com/atom/ns#" term="trump"/><category scheme="http://www.blogger.com/atom/ns#" term="VMware"/><title type='text'>Updated VMWare 6 Oracle RAC vm create script</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I don&#39;t know if its just me, but it seems like everything I need to do has an impossible timeline. &amp;nbsp;When I make VM&#39;s for testing, its SOOOO tedious to use a point-and-click interface like virtual center. In the past for large proof of concepts I&#39;ve had to create literally hundreds of VM&#39;s running RAC. To make things faster and to keep my sanity, I wrote a series of scripts to make setting up an Oracle environment nearly automated. &lt;br /&gt;
&lt;br /&gt;
The steps are: &lt;br /&gt;
1. Create the RAC node vm&#39;s (See this post below)&lt;br /&gt;
2. Install the OS via kickstart (or just boot from the OS install ISO and manually configure the OS)&lt;br /&gt;
3. Install the Oracle pre-install rpm&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - If you aren&#39;t running Oracle Enterprise Linux, or if you want to customize the UID/GID etc, click &lt;a href=&quot;http://otipstricks.blogspot.com/2016/01/how-to-modify-preinstall-rpm-for-non-oel.html&quot; target=&quot;_blank&quot;&gt;&amp;lt; HERE&amp;nbsp;&lt;here&gt;&amp;gt;&lt;/here&gt;&lt;/a&gt;&lt;br /&gt;
4. Configure udev/passwordless SSH for root/Oracle&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - For the udev part, this is automated via &lt;a href=&quot;http://otipstricks.blogspot.com/2017/01/udev-updated.html&quot; target=&quot;_blank&quot;&gt;my script here&lt;/a&gt;&lt;br /&gt;
5. For Oracle Virtual Machine, Oracle Database Appliance and Exadata, the RAC Pack wrote a wonderful script called OneCommand. &amp;nbsp;I find this to be a *huge* timesaver, so I extract that from the OVM OVF (found at edelivery.oracle.com) and modify the params.ini and netconfig.ini files.&lt;br /&gt;
&lt;br /&gt;
That&#39;s it...if you have everything prepped, depending on your hardware you can go from nothing to running a new 4 node RAC environment in about 20 minutes, with very little &quot;human&quot; time.&lt;br /&gt;
&lt;br /&gt;
A friend of mine integrated these steps into his company&#39;s internal cloud...filling in a few variables on a web page (server names, cpu, memory, storage sizes, db name, etc) he can click a button, go to lunch and when he comes back he can log in to his new cluster.&lt;br /&gt;
&lt;br /&gt;
A few years ago I posted my VMWare Oracle RAC node create script, here&#39;s an updated version for VSphere 6 and PowerCLI 6.3 Release 1. &amp;nbsp;It has the changes needed for shared VMDK&#39;s and a way to disable the change block tracking that occasionally finds its way into the VMX&#39;s. &amp;nbsp;If you&#39;re setting up a flex cluster, you&#39;ll need to uncomment the asm_network lines.&lt;br /&gt;
&lt;br /&gt;
Just modify the parameters in the top section. &amp;nbsp;Hopefully this saves you some time!&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
## This script works with VMWare 6&#39;s change in eager zeroing&lt;br /&gt;
# Modify variables below&lt;br /&gt;
#################################################################&lt;br /&gt;
&lt;br /&gt;
connect-viserver -Server VC06.poc.local -Protocol https&lt;br /&gt;
&lt;br /&gt;
$vmName1 = &quot;strora01&quot;&lt;br /&gt;
$vmName2 = &quot;strora02&quot;&lt;br /&gt;
$vmName3 = &quot;strora03&quot;&lt;br /&gt;
$vmName4 = &quot;strora04&quot;&lt;br /&gt;
$rac_vm_cpu = 50&lt;br /&gt;
$rac_vm_ram_mb = (16GB/1MB)&lt;br /&gt;
$rac_vm_ram_mb_rez = (8GB/1MB)&lt;br /&gt;
# below is the network label in vmware for the vlan&lt;br /&gt;
$public_network_name = &quot;VLAN100(pub)&quot;&lt;br /&gt;
$private_network_name = &quot;VLAN101(priv)&quot;&lt;br /&gt;
#$asm_network_name = &quot;VLAN102(asm)&quot;&lt;br /&gt;
#$backup_network_name = &quot;VLAN103(backup)&quot;&lt;br /&gt;
$osstore = &quot;os_binaries&quot;&lt;br /&gt;
$osstore_size_MB = (50GB/1MB)&lt;br /&gt;
$orastore = &quot;os_binaries&quot;&lt;br /&gt;
$orastore_size_KB = (100GB/1KB)&lt;br /&gt;
$datastore1 = &quot;ora_data1&quot;&lt;br /&gt;
$datastore2 = &quot;ora_data2&quot;&lt;br /&gt;
$datastore3 = &quot;ora_data3&quot;&lt;br /&gt;
$datastore4 = &quot;ora_data4&quot;&lt;br /&gt;
$datastore_size_KB = (400GB/1KB)&lt;br /&gt;
$recostore1 = &quot;ora_redo1&quot;&lt;br /&gt;
$recostore2 = &quot;ora_redo2&quot;&lt;br /&gt;
$recostore3 = &quot;ora_redo3&quot;&lt;br /&gt;
$recostore4 = &quot;ora_redo4&quot;&lt;br /&gt;
$recostore_size_KB = (16GB/1KB)&lt;br /&gt;
$archstore1 = &quot;ora_fra1&quot;&lt;br /&gt;
$archstore2 = &quot;ora_fra2&quot;&lt;br /&gt;
$archstore3 = &quot;ora_fra3&quot;&lt;br /&gt;
$archstore4 = &quot;ora_fra4&quot;&lt;br /&gt;
$archstore_size_KB = (25GB/1KB) &amp;nbsp; &amp;nbsp; &lt;br /&gt;
$vm_hostname = &quot;ucsblade135.poc.local&quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
$OS_CDROM = &quot;[os_binaries]OS_IMAGE/V77197-01.iso&quot;&lt;br /&gt;
&lt;br /&gt;
#################################################################&lt;br /&gt;
# &amp;nbsp;End variable section&lt;br /&gt;
# &amp;nbsp;No edits should be necessary below this line&lt;br /&gt;
#################################################################&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
$VM1 = new-vm `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Host &quot;$vm_hostname&quot; `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Name $vmName1 `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Datastore (get-datastore &quot;$osstore&quot;) `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -GuestID rhel6_64Guest `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -MemoryMB 4096 `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DiskMB $osstore_size_MB `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -NetworkName &quot;$public_network_name&quot; `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DiskStorageFormat &quot;Thin&quot;&lt;br /&gt;
&lt;br /&gt;
$vm2 = new-vm `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Host &quot;$vm_hostname&quot; `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Name $vmName2 `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Datastore (get-datastore &quot;$osstore&quot;) `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -GuestID rhel6_64Guest `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -MemoryMB 4096 `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DiskMB $osstore_size_MB `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -NetworkName &quot;$public_network_name&quot; `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DiskStorageFormat &quot;Thin&quot;&lt;br /&gt;
&lt;br /&gt;
$VM3 = new-vm `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Host &quot;$vm_hostname&quot; `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Name $vmName3 `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Datastore (get-datastore &quot;$osstore&quot;) `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -GuestID rhel6_64Guest `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -MemoryMB 4096 `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DiskMB $osstore_size_MB `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -NetworkName &quot;$public_network_name&quot; `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DiskStorageFormat &quot;Thin&quot;&lt;br /&gt;
&lt;br /&gt;
$VM4 = new-vm `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Host &quot;$vm_hostname&quot; `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Name $vmName4 `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Datastore (get-datastore &quot;$osstore&quot;) `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -GuestID rhel6_64Guest `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -MemoryMB 4096 `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DiskMB $osstore_size_MB `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -NetworkName &quot;$public_network_name&quot; `&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DiskStorageFormat &quot;Thin&quot;&lt;br /&gt;
&lt;br /&gt;
Function Change-Memory {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Param (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $VM,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $MemoryMB&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Process {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $VMs = Get-VM $VM&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Foreach ($Machine in $VMs) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $VMId = $Machine.Id&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $VMSpec = New-Object VMware.Vim.VirtualMachineConfigSpec&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $VMSpec.memoryMB = $MemoryMB&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $RawVM = Get-View -Id $VMId&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $RawVM.ReconfigVM_Task($VMSpec)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Change-Memory -MemoryMB $rac_vm_ram_mb -VM $VM1&lt;br /&gt;
Change-Memory -MemoryMB $rac_vm_ram_mb -VM $VM2&lt;br /&gt;
Change-Memory -MemoryMB $rac_vm_ram_mb -VM $VM3&lt;br /&gt;
Change-Memory -MemoryMB $rac_vm_ram_mb -VM $VM4&lt;br /&gt;
&lt;br /&gt;
Set-VM -vm(get-vm $VM1) -NumCpu $rac_vm_cpu -RunAsync -Version v11 -Confirm:$false&lt;br /&gt;
Set-VM -vm(get-vm $vm2) -NumCpu $rac_vm_cpu -RunAsync -Version v11 -Confirm:$false&lt;br /&gt;
Set-VM -vm(get-vm $VM3) -NumCpu $rac_vm_cpu -RunAsync -Version v11 -Confirm:$false&lt;br /&gt;
Set-VM -vm(get-vm $VM4) -NumCpu $rac_vm_cpu -RunAsync -Version v11 -Confirm:$false&lt;br /&gt;
&lt;br /&gt;
Get-VM $VM1 | Get-VMResourceConfiguration | Set-VMResourceConfiguration -MemReservationMB $rac_vm_ram_mb_rez&lt;br /&gt;
Get-VM $vm2 | Get-VMResourceConfiguration | Set-VMResourceConfiguration -MemReservationMB $rac_vm_ram_mb_rez&lt;br /&gt;
Get-VM $VM3 | Get-VMResourceConfiguration | Set-VMResourceConfiguration -MemReservationMB $rac_vm_ram_mb_rez&lt;br /&gt;
Get-VM $VM4 | Get-VMResourceConfiguration | Set-VMResourceConfiguration -MemReservationMB $rac_vm_ram_mb_rez&lt;br /&gt;
&lt;br /&gt;
New-NetworkAdapter -VM $vm1 -NetworkName &quot;$private_network_name&quot; -StartConnected -Type vmxnet3 -Confirm:$false&lt;br /&gt;
New-NetworkAdapter -VM $vm2 -NetworkName &quot;$private_network_name&quot; -StartConnected -Type vmxnet3 -Confirm:$false&lt;br /&gt;
New-NetworkAdapter -VM $vm3 -NetworkName &quot;$private_network_name&quot; -StartConnected -Type vmxnet3 -Confirm:$false&lt;br /&gt;
New-NetworkAdapter -VM $vm4 -NetworkName &quot;$private_network_name&quot; -StartConnected -Type vmxnet3 -Confirm:$false&lt;br /&gt;
&lt;br /&gt;
Function Enable-MemHotAdd($vm){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmview = Get-vm $vm | Get-View&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $extra = New-Object VMware.Vim.optionvalue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $extra.Key=&quot;mem.hotadd&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $extra.Value=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmConfigSpec.extraconfig += $extra&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmview.ReconfigVM($vmConfigSpec)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
enable-memhotadd $vm1&lt;br /&gt;
enable-memhotadd $vm2&lt;br /&gt;
enable-memhotadd $vm3&lt;br /&gt;
enable-memhotadd $vm4&lt;br /&gt;
&lt;br /&gt;
Function Enable-vCpuHotAdd($vm){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmview = Get-vm $vm | Get-View&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $extra = New-Object VMware.Vim.optionvalue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $extra.Key=&quot;vcpu.hotadd&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $extra.Value=&quot;true&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmConfigSpec.extraconfig += $extra&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmview.ReconfigVM($vmConfigSpec)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
enable-vCpuHotAdd $vm1&lt;br /&gt;
enable-vCpuHotAdd $vm2&lt;br /&gt;
enable-vCpuHotAdd $vm3&lt;br /&gt;
enable-vCpuHotAdd $vm4&lt;br /&gt;
&lt;br /&gt;
New-HardDisk -vm($VM1) -CapacityKB $orastore_size_KB -StorageFormat Thin -datastore &quot;$orastore&quot;&lt;br /&gt;
New-HardDisk -vm($vm2) -CapacityKB $orastore_size_KB -StorageFormat Thin -datastore &quot;$orastore&quot;&lt;br /&gt;
New-HardDisk -vm($VM3) -CapacityKB $orastore_size_KB -StorageFormat Thin -datastore &quot;$orastore&quot;&lt;br /&gt;
New-HardDisk -vm($VM4) -CapacityKB $orastore_size_KB -StorageFormat Thin -datastore &quot;$orastore&quot;&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $datastore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$datastore1&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
$New_SCSI_1_1 = $New_Disk1 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_2_1 = $New_Disk2 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_3_1 = $New_Disk3 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_4_1 = $New_Disk4 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $datastore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$datastore2&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_1&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $datastore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$datastore3&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_1&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $datastore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$datastore4&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_1&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_1&lt;br /&gt;
&lt;br /&gt;
###################################&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $recostore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$recostore1&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
$New_SCSI_1_2 = $New_Disk1 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_2_2 = $New_Disk2 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_3_2 = $New_Disk3 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_4_2 = $New_Disk4 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $recostore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$recostore2&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_2&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $recostore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$recostore3&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_2&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $recostore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$recostore4&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_2&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#######################&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $archstore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$archstore1&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
$New_SCSI_1_3 = $New_Disk1 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_2_3 = $New_Disk2 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_3_3 = $New_Disk3 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
$New_SCSI_4_3 = $New_Disk4 | New-ScsiController -Type ParaVirtual -Confirm:$false&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $archstore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$archstore2&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_3&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $archstore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$archstore3&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_3&lt;br /&gt;
&lt;br /&gt;
$New_Disk1 = New-HardDisk -vm($VM1) -CapacityKB $archstore_size_KB -StorageFormat EagerZeroedThick -datastore &quot;$archstore4&quot;&lt;br /&gt;
$New_Disk2 = new-harddisk -vm($vm2) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk3 = new-harddisk -vm($vm3) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
$New_Disk4 = new-harddisk -vm($vm4) -diskpath ($New_Disk1 | %{$_.Filename})&lt;br /&gt;
&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk1 -controller $New_SCSI_1_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk2 -controller $New_SCSI_2_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk3 -controller $New_SCSI_3_3&lt;br /&gt;
set-harddisk -Confirm:$false -harddisk $New_Disk4 -controller $New_SCSI_4_3&lt;br /&gt;
&lt;br /&gt;
$ExtraOptions = @{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # per VMware, SAP and Oracle VMware Best Practices&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;disk.EnableUUID&quot;=&quot;true&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi0:0.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi0:1.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi1:0.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi1:1.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi1:2.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi1:3.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi2:0.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi2:1.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi2:2.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi2:3.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi3:0.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi3:1.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi3:2.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;scsi3:3.ctkEnabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;ethernet2.coalescingScheme&quot;=&quot;disabled&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;sched.mem.pshare.enable&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;numa.vcpu.preferHT&quot;=&quot;true&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;tools.syncTime&quot; = &quot;False&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; # per VMware&#39;s Hardening Guide - Enterprise Level&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;isolation.tools.diskShrink.disable&quot;=&quot;true&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;isolation.tools.diskWiper.disable&quot;=&quot;true&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;isolation.tools.copy.disable&quot;=&quot;true&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;isolation.tools.paste.disable&quot;=&quot;true&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;isolation.tools.setGUIOptions.enable&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;isolation.device.connectable.disable&quot;=&quot;true&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;isolation.device.edit.disable&quot;=&quot;true&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;vmci0.unrestricted&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;log.keepOld&quot;=&quot;10&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;log.rotateSize&quot;=&quot;1000000&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;tools.setInfo.sizeLimit&quot;=&quot;1048576&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;guest.command.enabled&quot;=&quot;false&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &quot;tools.guestlib.enableHostInfo&quot;=&quot;false&quot;&lt;br /&gt;
}&lt;br /&gt;
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec;&lt;br /&gt;
Foreach ($Option in $ExtraOptions.GetEnumerator()) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $OptionValue = New-Object VMware.Vim.optionvalue&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $OptionValue.Key = $Option.Key&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $OptionValue.Value = $Option.Value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $vmConfigSpec.extraconfig += $OptionValue&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$vmview=get-vm $vmName1 | get-view&lt;br /&gt;
$vmview.ReconfigVM_Task($vmConfigSpec)&lt;br /&gt;
$vmview=get-vm $vmName2 | get-view&lt;br /&gt;
$vmview.ReconfigVM_Task($vmConfigSpec)&lt;br /&gt;
$vmview=get-vm $vmName3 | get-view&lt;br /&gt;
$vmview.ReconfigVM_Task($vmConfigSpec)&lt;br /&gt;
$vmview=get-vm $vmName4 | get-view&lt;br /&gt;
$vmview.ReconfigVM_Task($vmConfigSpec)&lt;br /&gt;
&lt;br /&gt;
new-CDDRIVE -VM $VM1 &amp;nbsp;-isopath &quot;$OS_CDROM&quot; -startConnected&lt;br /&gt;
new-CDDRIVE -VM $VM2 &amp;nbsp;-isopath &quot;$OS_CDROM&quot; -startConnected&lt;br /&gt;
new-CDDRIVE -VM $VM3 &amp;nbsp;-isopath &quot;$OS_CDROM&quot; -startConnected&lt;br /&gt;
new-CDDRIVE -VM $VM4 &amp;nbsp;-isopath &quot;$OS_CDROM&quot; -startConnected&lt;br /&gt;
&lt;br /&gt;
function Set-MultiWriter{ &lt;br /&gt;
&amp;nbsp; param($VM, $DiskName) &lt;br /&gt;
&amp;nbsp; echo $VM&lt;br /&gt;
&amp;nbsp; $TempVM = $VM | Get-View&lt;br /&gt;
&amp;nbsp; $Devicy=$TempVM.Config.Hardware.Device&lt;br /&gt;
&amp;nbsp; foreach ($device in $Devicy) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if($device -is [VMware.Vim.VirtualDisk] -and $device.deviceInfo.Label -eq $DiskName) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $diskDevice = $device&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $diskDeviceBaking = $device.backing&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; break&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; $spec = New-Object VMware.Vim.VirtualMachineConfigSpec&lt;br /&gt;
&amp;nbsp; $spec.deviceChange = New-Object VMware.Vim.VirtualDeviceConfigSpec&lt;br /&gt;
&amp;nbsp; $spec.deviceChange[0].operation = &#39;edit&#39;&lt;br /&gt;
&amp;nbsp; $spec.deviceChange[0].device = New-Object VMware.Vim.VirtualDisk&lt;br /&gt;
&amp;nbsp; $spec.deviceChange[0].device = $diskDevice &lt;br /&gt;
&amp;nbsp; $spec.DeviceChange[0].device.backing = New-Object VMware.Vim.VirtualDiskFlatVer2BackingInfo&lt;br /&gt;
&amp;nbsp; $spec.DeviceChange[0].device.backing = $diskDeviceBaking&lt;br /&gt;
&amp;nbsp; $spec.DeviceChange[0].device.backing.sharing = &quot;sharingMultiWriter&quot;&lt;br /&gt;
&amp;nbsp; Write-Host &quot;`nEnabling Multiwriter flag on on VMDK:&quot; $diskName &quot;for VM:&quot; $vmname&lt;br /&gt;
&amp;nbsp; $task = $TempVM.ReconfigVM_Task($spec)&lt;br /&gt;
&amp;nbsp; $task1 = Get-Task -Id (&quot;Task-$($task.value)&quot;)&lt;br /&gt;
&amp;nbsp; $task1 | Wait-Task&lt;br /&gt;
}&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 3&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 4&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 5&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 6&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 7&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 8&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 9&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 10&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 11&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 12&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 13&quot;&lt;br /&gt;
Set-MultiWriter $VM1 &quot;Hard disk 14&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 3&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 4&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 5&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 6&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 7&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 8&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 9&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 10&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 11&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 12&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 13&quot;&lt;br /&gt;
Set-MultiWriter $VM2 &quot;Hard disk 14&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 3&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 4&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 5&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 6&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 7&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 8&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 9&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 10&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 11&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 12&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 13&quot;&lt;br /&gt;
Set-MultiWriter $VM3 &quot;Hard disk 14&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 3&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 4&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 5&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 6&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 7&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 8&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 9&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 10&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 11&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 12&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 13&quot;&lt;br /&gt;
Set-MultiWriter $VM4 &quot;Hard disk 14&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/5723911746988238212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2017/01/updated-vmware-6-oracle-rac-vm-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/5723911746988238212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/5723911746988238212'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2017/01/updated-vmware-6-oracle-rac-vm-create.html' title='Updated VMWare 6 Oracle RAC vm create script'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-9020798934444540415</id><published>2016-04-28T14:49:00.001-07:00</published><updated>2016-05-02T09:09:52.339-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drake"/><category scheme="http://www.blogger.com/atom/ns#" term="Jay-Z"/><category scheme="http://www.blogger.com/atom/ns#" term="Kanye West"/><category scheme="http://www.blogger.com/atom/ns#" term="lemonade"/><category scheme="http://www.blogger.com/atom/ns#" term="Lil Wayne"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="plsql"/><category scheme="http://www.blogger.com/atom/ns#" term="rap"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="the Beyonce formation Tour"/><category scheme="http://www.blogger.com/atom/ns#" term="unwrap"/><category scheme="http://www.blogger.com/atom/ns#" term="wrap"/><title type='text'>What amuses Tom Kyte? (aka: To wrap, or not to wrap?) Selective Encryption Part 3 of 3</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
So...this post is not about rap, its about wrapping plsql. &amp;nbsp;If you&#39;ve come here looking for a music site...run away! There&#39;s nothing about Jay-Z, the Beyonce formation Tour, Kanye West, Lil Wayne or Drake. &lt;br /&gt;
&lt;br /&gt;
If you think you&#39;re getting security by wrapping your plsql, stick around...its not protection. &amp;nbsp;AS Tom said, &quot;I put &quot;protection&quot; in quotes because I&#39;ve always been amused by &#39;wrapping&#39; code.&quot;&lt;br /&gt;
&lt;br /&gt;
In my previous post, I had a function that returned a 256-bit key, and mentioned a few ways of protecting it...but cautioned about using plsql wrap. &amp;nbsp;This is only slightly better than doing nothing.&lt;br /&gt;
&lt;br /&gt;
The function in the previous post is:&lt;br /&gt;
&lt;br /&gt;
create or replace function blackan.my_key return varchar2 as&lt;br /&gt;
begin&lt;br /&gt;
&amp;nbsp; return &#39;0F9157255C4CB6292D5C7E5FE96D90B2B4DE33CF4FEF2742366705F36D40A143&#39;;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
I run the wrap utility and it creates my_function.plb:&lt;br /&gt;
&lt;br /&gt;
wrap iname=my_function.sql&lt;br /&gt;
&lt;br /&gt;
Taking a peek in the file I see:&lt;br /&gt;
&lt;br /&gt;
create or replace function blackan.my_key wrapped&lt;br /&gt;
a000000&lt;br /&gt;
367&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
abcd&lt;br /&gt;
8&lt;br /&gt;
7e ba&lt;br /&gt;
mtACEgpb2btQRc85YlHfKReZyCowgyr6f8tqynSm3f80Fbor4H4vlzbU3ANp9BtM2jLlkqnk&lt;br /&gt;
vF5IANpFigWMarvPqiRJdFXQs+5cQGjZZxauuFyxO9bW1UkgQotGR+YJ78l+VqExIcanEJXy&lt;br /&gt;
LoQv715qogTgWUFi22C8R47oRG4zYWj5tlQcWQ==&lt;br /&gt;
/&lt;br /&gt;
&lt;br /&gt;
You might be thinking, &quot;Wow! &amp;nbsp;That sure looks secure! &amp;nbsp;Comparing it to the original, I can&#39;t see anything that&#39;s the same!&quot; &amp;nbsp;Don&#39;t think that...its a false sense of security. &amp;nbsp;There are TONS of post/utilities...even websites that will &quot;unwrap&quot; your plsql. &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Here&#39;s one:&lt;br /&gt;
http://www.codecrete.net/UnwrapIt&lt;br /&gt;
&lt;br /&gt;
If you paste the wrapped code above in to the website, you&#39;ll see:&lt;br /&gt;
&lt;pre class=&quot;area mt&quot; style=&quot;background-color: #eff0e6; border: 1px solid rgb(191, 192, 182); font-size: 0.83em; margin-top: 10px; padding: 0.6em 1em;&quot;&gt;FUNCTION my_key RETURN VARCHAR2 AS 
BEGIN 
  RETURN &#39;0F9157255C4CB6292D5C7E5FE96D90B2B4DE33CF4FEF2742366705F36D40A143&#39;; 
END;&lt;/pre&gt;
&lt;br /&gt;
So...don&#39;t trust the security of wrapping plsql. &lt;br /&gt;
&lt;br /&gt;
On the other hand, this allows you to get insight...when metalink is failing you, you may be able to paste the internal wrapped plsql packages from Oracle and diagnose your own issues.&lt;br /&gt;
&lt;br /&gt;
I hope this helps you see you shouldn&#39;t trust the plsql wrap to keep your data secure.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, sans-serif; font-size: 16px; line-height: 22.4px;&quot;&gt;&lt;a href=&quot;http://otipstricks.blogspot.com/2016/04/selective-encryption.html&quot; target=&quot;_blank&quot;&gt;SDE Part 1&lt;/a&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, sans-serif; font-size: 16px; line-height: 22.4px;&quot; /&gt;&lt;a href=&quot;http://otipstricks.blogspot.com/2016/04/selective-encryption-part-2.html&quot; target=&quot;_blank&quot;&gt;SDE Part 2&lt;/a&gt;&lt;br style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, sans-serif; font-size: 16px; line-height: 22.4px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Trebuchet, sans-serif; font-size: 16px; line-height: 22.4px;&quot;&gt;YOU ARE HERE&amp;gt;&amp;gt;&amp;nbsp;&lt;/span&gt;SDE Part 3&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/9020798934444540415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2016/04/what-amuses-tom-kyte-aka-to-wrap-or-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/9020798934444540415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/9020798934444540415'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2016/04/what-amuses-tom-kyte-aka-to-wrap-or-not.html' title='What amuses Tom Kyte? (aka: To wrap, or not to wrap?) Selective Encryption Part 3 of 3'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-1695376281508491357</id><published>2016-04-28T13:55:00.000-07:00</published><updated>2016-05-02T09:08:20.327-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AES256"/><category scheme="http://www.blogger.com/atom/ns#" term="CBC"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="DBMS_CRYPTO"/><category scheme="http://www.blogger.com/atom/ns#" term="DES"/><category scheme="http://www.blogger.com/atom/ns#" term="instead of trigger"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="PKCS5"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="table"/><category scheme="http://www.blogger.com/atom/ns#" term="view"/><title type='text'>Selective Encryption Part 2 of 3</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In my previous post I talked about the importance of encryption in the database. &amp;nbsp;To be fair, sometimes it really isn&#39;t important, its just required for some reason. &amp;nbsp;This is more of a solution to the 2nd, as part of an overall security scheme. &amp;nbsp;Also, for a scenario where some of the data in a table is replicated to other databases/platforms, etc, this could be a way to auto-obfuscate. &amp;nbsp;The encrypted data would be moved through GG or w/e CDC you use without a key...making it very secure after it leaves the database.&lt;br /&gt;
&lt;br /&gt;
We&#39;re going to use a block cipher...so first, you need to pick a cipher algorithm (here are the block options), a block cipher chaining modifier and a padding modifier from below, and add up their associated numbers. (ie: AES256 with CBC and PKCS5 would be 8+256+4096=4360) &amp;nbsp;We&#39;ll use 4360 for our example.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #351c75;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;Here are some of the options in dbms_crypto:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- Block Cipher Algorithms&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ENCRYPT_DES &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp; &amp;nbsp; 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ENCRYPT_3DES_2KEY &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp; &amp;nbsp; 2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ENCRYPT_3DES &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp; &amp;nbsp; 3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ENCRYPT_AES &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp; &amp;nbsp; 4;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ENCRYPT_PBE_MD5DES &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp; &amp;nbsp; 5;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ENCRYPT_AES128 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp; &amp;nbsp; 6;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ENCRYPT_AES192 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp; &amp;nbsp; 7;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ENCRYPT_AES256 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp; &amp;nbsp; 8;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- Block Cipher Chaining Modifiers&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CHAIN_CBC &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; := &amp;nbsp; 256;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CHAIN_CFB &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; := &amp;nbsp; 512;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CHAIN_ECB &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; := &amp;nbsp; 768;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; CHAIN_OFB &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; := &amp;nbsp;1024;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -- Block Cipher Padding Modifiers&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PAD_PKCS5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= &amp;nbsp;4096;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PAD_NONE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; := &amp;nbsp;8192;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PAD_ZERO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= 12288;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; PAD_ORCL &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:= 16384;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #351c75; color: yellow;&quot;&gt;1. First, create a key and capture the string that gets generated...don&#39;t lose this key:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
set serveroutput on size 1000000&lt;br /&gt;
declare&lt;br /&gt;
&amp;nbsp; v_Number number := 256/8; --256 bit key&lt;br /&gt;
&amp;nbsp; v_Key RAW(32);&lt;br /&gt;
begin&lt;br /&gt;
&amp;nbsp; v_Key := DBMS_CRYPTO.RANDOMBYTES(v_Number);&lt;br /&gt;
&amp;nbsp; dbms_output.put_line(v_Key);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #351c75;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;2. Now replace the red string below with the output generated above. &amp;nbsp;This is meant as a very simple example. &amp;nbsp;In real life you&#39;d want to do everything you can to make this complex and difficult to read. Putting it in a package and wrapping it would make it slightly less simple to get at. &amp;nbsp;Putting this data somewhere else encypted (like the OS or a different db) would be better. &amp;nbsp;How you do this is up to you...but just creating a plain text function isn&#39;t sufficient, and depending on plsql wrap is a bad&amp;nbsp;idea...as Tom Kyte put it, &quot;Using the latest wrap would provide the highest degree of &quot;protection&quot;. &amp;nbsp;That is all. &amp;nbsp;I put &quot;protection&quot; in quotes because I&#39;ve always been amused by &#39;wrapping&#39; code.&quot; &amp;nbsp;I&#39;ll explain that more in a different post.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
create or replace function blackan.my_key return varchar2 as&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
begin&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; return &#39;&lt;span style=&quot;color: red;&quot;&gt;0F9157255C4CB6292D5C7E5FE96D90B2B4DE33CF4FEF2742366705F36D40A143&lt;/span&gt;&#39;;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
end;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #351c75; color: yellow;&quot;&gt;3. Now generate the base table and the decrypting view on the table:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
drop table blackan.hacker_booty_base;&lt;/div&gt;
&lt;div&gt;
create table blackan.hacker_booty_base (EmpName raw(120), Emp_Num raw(88), SSN raw(80), Credit_Card raw(120), CC_Ex_Date raw(88), Address raw(120), PW raw(120));&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
create or replace view blackan.hacker_booty as&lt;/div&gt;
&lt;div&gt;
select&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; SUBSTRB(UTL_I18N.RAW_TO_CHAR (DBMS_CRYPTO.DECRYPT(EmpName,4360,my_key), &#39;AL32UTF8&#39;),1,30) EmpName,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; SUBSTRB(UTL_I18N.RAW_TO_CHAR (DBMS_CRYPTO.DECRYPT(Emp_Num,4360,my_key), &#39;AL32UTF8&#39;),1,22) Emp_Num,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; SUBSTRB(UTL_I18N.RAW_TO_CHAR (DBMS_CRYPTO.DECRYPT(SSN,4360,my_key), &#39;AL32UTF8&#39;),1,20) SSN,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; SUBSTRB(UTL_I18N.RAW_TO_CHAR (DBMS_CRYPTO.DECRYPT(Credit_Card,4360,my_key), &#39;AL32UTF8&#39;),1,30) Credit_Card,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; SUBSTRB(UTL_I18N.RAW_TO_CHAR (DBMS_CRYPTO.DECRYPT(CC_Ex_Date,4360,my_key), &#39;AL32UTF8&#39;),1,30) CC_Ex_Date,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; SUBSTRB(UTL_I18N.RAW_TO_CHAR (DBMS_CRYPTO.DECRYPT(Address,4360,my_key), &#39;AL32UTF8&#39;),1,30) Address,&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; SUBSTRB(UTL_I18N.RAW_TO_CHAR (DBMS_CRYPTO.DECRYPT(PW,4360,my_key), &#39;AL32UTF8&#39;),1,30) PW&lt;/div&gt;
&lt;div&gt;
from hacker_booty_base;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #351c75;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;4. Now create the encrypting &quot;instead of&quot; trigger on the view to redirect the dml to the base table after encrypting it:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
CREATE OR REPLACE TRIGGER blackan.ioiudr_hacker_booty&lt;/div&gt;
&lt;div&gt;
INSTEAD OF INSERT OR UPDATE OR DELETE&lt;/div&gt;
&lt;div&gt;
ON blackan.hacker_booty&lt;/div&gt;
&lt;div&gt;
FOR EACH ROW&lt;/div&gt;
&lt;div&gt;
BEGIN&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; if INSERTING then&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; insert into hacker_booty_base values (&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW(:NEW.EmpName,&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.Emp_Num, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.SSN, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.Credit_Card, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.CC_Ex_Date, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.Address, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.PW, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key));&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; elsif updating then&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; update hacker_booty_base set&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; EmpName=DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW(:NEW.EmpName,&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Emp_Num=DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.Emp_Num, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; SSN=DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.SSN, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Credit_Card=DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.Credit_Card, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; CC_Ex_Date=DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.CC_Ex_Date, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Address=DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.Address, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key),&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; PW=DBMS_CRYPTO.ENCRYPT(UTL_I18N.STRING_TO_RAW (:NEW.PW, &amp;nbsp;&#39;AL32UTF8&#39;),4360,my_key)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; where SSN=:OLD.SSN;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; else&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; delete from hacker_booty_base where SSN=:OLD.SSN;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; end if; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
end;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #351c75;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;...and that&#39;s it. &amp;nbsp;Let&#39;s insert a row of fake data:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
insert into blackan.hacker_booty values (&#39;Richy Rich&#39;,1,&#39;123-45-6789&#39;,&#39;111 2222 3333 4444&#39;, sysdate+365, &#39;1 Main St, St Louis, MO, 12345&#39;, &#39;Shhh&#39;);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #351c75; color: yellow;&quot;&gt;When you look at the actual data-at-rest, its encrypted:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
select empname, emp_num, ssn from blackan.hacker_booty_base;&lt;/div&gt;
&lt;div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse; width: 744px;&quot;&gt;
 &lt;colgroup&gt;&lt;col style=&quot;mso-width-alt: 8675; mso-width-source: userset; width: 183pt;&quot; width=&quot;244&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 8817; mso-width-source: userset; width: 186pt;&quot; width=&quot;248&quot;&gt;&lt;/col&gt;
 &lt;col style=&quot;mso-width-alt: 8960; mso-width-source: userset; width: 189pt;&quot; width=&quot;252&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td class=&quot;xl65&quot; height=&quot;19&quot; style=&quot;height: 14.4pt; width: 183pt;&quot; width=&quot;244&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;EMPNAME&lt;/span&gt;&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;width: 186pt;&quot; width=&quot;248&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;EMP_NUM&lt;/span&gt;&lt;/td&gt;
  &lt;td class=&quot;xl65&quot; style=&quot;width: 189pt;&quot; width=&quot;252&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;SSN&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;
  &lt;td height=&quot;19&quot; style=&quot;height: 14.4pt;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;454460100E82C91F8B26AEE3E35EE3E8&lt;/span&gt;&lt;/td&gt;
  &lt;td&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;9F1BE1034151056A760A880E5D7BC5C3&lt;/span&gt;&lt;/td&gt;
  &lt;td&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;29B471D31D8E2255D1B0C7B6D5084759&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: #351c75; color: yellow;&quot;&gt;When you look at the data via your application, which would use the view, you see the data exactly as you entered it:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
select empname, emp_num, ssn from blackan.hacker_booty;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
EMPNAME,EMP_NUM,SSN&lt;/div&gt;
&lt;div&gt;
Richy Rich &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; 123-45-6789&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://otipstricks.blogspot.com/2016/04/selective-encryption.html&quot; target=&quot;_blank&quot;&gt;SDE Part 1&lt;/a&gt;&lt;br /&gt;
YOU ARE HERE&amp;gt;&amp;gt;&amp;nbsp;SDE Part 2&lt;br /&gt;
&lt;a href=&quot;http://otipstricks.blogspot.com/2016/04/what-amuses-tom-kyte-aka-to-wrap-or-not.html&quot; target=&quot;_blank&quot;&gt;SDE Part 3&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/1695376281508491357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2016/04/selective-encryption-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/1695376281508491357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/1695376281508491357'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2016/04/selective-encryption-part-2.html' title='Selective Encryption Part 2 of 3'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6585541677364366622.post-4201404081250402541</id><published>2016-04-28T09:06:00.003-07:00</published><updated>2016-05-02T09:07:38.077-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CII"/><category scheme="http://www.blogger.com/atom/ns#" term="confidential"/><category scheme="http://www.blogger.com/atom/ns#" term="database"/><category scheme="http://www.blogger.com/atom/ns#" term="encryption"/><category scheme="http://www.blogger.com/atom/ns#" term="kerberos"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="PII"/><category scheme="http://www.blogger.com/atom/ns#" term="PKI"/><category scheme="http://www.blogger.com/atom/ns#" term="RADIUS"/><category scheme="http://www.blogger.com/atom/ns#" term="SDE"/><category scheme="http://www.blogger.com/atom/ns#" term="security"/><category scheme="http://www.blogger.com/atom/ns#" term="SSL"/><category scheme="http://www.blogger.com/atom/ns#" term="TDE"/><category scheme="http://www.blogger.com/atom/ns#" term="TLS"/><title type='text'>Selective Encryption - Part 1 of 3</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Encryption in databases is nothing new, but its becoming a more prominent topic every day. &amp;nbsp;One of my first experiences with it was in dealing with a database that had extremely confidential data, and it was a known target to foreign countries who were actively attempting to access the network to get to the database. &amp;nbsp;Not to be overly dramatic, but if this data was compromised, people would be killed. I wasn&#39;t working for a Gov&#39;t agency at the time...so don&#39;t read too much into all I just said. &amp;nbsp;The point is, every company stores data that needs to be secured, and the reality of it is, security is an illusion we can tell ourselves we have until we&#39;re proven wrong. &amp;nbsp;So from that you have two choices:&lt;br /&gt;
&lt;br /&gt;
1. Give up, its inevitable our data will be breached. &lt;br /&gt;
2. Make it as difficult as possible for our data to be breached, and if it is, encrypt everything valuable to make it more difficult at that point.&lt;br /&gt;
&lt;br /&gt;
I choose 2. &amp;nbsp;:) &amp;nbsp;In the scenario I mentioned, we had security layer on security layer..and I don&#39;t mean to say this is the complete solution to make your data secured. &amp;nbsp;Given the data in your database will eventually be in the hands of people who took it, what can you do? &amp;nbsp;Oracle &amp;nbsp;sells TDE, which does a lot of the work for you, but its a licensed feature. &amp;nbsp;It used to include transparent data encryption at rest and data in flight. &amp;nbsp;Thanks to a security issue a few years ago that exposed encrypted network traffic, encryption of network traffic in flight is now part of your normal db license (aka no additional cost.)&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &lt;a href=&quot;https://docs.oracle.com/cd/E11882_01/license.112/e47877.pdf&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;Strongauthentication services (Kerberos, PKI, and RADIUS) and network encryption (native &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; network encryption and SSL/TLS) are no longer part of Oracle Advanced Security andare available in all licensed editions of all supported releases of the Oracle database.&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
What about data at rest and backups? &amp;nbsp;Every company keeps PII (personal identifiable information) on their employees...Name, SSN, Address, Phone number, etc. &amp;nbsp;What about your company&#39;s customers? &amp;nbsp;If your unencrypted data is breached, your company is required by law to notify the people who may have had PII stolen. Would your company lose future business if this happened? I&#39;ve been told the FCC requires databases storing network endpoint addresses to be 256-bit encrypted. For almost all dba&#39;s, encryption isn&#39;t really optional anymore.&lt;br /&gt;
&lt;br /&gt;
So...We talked about TDE...there&#39;s also something Oracle refers to as SDE (selective data encryption) ...and this is free (&lt;span style=&quot;background-color: white; color: #2e75b6; font-family: &amp;quot;tahoma&amp;quot; , sans-serif; font-size: 10.5pt;&quot;&gt;1930738.1)&lt;/span&gt;. &amp;nbsp;This is really easy to implement...its not perfect, but its better than nothing. &amp;nbsp;I&#39;ll show you how in the next post.&lt;br /&gt;
&lt;br /&gt;
YOU ARE HERE&amp;gt;&amp;gt; SDE Part 1&lt;br /&gt;
&lt;a href=&quot;http://otipstricks.blogspot.com/2016/04/selective-encryption-part-2.html&quot; target=&quot;_blank&quot;&gt;SDE Part 2&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://otipstricks.blogspot.com/2016/04/what-amuses-tom-kyte-aka-to-wrap-or-not.html&quot; target=&quot;_blank&quot;&gt;SDE Part 3&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://otipstricks.blogspot.com/feeds/4201404081250402541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://otipstricks.blogspot.com/2016/04/selective-encryption.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/4201404081250402541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6585541677364366622/posts/default/4201404081250402541'/><link rel='alternate' type='text/html' href='http://otipstricks.blogspot.com/2016/04/selective-encryption.html' title='Selective Encryption - Part 1 of 3'/><author><name>Andy Black</name><uri>http://www.blogger.com/profile/13735674972296527233</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo8lWJaRZRloN5Hj3JzuztssKabCoTHkktfHkJdc2CvMpRb_AOpExnaMyUOVrgCokac7z_th6OsTxHSufv1pdkEVza_LcMMT8-e1fRGDsB7vcXnV_mkpFxamd3xanSgnc/s122/P7010004.JPG'/></author><thr:total>0</thr:total></entry></feed>