tag:blogger.com,1999:blog-56442413377944796902024-03-21T18:00:11.910-03:00Historias de bases de datosÍndice de cosas interesantes que veo a diario usando Oracle y MySQLNelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.comBlogger52125tag:blogger.com,1999:blog-5644241337794479690.post-2943942404321726682021-10-11T12:00:00.000-03:002021-10-11T12:00:09.339-03:00La comunidad Oracle en Sudamérica #JoelKallmanDay<p>Gracias a Tim Hall por su <a href="https://oracle-base.com/blog/2021/10/04/joel-kallman-day-announcement/" target="_blank">iniciativa</a>, voy a aprovechar la oportunidad para escribir este post no técnico y recordar la historia de la comunidad Oracle en Sudamérica, en este año donde se achicó dolorosamente.</p><p>En el año 1996 tomé mi primer curso de Oracle, Forms y Reports. A medida que seguí trabajando con Oracle, con nuevos proyectos y más cursos, nos fuimos conociendo todos los que estábamos en Montevideo, y algunos de Buenos Aires. Pero el trabajo no dejaba tiempo para compartir conocimiento. Leíamos los trucos de Tom Kyte, Oracle Magazine, y nos enterábamos de eventos organizados en el norte con cientos de expertos hablando de temas técnicos sin marketing, con un poco de sana envidia ya que no es habitual que empresas locales paguen viajes a conferencias.</p><p>La comunidad Oracle en Sudamérica fue por muchos años gente consumiendo más que participando en los foros de Oracle desde sus escritorios, reuniéndose una vez por año en las oficinas del partner Oracle local para ver lanzamientos de nuevas versiones. Hasta que Francisco Muñoz empezó por el 2008 a traer expertos a distintas ciudades de Sudamérica, apoyado por el programa Oracle ACE. Eso generó una explosión de interés. Pudimos conocer en persona a los prolíficos escritores y comprobar que eran personas de carne y hueso. Y animó a la creación de los grupos de usuarios locales, animó a muchos empezar a compartir su conocimiento y experiencias, escribiendo artículos y presentando en eventos locales. Fue una primavera, de a poco todos los países fueron tomando la posta dejada por Francisco y nuevos grupos continuaron generando contenido y eventos. Los vendedores de Oracle ya no tenían exclusividad sobre el conocimiento, se escuchaba más sobre problemas y soluciones que sobre funcionalidades mágicas que nunca fallaban. Se generaron vínculos y amistades que no se podían generar por foros, y que hizo de todos nosotros mejores profesionales y personas.</p><p>La expansión se fue enlenteciendo, por diversos motivos. Quizás porque los nuevos egresados son atraídos por otras tecnologías. Quizás acentuado en este tiempo de COVID con la falta de eventos en persona y la obligación del trabajo virtual, con muy poco espacio para dedicar más horas de nuestros días a eventos virtuales. Ponga su explicación aquí, seguramente hayan muchas. </p><p>Lo que importa es que la comunidad Oracle sigue vigente en todos los que continúan compartiendo sus experiencias con la tecnología. Y en aquellos que alguna vez fueron parte y siguen en nuestra memoria. Como nuestro gran amigo Daniel Bozzolo. O Pieter Van Puymbroeck, Joel Kallman, y otros a los que no tuvimos el gusto de conocer.</p><p>¿La vuelta de eventos presenciales será necesaria para las comunidades de tecnología? Yo creo que sí, y no solo por lo que yo encuentre positivo de los eventos en persona, sino porque le da la oportunidad a gente nueva que descubra lo mismo que descubrí yo hace poco mas de 10 años.</p>Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0Montevideo, Departamento de Montevideo, Uruguay-34.9011127 -56.164531399999987-63.211346536178844 -91.320781399999987 -6.5908788638211533 -21.008281399999987tag:blogger.com,1999:blog-5644241337794479690.post-40403601148826852152019-09-29T23:54:00.001-03:002019-09-29T23:56:56.706-03:00Mi experiencia en el Oracle Open World 2019La semana pasada participé del Oracle Open World (OOW) y Code One en San Francisco, USA.<br />
Este año me pareció el mejor de los cinco en los que he participado.<br />
Les cuento el porqué, ojalá les sirva de referencia si están considerando participar en el futuro.<br />
<br />
Tuve la suerte de ser seleccionado para presentar tres charlas técnicas, y sumado a varias reuniones de trabajo, actividades para partners y eventos organizados por empresas después de la agenda diaria, hicieron que esta experiencia fuera intensa.<br />
<br />
Antes de viajar, revisando todas las charlas disponibles para armar mi agenda, encontré dos cosas a destacar. Una, mucho contenido técnico muy interesante, y dado que hay decenas de sesiones en simultáneo, me iba a perder muchas buenas. Lo otro es que varias personas reconocidas en la comunidad, algunos buenos amigos, no participaban este año. Es conocido que unos cuantos se jubilaron, y otros ya no están activos en la comunidad.<br />
<br />
El evento empezó el viernes previo para mí, con el Oracle Cloud Partner Council en las oficinas de Oracle - un evento de todo el día donde product managers (PMs) de distintas tecnologías cuentan las novedades y recursos disponibles para partners, y escuchan nuestras experiencias.<br />
Primera vez que participo en este tipo de eventos, me pareció muy valioso y lo recomiendo para los partners que viajan OOW, háganse un tiempo y vayan antes.<br />
<br />
El sábado estuve todo el día en un evento para Oracle ACE Directors, el famoso briefing, donde PMs cuentan los planes a futuro en diversas áreas. Todo bajo contrato de confidencialidad (NDA).<br />
También muy interesante, la mayoría de los anuncios se hicieron los días siguientes durante la conferencia. Muchas novedades y mejoras, todas en la dirección correcta a mi entender.<br />
<br />
El domingo fui invitado a Oracle Groundbreakers unconference, la primera edición de un evento de todo el día. Buenas discusiones entre miembros de la comunidad y algunos PMs de Oracle, sin agenda y para hablar de los temas que nos interesan.<br />
<br />
Aunque tuve que perderme la mitad, porque a la tarde participé del Oracle RAC Innovation summit, en las oficina Oracle del centro. Es la segunda vez que asisto a este evento y es muy valioso también, todos los PMs de Oracle RAC muestran un resumen de las novedades en las nuevas versiones, y reciben experiencias de un grupo reducido de clientes (usuarios) de RAC.<br />
<br />
El evento OOW empezó el lunes, aunque parecía mitad de semana para mí.<br />
A medida que iba yendo a distintas presentaciones me fui cruzando con muchas caras familiares, y también con mucha gente nueva, lo que fue una grata sorpresa, y confirmación de que el evento sigue vigente y que la comunidad se está renovando.<br />
Con los edificios Moscone ya remodelados, la distribución cambió comparado con años anteriores, habiendo más salas dentro de los edificios, corredores más grande, y más espacio en el área de exhibición. La calle frente al Moscone sur estaba abierta por primera vez, lo que hacía que se viera muy distinto a años anteriores.<br />
<br />
Una parte muy importante del evento es el contenido técnico (si se preguntan cuales son las otras: networking, comunidad y negocios). Ya están disponible todas las presentaciones (<a href="https://oracle.rainfocus.com/widget/oracle/oow19/catalogow19" target="_blank">aquí</a>), lo que sirve aunque hayan ido, porque no se puede estar en todas.<br />
<br />
Sigue la lista de todas las presentaciones a las que pude ir. Se las recomiendo, fueron todas muy buenas.<br />
En los horarios que ven huecos, tomé el examen de certificación "Oracle Autonomous Database Cloud 2019", aprovechando que es gratuito porque se realizó el <a href="https://blogs.oracle.com/oraclepartners/test-fest-openworld-is-back" target="_blank">testfest</a>. Y también estuve un par de horas ayudando en el <a href="https://www.oracle.com/code-one/hub.html" target="_blank">Groundbreakers hub</a>, en el stand de Blockchain beer.<br />
<div>
<br /></div>
Lunes:<br />
<ul>
<li>The Query Optimizer in Oracle Database 19c: What’s New [CON1263], Chris Antognini, Monday, September 16, 09:00 AM</li>
<li>Oracle Cloud Infrastructure: Practical Tips from Experience [CON1963], Simon Pane, Sean Scott, 10AM</li>
<li>Oracle Database Exadata Cloud Do's and Don'ts [CON5226], Brian Spendolini, Sravan Sunkaranam, Satish R, Monday, September 16, 10 AM</li>
<li>Oracle Autonomous Health Framework: Deep Dive Database and Cluster Use Cases [PRO4770], Mark Scardina, Monday, September 16, 11:15 AM</li>
<li>Best Practices for Patching Oracle Database Single Instances and Oracle RAC [CON3386], Ricardo Gonzalez, Roy Swonger, Monday, September 16, 12:15 PM</li>
<li>Using Machine Learning and Oracle Analytics Cloud for Proactive Analytics [DEV3136], Edelweiss Kammermann, 1:30PM</li>
<li>Zero Downtime Database Migration to Oracle Cloud [THT6607], Ricardo Gonzalez, Monday, September 16, 01:45 PM</li>
</ul>
<br />
Martes<br />
<ul>
<li>AutoUpgrade Hundreds of Oracle Databases with a Single Command [CON3387], Mike Dietrich</li>
<li>Oracle Database 19c: In-Depth Look into the New Automatic Indexing Feature [CON1432], Richard Foote, 11:15 AM</li>
<li>Oracle Active Data Guard: Best Practices and New Features Deep Dive [TRN4846], Pieter Van Puymbroeck, Nitin Karkhanis, Mahesh Girkar, 12:30 PM</li>
<li>Automate the Operation of Your Oracle Cloud Infrastructure 2.0 [DEV1798], yo, 1:30 PM</li>
<li>Oracle Autonomous Health Framework: For Rapid Resolution of Oracle RAC Issues [TRN4773], Mark Scardina, Bill Burton, 3:15PM</li>
<li>Ask TOM: How to Make and Test Your Application “Oracle RAC Ready” [THT4778], Markus Michalewicz, 4:00 PM</li>
<li>Ask TOM: Proven Ways to Make Applications Slower and Less Secure [THT4796], Connor Mcdonald, 4:30 PM</li>
</ul>
<br />
Miércoles<br />
<ul>
<li>Twenty Features You Will Miss If You Leave Oracle Database [DEV1279], Franck Pachot, 12:30 PM</li>
<li>Data Integration in Oracle Cloud: The Dream Team for End-to-End Analytics [CON3137], Edelweiss Kammermann, 4:45 PM</li>
</ul>
<br />
Jueves<br />
<ul>
<li>Oracle Exadata Cloud Services Guide from Practical Experience, yo, 9:00 AM</li>
<li>Oracle GoldenGate: Faster Deployments Using Microservices [HOL5221], Bobby Curtis, Mack Bell, Nick Wagner, 10:30 AM</li>
<li>A Deep Dive into Oracle Database Statement Parsing [CON3597], Frits Hoogland, 11:15 AM</li>
<li>Oracle Database 19c Automatic Indexing Demystified [CON1275], Franck Pachot, 12:15 PM</li>
<li>Best Practices for the Most Impactful Oracle Database 18c and 19c Features [TIP4855], Markus Michalewicz, Mauricio Feria, 2:15 PM</li>
<li>Oracle Autonomous Data Warehouse Cloud for Developers and Data Scientists [DEV3135], Edelweiss Kammermann, 2:15 PM</li>
</ul>
<br />
Un saludo<br />
<br />
PS: Si quieren ver fotos, en mi cuenta de Twitter van a ver muchas: <a href="https://twitter.com/ncalerouy">https://twitter.com/ncalerouy</a>Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-7582103201604582942018-04-11T22:47:00.000-03:002018-04-11T22:52:06.273-03:00Usar Oracle 12c en Docker sobre Windows 10 con Oracle Container Registry<b>¿Docker? ¿En Windows? ¿Oracle en Docker?</b><br />
<br />
<a href="https://www.docker.com/" target="_blank">Docker</a> es de las más populares tecnología de containers y funciona en Linux, Windows y Mac OS.<br />
Oracle se puede usar con Docker pero no está soportado para ambientes de producción todavía, como se explica en la nota de soporte “<b><i>2216342.1 Oracle Support for Database Running on Docker</i></b>”.<br />
<br />
Pueden ver una introducción más completa al tema<i> este</i> artículo que publiqué en <a href="http://www.oracle.com/technetwork/es/articles/index.html" target="_blank">OTN</a>, donde muestro los pasos necesarios para instalar y ejecutar una base Oracle usando el repositorio GIT <a href="https://github.com/oracle/docker-images/tree/master/OracleDatabase" target="_blank">oracle/docker-images</a>.<br />
<br />
En este blog vamos a ver otra forma de hacerlo, usando <a href="https://container-registry.oracle.com/" target="_blank">Oracle Container Registry</a>, también sobre Windows 10.<br />
Al usar imagenes de <i>Oracle Container Registry</i> no necesitamos descargar los binarios de instalación de Oracle desde OTN porque vienen incluidos. Por el momento están disponibles imágenes con las versiones 12.2.0.1 y 12.1.0.2.<br />
<br />
Primer paso: registrarse en <a href="http://container-registry.oracle.com/">container-registry.oracle.com</a><br />
<br />
Esto es gratuito, debemos entrar con nuestro usuario de OTN (crearlo también es gratuito) y aceptar las políticas uso.<br />
Son sólo esos dos pasos, pero si les quedan dudas pueden ver una explicación detallada <a href="https://technology.amis.nl/2017/11/17/quick-introduction-to-oracle-container-registry-running-one-of-oracles-prebaked-images/" target="_blank">acá (en inglés)</a>. <br />
<br />
Como pueden ver, al día de hoy tenemos dos ediciones disponibles (standard y enterprise) y el cliente:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDN8Agi21-3BW1efcgqiCQTq-Nr6PAGZqzmcu9_n3zAc1x4MgX4ZCE8lVfInQRKfWRycooSnKNX5E_3Gh1Mm0VIPAiphrVh-A8uA_E6MD4tBlUuy7v1SRa_Rsz3YO7_w33OISnmagcZNo/s1600/ocr-chose-db.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="622" data-original-width="1146" height="347" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDN8Agi21-3BW1efcgqiCQTq-Nr6PAGZqzmcu9_n3zAc1x4MgX4ZCE8lVfInQRKfWRycooSnKNX5E_3Gh1Mm0VIPAiphrVh-A8uA_E6MD4tBlUuy7v1SRa_Rsz3YO7_w33OISnmagcZNo/s640/ocr-chose-db.png" width="640" /></a><br />
<br />
Siguiendo cualquier de los tres links vamos a la documentación, que explica como usar cada imagen en las dos versiones disponibles. Es la referencia para cualquier cambio en la configuración que nos interese hacer.<br />
<br />
Ya creamos nuestro usuario y aceptamos los términos de uso.<br />
Lo siguiente es abrir una terminal en nuestro PC e iniciar sesión con Docker:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> C:\Users\calero><b>docker login container-registry.oracle.com</b><br /> Username: nelson.calero@gmail.com<br /> Password:<br /> Login Succeeded</span></span></blockquote>
<br />
Mientras no hayamos hecho los dos pasos anteriores, si intentamos bajar una imagen vamos a tener este error:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> C:\Users\calero><b>docker pull container-registry.oracle.com/database/enterprise</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Using default tag: latest</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Error response from daemon: pull access denied for container-registry.oracle.com/database/enterprise, repository does not exist or may require 'docker login'</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
Pero si hicimos ambos pasos, podemos descargar la imagen con la que nos interesa trabajar.<br />
En este ejemplo vamos a usar la version 12.2.<br />
La sintaxis para esta URL la vemos en <a href="https://container-registry.oracle.com/pls/apex/f?p=113:4:104287900740970::NO::P4_REPO_DETAIL:REPO&cs=3F5M1JhGLCBRh7yeSpyQ54Esap_uvzH9ml63WETV7LPdJvdlNEvSJlD0U6iVCuMN8GVmR1NnT5qaAE-m81LZ8VA" target="_blank">la página de OCR </a>que visitamos antes con la documentación. <br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">C:\Users\calero><b>docker pull container-registry.oracle.com/database/enterprise:12.2.0.1</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">12.2.0.1: Pulling from database/enterprise</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">9bd4d110366e: Downloading [> ] 2.668MB/143MB</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">af8b29651e27: Download complete</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">4c242ab1add4: Download complete</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
Vemos el progreso de la descarga en nuestra terminal. <br />
Cuando está completa, después de bajar 3.44Gb:<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<blockquote>
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">C:\Users\calero><b>docker pull container-registry.oracle.com/database/enterprise:12.2.0.1</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">cbb9821ba51c: Pull complete</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">9bd4d110366e: Pull complete</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">af8b29651e27: Pull complete</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">4c242ab1add4: Pull complete</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">7bda1e55bd08: Pull complete</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">Digest: sha256:42809e491491d7f07a2aa76903bb5feabe3a0d23abcb7e680264074f043a604c 5.853MB/2.737GB</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">Status: Downloaded newer image for container-registry.oracle.com/database/enterprise:12.2.0.1</span></span></blockquote>
<br />
Podemos consultar en docker los detalles de la imagen recién bajada:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> C:\Users\calero><b>docker images</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> REPOSITORY TAG IMAGE ID CREATED SIZE</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> container-registry.oracle.com/database/enterprise 12.2.0.1 12a359cd0528 5 months ago 3.44GB</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
Y también comprobar que no está ejecutando: <br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> C:\Users\calero><b>docker ps</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
La documentación de la imagen docker (misma URL que visitamos antes) explica que debemos crear una mínima configuración antes de poder ejecutar nuestro container. <br />
En mi caso sólo definí la memoria RAM a usar:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> C:\Users\calero><b>d:</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\><b>cd github</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\GitHub><b>echo DB_MEMORY=1Gb >ora.conf</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\GitHub><b>type ora.conf</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> DB_MEMORY=1Gb</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
Y levantamos nuestro container, indicando el archivo de configuración a usar:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\GitHub>d<b>ocker run -d -it --name ora122 -P --env-file ora.conf container-registry.oracle.com/database/enterprise:12.2.0.1</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 5896d37c1cae083c9ab82ec52cf9900a3b22a012b5257c1cb065a6093d7d55c5</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
La terminal nos devuelve el control enseguida porque docker queda ejecutando en un proceso del sistema.<br />
Podemos ver el avance del inicio del containter consultando su log.<br />
De nuevo en nuestra terminal, usamos la opcion -f de "docker logs" para ver los cambios que recibe el log sin que nos retorne el control.<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\GitHub><b>docker logs -f 5896d37c1cae083c9ab82ec52cf9900a3b22a012b5257c1cb065a6093d7d55c5</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Setup Oracle Database</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Oracle Database 12.2.0.1 Setup</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Sun Feb 11 21:09:42 UTC 2018</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Check parameters ......</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> log file is : /home/oracle/setup/log/paramChk.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> paramChk.sh is done at 1 sec</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> untar DB bits ......</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> log file is : /home/oracle/setup/log/untarDB.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> untarDB.sh is done at 329 sec</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> config DB ......</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> log file is : /home/oracle/setup/log/configDB.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Sun Feb 11 21:15:10 UTC 2018</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Start Docker DB configuration</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Call configDBora.sh to configure database</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Sun Feb 11 21:15:11 UTC 2018</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Configure DB as oracle user</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Setup Database directories ...</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL*Plus: Release 12.2.0.1.0 Production on Sun Feb 11 21:15:11 2018</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Copyright (c) 1982, 2016, Oracle. All rights reserved.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Connected to an idle instance.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> File created.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL> ORACLE instance started.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Total System Global Area 671088640 bytes</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Fixed Size 8796384 bytes</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Variable Size 192939808 bytes</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Database Buffers 465567744 bytes</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Redo Buffers 3784704 bytes</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Database mounted.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Database opened.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Database altered.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> NAME TYPE VALUE</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ------------------------------------ ----------- ------------------------------</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> spfile string /u01/app/oracle/product/12.2.0</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> /dbhome_1/dbs/spfileORCLCDB.or</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> a</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> NAME TYPE VALUE</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ------------------------------------ ----------- ------------------------------</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> encrypt_new_tablespaces string CLOUD_ONLY</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> User altered.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> User altered.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> update password</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Enter password for SYS:</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> create pdb : ORCLPDB1</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL*Plus: Release 12.2.0.1.0 Production on Sun Feb 11 21:16:12 2018</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Copyright (c) 1982, 2016, Oracle. All rights reserved.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Connected to:</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL> 2 3 4 5</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Pluggable database created.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Pluggable database altered.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Pluggable database altered.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Reset Database parameters</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL*Plus: Release 12.2.0.1.0 Production on Sun Feb 11 21:17:49 2018</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Copyright (c) 1982, 2016, Oracle. All rights reserved.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Connected to:</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> System altered.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 11-FEB-2018 21:17:49</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Copyright (c) 1991, 2016, Oracle. All rights reserved.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Starting /u01/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> TNSLSNR for Linux: Version 12.2.0.1.0 - Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> System parameter file is /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Log messages written to /u01/app/oracle/diag/tnslsnr/5896d37c1cae/listener/alert/log.xml</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> STATUS of the LISTENER</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ------------------------</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Alias LISTENER</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Start Date 11-FEB-2018 21:17:54</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Uptime 0 days 0 hr. 0 min. 4 sec</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Trace Level off</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Security ON: Local OS Authentication</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SNMP OFF</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Listener Parameter File /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Listener Log File /u01/app/oracle/diag/tnslsnr/5896d37c1cae/listener/alert/log.xml</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Listening Endpoints Summary...</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> The listener supports no services</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> The command completed successfully</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> DONE!</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Remove password info</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Docker DB configuration is complete !</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> configDB.sh is done at 493 sec</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Done ! The database is ready for use .</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> # ===========================================================================</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> # == Add below entries to your tnsnames.ora to access this database server ==</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> # ====================== from external host =================================</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ORCLCDB=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<ip-address>)(PORT=<port>))</port></ip-address></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLCDB.localdomain)))</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ORCLPDB1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<ip-address>)(PORT=<port>))</port></ip-address></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLPDB1.localdomain)))</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> #</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> #ip-address : IP address of the host where the container is running.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> #port : Host Port that is mapped to the port 1521 of the container.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> #</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> # The mapped port can be obtained from running "docker port <container-id>"</container-id></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> # ===========================================================================</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Current log# 1 seq# 4 mem# 0: /u04/app/oracle/redo/redo001.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 2018-02-11T21:17:48.196143+00:00</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ORCLPDB1(3):Opening pdb with no Resource Manager plan active</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Pluggable database ORCLPDB1 opened read write</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Completed: alter pluggable database ORCLPDB1 open</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 2018-02-11T21:17:49.269276+00:00</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> alter pluggable database all save state</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Completed: alter pluggable database all save state</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 2018-02-11T21:17:49.666526+00:00</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ALTER SYSTEM SET encrypt_new_tablespaces='DDL' SCOPE=BOTH;</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 2018-02-11T21:25:41.683157+00:00</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Resize operation completed for file# 3, old size 706560K, new size 727040K</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 2018-02-11T21:25:42.432198+00:00</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ORCLPDB1(3):Resize operation completed for file# 18, old size 583680K, new size 604160K</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 2018-02-11T21:26:53.618735+00:00</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Thread 1 advanced to log sequence 5 (LGWR switch)</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Current log# 2 seq# 5 mem# 0: /u04/app/oracle/redo/redo002.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 2018-02-11T21:31:52.534344+00:00</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Thread 1 advanced to log sequence 6 (LGWR switch)</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Current log# 3 seq# 6 mem# 0: /u04/app/oracle/redo/redo003.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
<br />
Después de unos minutos nuestra base está lista para ser usada, así que podemos cancelar el despliegue de logs o abrir otra terminal para comprobarlo:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\GitHub><b>docker ps</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 5896d37c1cae container-registry.oracle.com/database/enterprise:12.2.0.1 "/bin/sh -c '/bin/ba…" 24 minutes ago Up 24 minutes (healthy) 0.0.0.0:32769->1521/tcp, 0.0.0.0:32768->5500/tcp ora122</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
Podemos abrir una sesion ssh a nuestro container y revisar cómo quedó:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> D:\GitHub><b>docker exec -i -t 5896d37c1cae /bin/bash</b></span><br /><span style="font-size: x-small;"> [oracle@5896d37c1cae /]$ <b>df -h</b></span><br /><span style="font-size: x-small;"> Filesystem Size Used Avail Use% Mounted on</span><br /><span style="font-size: x-small;"> none 94G 29G 61G 32% /</span><br /><span style="font-size: x-small;"> tmpfs 64M 0 64M 0% /dev</span><br /><span style="font-size: x-small;"> tmpfs 1002M 0 1002M 0% /sys/fs/cgroup</span><br /><span style="font-size: x-small;"> /dev/sda1 94G 29G 61G 32% /ORCL</span><br /><span style="font-size: x-small;"> shm 64M 0 64M 0% /dev/shm</span><br /><span style="font-size: x-small;"> tmpfs 1002M 0 1002M 0% /proc/scsi</span><br /><span style="font-size: x-small;"> tmpfs 1002M 0 1002M 0% /sys/firmware</span><br /><span style="font-size: x-small;"> [oracle@5896d37c1cae /]$ <b>ps -eaf | grep pmon</b></span><br /><span style="font-size: x-small;"> oracle 112 1 0 21:15 ? 00:00:00 ora_pmon_ORCLCDB</span><br /><span style="font-size: x-small;"> oracle 991 973 0 21:36 pts/1 00:00:00 grep --color=auto pmon</span><br /><span style="font-size: x-small;"> [oracle@5896d37c1cae /]$ <b>env | grep ORA</b></span><br /><span style="font-size: x-small;"> ORACLE_SID=ORCLCDB</span><br /><span style="font-size: x-small;"> ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1</span><br /><span style="font-size: x-small;"> [oracle@5896d37c1cae /]$ <b>sqlplus / as sysdba</b></span><br /><br /><span style="font-size: x-small;"> SQL*Plus: Release 12.2.0.1.0 Production on Sun Feb 11 21:37:06 2018</span><br /><br /><span style="font-size: x-small;"> Copyright (c) 1982, 2016, Oracle. All rights reserved.</span><br /><br /><br /><span style="font-size: x-small;"> Connected to:</span><br /><span style="font-size: x-small;"> Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span><br /><br /><span style="font-size: x-small;"> SQL> <b>show sga</b></span><br /><br /><span style="font-size: x-small;"> Total System Global Area 671088640 bytes</span><br /><span style="font-size: x-small;"> Fixed Size 8796384 bytes</span><br /><span style="font-size: x-small;"> Variable Size 230688544 bytes</span><br /><span style="font-size: x-small;"> Database Buffers 427819008 bytes</span><br /><span style="font-size: x-small;"> Redo Buffers 3784704 bytes</span><br /><span style="font-size: x-small;"> SQL> <b>show pdbs</b></span><br /><br /><span style="font-size: x-small;"> CON_ID CON_NAME OPEN MODE RESTRICTED</span><br /><span style="font-size: x-small;"> ---------- ------------------------------ ---------- ----------</span><br /><span style="font-size: x-small;"> 2 PDB$SEED READ ONLY NO</span><br /><span style="font-size: x-small;"> 3 ORCLPDB1 READ WRITE NO</span><br /><span style="font-size: x-small;"> SQL> <b>show parameter sga</b></span><br /><br /><span style="font-size: x-small;"> NAME TYPE VALUE</span><br /><span style="font-size: x-small;"> ------------------------------------ ----------- ------------------------------</span><br /><span style="font-size: x-small;"> allow_group_access_to_sga boolean FALSE</span><br /><span style="font-size: x-small;"> lock_sga boolean FALSE</span><br /><span style="font-size: x-small;"> pre_page_sga boolean TRUE</span><br /><span style="font-size: x-small;"> sga_max_size big integer 640M</span><br /><span style="font-size: x-small;"> sga_min_size big integer 0</span><br /><span style="font-size: x-small;"> sga_target big integer 640M</span><br /><span style="font-size: x-small;"> unified_audit_sga_queue_size integer 1048576</span><br /><span style="font-size: x-small;"> SQL> <b>show parameter pga</b></span><br /><br /><span style="font-size: x-small;"> NAME TYPE VALUE</span><br /><span style="font-size: x-small;"> ------------------------------------ ----------- ------------------------------</span><br /><span style="font-size: x-small;"> pga_aggregate_limit big integer 2G</span><br /><span style="font-size: x-small;"> pga_aggregate_target big integer 384M</span><br /><span style="font-size: x-small;"> SQL> <b>exit</b></span><br /><span style="font-size: x-small;"> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span></span></blockquote>
<br />
Los archivos usados por Docker para configurar nuestra base están dentro del container, tal como se vio en los logs más arriba. Podemos revisar cuales son todos estos scripts, por si nos interesa hacerles cambios:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> [oracle@5896d37c1cae /]$ <b>cd /home/oracle/setup</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> [oracle@5896d37c1cae setup]$ <b>ls -lrt</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> total 60</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 1340 Aug 17 20:42 untarDB.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 1708 Aug 17 20:42 tnsentry.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 1361 Aug 17 20:42 startupDB.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 1298 Aug 17 20:42 shutDB.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 3019 Aug 17 20:42 setupDB.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 1229 Aug 17 20:42 patchDB.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 18 Aug 17 20:42 patchDB.dat</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 1782 Aug 17 20:42 paramChk.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 763 Aug 17 20:42 healthcheck.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 2165 Aug 17 20:42 dockerInit.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 6587 Aug 17 20:42 configDBora.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rwxr-xr-- 1 oracle oinstall 1476 Aug 17 20:42 configDB.sh</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> drwxr-xr-- 2 oracle oinstall 4096 Feb 11 21:15 log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rw-r--r-- 1 oracle oinstall 163 Feb 11 21:17 DB_ENV</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> [oracle@5896d37c1cae setup]$ <b>ls -lrt log</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> total 20</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rw-r--r-- 1 oracle oinstall 292 Feb 11 21:09 paramChk.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rw-r--r-- 1 oracle oinstall 127 Feb 11 21:09 untarDB.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rw-r--r-- 1 oracle oinstall 3542 Feb 11 21:17 configDB.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rw-r--r-- 1 oracle oinstall 404 Feb 11 21:17 setupDB.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> -rw-r--r-- 1 oracle oinstall 52 Feb 11 21:17 dockerInit.log</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> [oracle@5896d37c1cae setup]$</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
También podemos conectarnos a la instancia de base de datos usando un cliente instalado en nuestro host, en vez de usar la instalación de Oracle dentro del container.<br />
Los puertos usados por Oracle vienen mapeados en esta imagen para que se puedan usar fuera del container:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\GitHub><b>docker port ora122</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 5500/tcp -> 0.0.0.0:32768</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 1521/tcp -> 0.0.0.0:32769</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
<br />
Revisando los logs de creación del contanier que vimos antes, podemos identificar los datos que se necesitan para armar el string de conexión a la base de datos, y usar sqlplus instalado en el PC para conetarnos:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\GitHub><b>docker-machine ip</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> 192.168.99.100</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> D:\GitHub><b>sqlplus system/Oradoc_db1@//192.168.99.100:32769/ORCLPDB1.localdomain</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 11 18:51:14 2018</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Copyright (c) 1982, 2014, Oracle. All rights reserved.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Connected to:</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> SQL> <b>exit</b></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></blockquote>
Espero les sea útil.<br />
Un saludoNelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-64212323568228121222018-03-05T01:10:00.000-03:002018-03-05T01:10:43.100-03:00Oracle 12c VMs en Windows 10 con Vagrant y Ubuntu (WLS) - errores (2/2)Continuando con el <a href="http://databaseindex.blogspot.com.uy/2018/03/oracle-12c-vagrant-windows-wls-ubuntu.html" target="_blank">post anterior</a>, estos son algunos errores posibles si no seguimos los pasos en el orden descrito en el artículo. Seguramente hay muchos más, esto es solo una muestra de lo que puede salir mal en esta configuración (Windows 10.0.16299.192, VirtualBox 5.2.6r120293, Vagrant 2.0.1), así la guía principal de configuración (post anterior) se mantiene simple. <br />
<br />
<b>a) Error al intentar iniciar VMs Virtualbox desde Windows</b><br />
<br />
Esto fue luego de actualizar la versión de VirtualBox en Windows de 5.1.4r110228 a 5.2.6.<br />
Al intentar arrancar cualquier VM que ya existía, reportaba este error:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> 34b0.21f8: NtCreateFile(\Device\VBoxDrvStub) failed: Unknown Status -5657 (0xffffe9e7) (rcNt=0xe986e9e7)</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> VBoxDrvStub error: Not signed with the build certificate.: \Device\HarddiskVolume3\Program Files\Oracle\VirtualBox\VirtualBox.exe</span></span></blockquote>
<br />
Revisando problemas conocidos encontré <a href="https://www.virtualbox.org/ticket/16318" target="_blank">esta nota</a>.<br />
Siguiendo las validaciones, en mi caso los drivers eran:<br />
<blockquote class="tr_bq">
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> C:\Users\calero\Downloads>driverquery | findstr /I virtualbox</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> VBoxDrv VirtualBox Service Kernel 1/15/2018 11:59:22 AM</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> VBoxNetAdp VirtualBox NDIS 6.0 Mi Kernel 1/15/2018 11:59:22 AM</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> VBoxNetLwf VirtualBox NDIS6 Bridg Kernel 1/15/2018 11:59:22 AM</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> VBoxUSBMon VirtualBox USB Monitor Kernel 1/15/2018 11:59:22 AM</span></span></blockquote>
<br />
Y este es el detalle de VBoxDrv:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> C:\Users\calero>driverquery /v | findstr /I vboxdrv</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> VBoxDrv VirtualBox Service VirtualBox Service Kernel System Stop Pendi Degraded TRUE FALSE 0 614,400 0 1/15/2018 11:59:22 AM C:\WINDOWS\system32\DRIVERS\VBoxDrv.sys 4,096</span></span></blockquote>
<br />
En mi caso lo pude resolver usando la opción de "Reparar la instalación" de programas en Windows.<br />
Esto se hace en "Control Panel\Programs\Programs and Features", buscar "Oracle VM VirtualBox", botón derecho sobre esa entrada y elegir "repair".<br />
<br />
<br />
<b>b) Error por usar binarios linux de VirtualBox </b><br />
<br />
Si instalan VirtualBox en Ubuntu, cuando lo quieran usar van a tener este error:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ VBoxManage -v</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> WARNING: The character device /dev/vboxdrv does not exist.</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> Please install the virtualbox-dkms package and the appropriate</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> headers, most likely linux-headers-Microsoft.</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> You will not be able to start VMs until this problem is fixed.</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> 5.0.40_Ubuntur115130</span></span></blockquote>
<br />
Notar que instalé VirtualBox en Ubuntu solo para probar si funcionaba. <br />
A los efectos de la configuración explicada en el post anterior, pueden asumir que esto no lo hicieron, no tienen virtualbox instalado en unbuntu. Yo lo desinstalé antes de instalar Vagrant. <br />
Para ser rigurosos en los pasos que ejecuté, fueron (aunque sin los detalles ya que no aportan para el resultado final):<br />
<br />
<blockquote class="tr_bq">
sudo apt install virtualbox<br />
sudo apt-get install virtualbox-dkms <br />
sudo apt-get purge virtualbox<br />
sudo dpkg -i vagrant_2.0.1_x86_64.deb (sólo esto incluí en el post anterior)</blockquote>
<br />
<br />
<b>c) Virtualbox no está en el path al usar Vagrant</b><br />
<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant up</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system. The reason is shown below:</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"><br /></span></span>
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> The "VBoxManage.exe" command or one of its dependencies could not be found. Please verify VirtualBox is properly installed. You can verify everything is okay by running "VBoxManage.exe --version" and verifying that the VirtualBox version is outputted.</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"><br /></span></span>
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> If you just installed VirtualBox, you have to log out and log back in for the new environmental variables to take effect. Using the VirtualBox provider within the WSL requires VirtualBox executables to be available on the system PATH.</span></span></blockquote>
<br />
No necesita explicación, tal como dice el error, ajustando el path se arregla.<br />
<br />
<br />
<b>d) Mezclar ejecuciones de Vagrant desde ubuntu y desde Windows sobre el mismo repo.</b><br />
<br />
Si al clonar el repositorio primero intentamos usarlo desde Windows con 'vagrant up' (ya sabemos que va a fallar), y después vamos a Ubuntu para tratar de usarlo, tenemos este error:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant up</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> The VirtualBox VM was created with a user that doesn't match the</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> current user running Vagrant. VirtualBox requires that the same user</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> be used to manage the VM that was created. Please re-run Vagrant with</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> that user. This is not a Vagrant issue.</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> The UID used to create the VM was: 0</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> Your UID is: 1000</span></span></blockquote>
<br />
Los archivos creados en Windows se ven como si fueran de root en ubuntu, pero eso no impide que vagrant funcione:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ id</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> uid=1000(ncalero) gid=1000(ncalero) groups=1000(ncalero),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),110(lxd)</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ls -la</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> total 512</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> drwxrwxrwx 0 root root 512 Jan 21 13:38 .</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> drwxrwxrwx 0 root root 512 Apr 25 2016 ..</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> drwxrwxrwx 0 root root 512 Jan 21 13:38 ansible</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> drwxrwxrwx 0 root root 512 Jan 21 13:38 .git</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> -rwxrwxrwx 1 root root 1231 Jan 21 13:38 README.md</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> drwxrwxrwx 0 root root 512 Jan 21 13:55 .vagrant</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> -rwxrwxrwx 1 root root 14051 Jan 21 17:52 Vagrantfile</span></span></blockquote>
<br />
Para evitar este error, lo más simple es usar un directorio nuevo para nuestras pruebas en Ubuntu:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ mv .vagrant .vagrant-win</span></span></blockquote>
<br />
Ahora la ejecución desde Ubuntu con nuestro usuario funciona como se describió en el post anterior:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant up</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> Bringing machine 'default' up with 'virtualbox' provider...</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ==> default: Box 'bento/oracle-6.9' could not be found. Attempting to find and install...</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> default: Box Provider: virtualbox</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ...</span></span></blockquote>
<br />
<br />
<b>e) Error por no configurar las variables de ambiente</b><br />
<br />
Si tratamos de usar vagrant en ubuntu sin configurar las variables de ambiente necesarias, vamos a tener este error:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant box list</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> Vagrant will not operate outside the Windows Subsystem for Linux unless explicitly</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> instructed. Due to the inability to enforce expected Linux file ownership and</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> permissions on the Windows system, Vagrant will not make modifications to prevent</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> unexpected errors. To learn more about this, and the options that are available,</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> please refer to the Vagrant documentation:</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> https://www.vagrantup.com/docs/other/wsl.html</span></span></blockquote>
<br />
<br />
Se arregla fácil configurando las variables descritas en el post anterior.<br />
<br />
<br />
<b>f) Error por falta de claves ssh al hacer 'provision'</b><br />
<br />
Si ejecutamos 'vagrant provision' sin tener claves ssh para nuestro usuario:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;">ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant provision</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ==> default: Running provisioner: ansible...</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> Vagrant has automatically selected the compatibility mode '2.0'</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> according to the Ansible version installed (2.4.2.0).</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> Alternatively, the compatibility mode can be specified in your Vagrantfile:</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> default: Running ansible-playbook...</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> PLAY [all] *********************************************************************</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> TASK [install simplejson if needed] ********************************************</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> changed: [default]</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> PLAY [all] *********************************************************************</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> TASK [Gathering Facts] *********************************************************</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ok: [default]</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> ...</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> </span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> TASK [setup_linux : copy public key to authorized_key file of root] ************</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> [WARNING]: Unable to find '~/.ssh/id_rsa.pub' in expected paths.</span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"><br /></span></span></blockquote>
<blockquote>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> fatal: [default]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'file'. Error was a </span></span><class ansible.errors.ansibleerror=""><span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;">, original message: could not locate file in lookup: ~/.ssh/id_rsa.pub"}</span></span></class><br /><class ansible.errors.ansibleerror=""><span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> to retry, use: --limit @/mnt/d/GitHub/vagrant-builder/ansible/setup.retry</span></span></class><br /><class ansible.errors.ansibleerror=""><span style="font-family: "Courier New", Courier, monospace;"></span></class><br /><class ansible.errors.ansibleerror=""><span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> PLAY RECAP *********************************************************************</span></span></class><br /><class ansible.errors.ansibleerror=""><span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> default : ok=27 changed=13 unreachable=0 failed=1</span></span></class><br /><class ansible.errors.ansibleerror=""><span style="font-family: "Courier New", Courier, monospace;"></span></class><br /><class ansible.errors.ansibleerror=""><span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> Ansible failed to complete successfully. Any error output should be</span></span></class><br /><class ansible.errors.ansibleerror=""><span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> visible above. Please fix these errors and try again.</span></span></class><br /><class ansible.errors.ansibleerror=""></class></blockquote>
<class ansible.errors.ansibleerror=""><br />Esto se resuelve creando la clave ssh como se describe en el post anterior.</class><br />
<class ansible.errors.ansibleerror=""><br /></class>Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-79008123820036848072018-03-05T01:09:00.000-03:002018-03-05T01:09:13.273-03:00Oracle 12c VMs en Windows 10 con Vagrant y Ubuntu (WLS)En el <a href="http://databaseindex.blogspot.com.uy/2018/02/crear-oracle-standby-12c-usando.html" target="_blank">post anterior</a> mostré como crear en Windows un ambiente virtual (VirtualBox) Oracle 12c en una configuración Standby (dos VMs y dataguard) de forma automática usando Vagrant/Ansible: .<br />
<br />
Hay otras forma de hacer lo mismo en Windows 10, y de paso experimentar con Ubuntu usando el Windows Subsystem for Linux (WSL). <br />
En realidad es el objetivo de este post, usando como excusa algo que ya conocemos un poco y nos interesa seguir aprendiendo.<br />
<br />
Voy a usar el repositorio <a href="https://gitlab.com/FritsHoogland/vagrant-builder.git" target="_blank">vagrant-builder</a> de Frits Hoogland, que <a href="https://fritshoogland.wordpress.com/2017/09/13/how-to-automatically-build-any-recent-version-of-the-oracle-database" target="_blank">tiene documentado</a> el uso de diferentes versiones de OS y BD, incluyendo la que me interesaba probar: OEL 6.9 y 11.2.0.4.0.<br />
<br />
Podría usar el mismo repositorio que antes, de <a href="https://github.com/oravirt/" target="_blank">oravirt</a>, pero es interesante probar este uso de vagrant que no usa <a href="https://www.vagrantup.com/docs/provisioning/ansible_local.html" target="_blank">ansible_local</a>, por lo que no funciona en Windows.<br />
<br />
Hace unos días Oracle hizo público su propio <a href="https://github.com/oracle/vagrant-boxes" target="_blank">repositorio Vagrant</a>, incluyendo dos configuraciones: 12.2.0.1 y XE 11.2.0.2.<br />
También es un buen candidato a probar, aunque sea una versión distinta a la que me interesa usar ahora.<br />
Pero esta prueba ya la tengo en draft desde hace algunas semanas y casi pronta para publicar, así que ese queda para otro post.<br />
<br />
Durante esta prueba encontré varios problemas que los incluyo en otro post (<a href="http://databaseindex.blogspot.com/2018/03/oracle-12c-vagrant-windows-wls-errores.html" target="_blank">parte 2</a>) para mantener éste lo más simple posible.<br />
Sólo voy a mencionar acá las soluciones a errores que no evité de forma definitiva. <br />
O sea, los que corregí a mano para poder continuar, pero que se van a repetir si arrancamos el proceso desde el principio.<br />
<br />
<br />
<h4>
Ubuntu en Windows 10</h4>
<br />
Esta funcionalidad es para desarrolladores y todavía en beta. <br />
Algo interesante es que los programas que ejecutamos desde la consola Ubuntu en Windows no usa los binarios que ya tenemos instalados en Windows, sino que tenemos que instalar nuevos binarios para ubuntu, aunque tengamos el mismo programa funcionando en Windows. <br />
Por más detalles de porqué esto es así, ver <a href="https://github.com/Microsoft/WSL/issues/589" target="_blank">este link</a>.<br />
<br />
Yo seguí la <a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10" target="_blank">documentación de Microsoft para habiliar WSL</a>, usando la opción de Microsoft Store. <br />
Todo funcionó como tal como se describe en esa guía sin problemas.<br />
<br />
Una vez instalado, al abrir una consola Ubuntu por primera vez, se completa la instalación (botón <i>launch </i>como se describe arriba, o buscar "ubuntu" en el menú de inicio de Windows):<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Installing, this may take a few minutes...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Installation successful!</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Please create a default UNIX user account. The username does not need to match your Windows username.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> For more information visit: https://aka.ms/wslusers</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Enter new UNIX username: ncalero</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Enter new UNIX password:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Retype new UNIX password:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> passwd: password updated successfully</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Default UNIX user set to: ncalero</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> To run a command as administrator (user "root"), use "sudo <command></command>".</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> See "man sudo_root" for details.</span></span></blockquote>
<br />
Como ven se pide crear un usuario unix. Yo creé <i>ncalero</i>.<br />
<br />
<br />
<h3>
Instalar Ansible en Ubuntu WSL</h3>
<br />
Para instalar Ansible se tienen que hacer unos pasos extras. Yo seguí <a href="https://www.jeffgeerling.com/blog/2017/using-ansible-through-windows-10s-subsystem-linux" target="_blank">esta guía</a>.<br />
<br />
Si no se ejecuta primero '<i>apt-get update</i>' como se describe, vamos a tener este error:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:~$ sudo apt-get -y install python-pip python-dev libffi-dev libssl-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [sudo] password for ncalero:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Reading package lists... Done</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Building dependency tree</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Reading state information... Done</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> E: Unable to locate package python-pip</span></span></blockquote>
<br />
Este es el detalle de ejecutar esos pasos.<br />
Hice una pequeña variante instalando primero un solo paquete (python-dev) para confirmar que funcione como se espera, y después el resto:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:~$ sudo su -</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> root@H6RMYZ1:~# apt-get update</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:5 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [425 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [186 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:8 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7224 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:9 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2152 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [196 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [101 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3208 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:13 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1408 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:14 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4354 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:15 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:16 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [700 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [292 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7624 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2272 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [574 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [232 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8052 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:25 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4840 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:26 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [3220 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:27 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6612 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:28 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3768 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Fetched 15.2 MB in 56s (268 kB/s)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Reading package lists... Done</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> root@H6RMYZ1:~# </span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> root@H6RMYZ1:~# apt-get install python-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Reading package lists... Done</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Building dependency tree</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Reading state information... Done</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The following package was automatically installed and is no longer required:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libfreetype6</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Use 'apt autoremove' to remove it.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The following additional packages will be installed:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libc-dev-bin libc6 libc6-dev libexpat1-dev libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libpython2.7-minimal libpython2.7-stdlib linux-libc-dev manpages-dev python python-minimal python2.7 python2.7-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> python2.7-minimal</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Suggested packages:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> glibc-doc python-doc python-tk python2.7-doc binutils binfmt-support</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The following NEW packages will be installed:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libc-dev-bin libc6-dev libexpat1-dev libpython-dev libpython-stdlib libpython2.7 libpython2.7-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libpython2.7-minimal libpython2.7-stdlib linux-libc-dev manpages-dev python python-dev python-minimal python2.7</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> python2.7-dev python2.7-minimal</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The following packages will be upgraded:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libc6</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 1 upgraded, 17 newly installed, 0 to remove and 82 not upgraded.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Need to get 38.4 MB/40.8 MB of archives.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> After this operation, 84.4 MB of additional disk space will be used.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Do you want to continue? [Y/n] y</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.3 [340 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.3 [1261 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6 amd64 2.23-0ubuntu10 [2580 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.3 [1880 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.3 [224 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc-dev-bin amd64 2.23-0ubuntu10 [68.7 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-libc-dev amd64 4.4.0-109.132 [829 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6-dev amd64 2.23-0ubuntu10 [2079 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7 amd64 2.7.12-1ubuntu0~16.04.3 [1070 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [27.8 MB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-dev amd64 2.7.12-1ubuntu0~16.04.3 [276 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Fetched 38.4 MB in 2min 39s (240 kB/s)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preconfiguring packages ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libpython2.7-minimal:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> (Reading database ... 25532 files and directories currently installed.)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libpython2.7-minimal_2.7.12-1ubuntu0~16.04.3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python2.7-minimal.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python2.7-minimal_2.7.12-1ubuntu0~16.04.3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-minimal.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-minimal_2.7.11-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-minimal (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libc6_2.23-0ubuntu10_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libc6:amd64 (2.23-0ubuntu10) over (2.23-0ubuntu9) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libc6:amd64 (2.23-0ubuntu10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for libc-bin (2.23-0ubuntu9) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for man-db (2.7.5-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libpython2.7-stdlib:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> (Reading database ... 25769 files and directories currently installed.)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python2.7.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python2.7_2.7.12-1ubuntu0~16.04.3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python2.7 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libpython-stdlib:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libpython-stdlib_2.7.11-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libpython-stdlib:amd64 (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for mime-support (3.59ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for man-db (2.7.5-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python2.7-minimal (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Linking and byte-compiling packages for runtime python2.7...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-minimal (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> (Reading database ... 26278 files and directories currently installed.)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python_2.7.11-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libc-dev-bin.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libc-dev-bin_2.23-0ubuntu10_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libc-dev-bin (2.23-0ubuntu10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package linux-libc-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../linux-libc-dev_4.4.0-109.132_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking linux-libc-dev:amd64 (4.4.0-109.132) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libc6-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libc6-dev_2.23-0ubuntu10_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libc6-dev:amd64 (2.23-0ubuntu10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libexpat1-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libexpat1-dev_2.1.0-7ubuntu0.16.04.3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libpython2.7:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libpython2.7_2.7.12-1ubuntu0~16.04.3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libpython2.7:amd64 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libpython2.7-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libpython2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libpython-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libpython-dev_2.7.11-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libpython-dev:amd64 (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package manpages-dev.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../manpages-dev_4.04-2_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking manpages-dev (4.04-2) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python2.7-dev.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python2.7-dev_2.7.12-1ubuntu0~16.04.3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python2.7-dev (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-dev.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-dev_2.7.11-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-dev (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for man-db (2.7.5-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for libc-bin (2.23-0ubuntu9) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python2.7 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libpython-stdlib:amd64 (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libc-dev-bin (2.23-0ubuntu10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up linux-libc-dev:amd64 (4.4.0-109.132) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libc6-dev:amd64 (2.23-0ubuntu10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libexpat1-dev:amd64 (2.1.0-7ubuntu0.16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libpython2.7:amd64 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libpython2.7-dev:amd64 (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libpython-dev:amd64 (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up manpages-dev (4.04-2) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python2.7-dev (2.7.12-1ubuntu0~16.04.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-dev (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for libc-bin (2.23-0ubuntu9) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> root@H6RMYZ1:~# apt-get -y install python-pip libffi-dev libssl-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Reading package lists... Done</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Building dependency tree</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Reading state information... Done</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The following package was automatically installed and is no longer required:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libfreetype6</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Use 'apt autoremove' to remove it.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The following additional packages will be installed:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> binutils build-essential cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 gcc-5-base libalgorithm-diff-perl</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1 libcc1-0 libcilkrts5 libdpkg-perl libfakeroot</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpython-all-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libquadmath0 libssl-doc libssl1.0.0 libstdc++-5-dev libstdc++6 libtsan0 libubsan0 make python-all python-all-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> python-pip-whl python-pkg-resources python-setuptools python-wheel zlib1g-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Suggested packages:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> binutils-doc cpp-doc gcc-5-locales debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-5-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libstdc++-5-doc make-doc python-setuptools-doc</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The following NEW packages will be installed:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> binutils build-essential cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 libalgorithm-diff-perl</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1 libcc1-0 libcilkrts5 libdpkg-perl libfakeroot</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libffi-dev libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpython-all-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libquadmath0 libssl-dev libssl-doc libstdc++-5-dev libtsan0 libubsan0 make python-all python-all-dev python-pip</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> python-pip-whl python-pkg-resources python-setuptools python-wheel zlib1g-dev</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The following packages will be upgraded:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> gcc-5-base libssl1.0.0 libstdc++6</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 3 upgraded, 44 newly installed, 0 to remove and 79 not upgraded.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Need to get 39.4 MB of archives.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> After this operation, 135 MB of additional disk space will be used.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libmpc3 amd64 1.0.3-1 [39.7 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5-base amd64 5.4.0-6ubuntu1~16.04.5 [17.1 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++6 amd64 5.4.0-6ubuntu1~16.04.5 [393 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl1.0.0 amd64 1.0.2g-1ubuntu4.10 [1083 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils amd64 2.26.1-1ubuntu1~16.04.6 [2311 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 libisl15 amd64 0.16.1-1 [524 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.5 [7786 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:8 http://archive.ubuntu.com/ubuntu xenial/main amd64 cpp amd64 4:5.3.1-1ubuntu1 [27.7 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.5 [38.8 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.5 [55.1 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.5 [27.4 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.5 [8920 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.5 [264 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.5 [105 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.5 [244 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.5 [95.3 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.5 [40.1 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.5 [9786 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.5 [131 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.5 [2226 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.5 [8638 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 gcc amd64 4:5.3.1-1ubuntu1 [5244 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.5 [1430 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.5 [8435 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:25 http://archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1504 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:26 http://archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdpkg-perl all 1.18.4ubuntu1.3 [195 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg-dev all 1.18.4ubuntu1.3 [584 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:29 http://archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4758 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:30 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfakeroot amd64 1.20.2-1ubuntu1 [25.5 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:31 http://archive.ubuntu.com/ubuntu xenial/main amd64 fakeroot amd64 1.20.2-1ubuntu1 [61.8 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:32 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:33 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:34 http://archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:35 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfile-fcntllock-perl amd64 0.22-3 [32.0 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:36 http://archive.ubuntu.com/ubuntu xenial/main amd64 libpython-all-dev amd64 2.7.11-1 [992 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:37 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.1 [168 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:38 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.10 [1341 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:39 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-doc all 1.0.2g-1ubuntu4.10 [1079 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:40 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-all amd64 2.7.11-1 [978 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:41 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-all-dev amd64 2.7.11-1 [1000 B]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:42 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip-whl all 8.1.1-2ubuntu0.4 [1110 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:43 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 python-pip all 8.1.1-2ubuntu0.4 [144 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:44 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-pkg-resources all 20.7.0-1 [108 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:45 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-setuptools all 20.7.0-1 [169 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:46 http://archive.ubuntu.com/ubuntu xenial/universe amd64 python-wheel all 0.29.0-1 [48.0 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Get:47 http://archive.ubuntu.com/ubuntu xenial/main amd64 libffi-dev amd64 3.2.1-4 [161 kB]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Fetched 39.4 MB in 3min 18s (198 kB/s)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Extracting templates from packages: 100%</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preconfiguring packages ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libmpc3:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> (Reading database ... 29867 files and directories currently installed.)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libmpc3_1.0.3-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libmpc3:amd64 (1.0.3-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../gcc-5-base_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.5) over (5.4.0-6ubuntu1~16.04.4) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> (Reading database ... 29872 files and directories currently installed.)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libstdc++6_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.5) over (5.4.0-6ubuntu1~16.04.4) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for libc-bin (2.23-0ubuntu9) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for libc-bin (2.23-0ubuntu9) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> (Reading database ... 29872 files and directories currently installed.)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libssl1.0.0_1.0.2g-1ubuntu4.10_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libssl1.0.0:amd64 (1.0.2g-1ubuntu4.10) over (1.0.2g-1ubuntu4.8) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package binutils.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../binutils_2.26.1-1ubuntu1~16.04.6_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking binutils (2.26.1-1ubuntu1~16.04.6) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libisl15:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libisl15_0.16.1-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libisl15:amd64 (0.16.1-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package cpp-5.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package cpp.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../cpp_4%3a5.3.1-1ubuntu1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking cpp (4:5.3.1-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libcc1-0:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libgomp1:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libitm1:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libatomic1:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libasan2:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package liblsan0:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libtsan0:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libubsan0:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libcilkrts5:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libmpx0:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libquadmath0:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libgcc-5-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package gcc-5.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package gcc.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../gcc_4%3a5.3.1-1ubuntu1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking gcc (4:5.3.1-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libstdc++-5-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package g++-5.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.5_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking g++-5 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package g++.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../g++_4%3a5.3.1-1ubuntu1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking g++ (4:5.3.1-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package make.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../archives/make_4.1-6_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking make (4.1-6) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libdpkg-perl.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libdpkg-perl_1.18.4ubuntu1.3_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libdpkg-perl (1.18.4ubuntu1.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package dpkg-dev.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../dpkg-dev_1.18.4ubuntu1.3_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking dpkg-dev (1.18.4ubuntu1.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package build-essential.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../build-essential_12.1ubuntu2_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking build-essential (12.1ubuntu2) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libfakeroot:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libfakeroot_1.20.2-1ubuntu1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libfakeroot:amd64 (1.20.2-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package fakeroot.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../fakeroot_1.20.2-1ubuntu1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking fakeroot (1.20.2-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libalgorithm-diff-perl.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libalgorithm-diff-perl_1.19.03-1_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libalgorithm-diff-perl (1.19.03-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libalgorithm-diff-xs-perl.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libalgorithm-diff-xs-perl_0.04-4build1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libalgorithm-diff-xs-perl (0.04-4build1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libalgorithm-merge-perl.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libalgorithm-merge-perl_0.08-3_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libalgorithm-merge-perl (0.08-3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libfile-fcntllock-perl.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libfile-fcntllock-perl_0.22-3_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libfile-fcntllock-perl (0.22-3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libpython-all-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libpython-all-dev_2.7.11-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libpython-all-dev:amd64 (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package zlib1g-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libssl-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libssl-dev_1.0.2g-1ubuntu4.10_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libssl-dev:amd64 (1.0.2g-1ubuntu4.10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libssl-doc.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libssl-doc_1.0.2g-1ubuntu4.10_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libssl-doc (1.0.2g-1ubuntu4.10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-all.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-all_2.7.11-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-all (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-all-dev.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-all-dev_2.7.11-1_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-all-dev (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-pip-whl.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-pip-whl_8.1.1-2ubuntu0.4_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-pip-whl (8.1.1-2ubuntu0.4) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-pip.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-pip_8.1.1-2ubuntu0.4_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-pip (8.1.1-2ubuntu0.4) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-pkg-resources.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-pkg-resources_20.7.0-1_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-pkg-resources (20.7.0-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-setuptools.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-setuptools_20.7.0-1_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-setuptools (20.7.0-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package python-wheel.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../python-wheel_0.29.0-1_all.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking python-wheel (0.29.0-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package libffi-dev:amd64.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack .../libffi-dev_3.2.1-4_amd64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking libffi-dev:amd64 (3.2.1-4) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for libc-bin (2.23-0ubuntu9) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for man-db (2.7.5-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for install-info (6.1.0.dfsg.1-5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libmpc3:amd64 (1.0.3-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up binutils (2.26.1-1ubuntu1~16.04.6) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libisl15:amd64 (0.16.1-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up cpp-5 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up cpp (4:5.3.1-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up gcc-5 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up gcc (4:5.3.1-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up g++-5 (5.4.0-6ubuntu1~16.04.5) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up g++ (4:5.3.1-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up make (4.1-6) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libdpkg-perl (1.18.4ubuntu1.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up dpkg-dev (1.18.4ubuntu1.3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up build-essential (12.1ubuntu2) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libfakeroot:amd64 (1.20.2-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up fakeroot (1.20.2-1ubuntu1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libalgorithm-diff-perl (1.19.03-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libalgorithm-diff-xs-perl (0.04-4build1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libalgorithm-merge-perl (0.08-3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libfile-fcntllock-perl (0.22-3) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libpython-all-dev:amd64 (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libssl-dev:amd64 (1.0.2g-1ubuntu4.10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libssl-doc (1.0.2g-1ubuntu4.10) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-all (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-all-dev (2.7.11-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-pip-whl (8.1.1-2ubuntu0.4) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-pip (8.1.1-2ubuntu0.4) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-pkg-resources (20.7.0-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-setuptools (20.7.0-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up python-wheel (0.29.0-1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up libffi-dev:amd64 (3.2.1-4) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Processing triggers for libc-bin (2.23-0ubuntu9) ...</span></span></blockquote>
<br />
El último paso es instalar Ansible:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:~$ pip install ansible --user<br /> Collecting ansible<br /> Downloading ansible-2.4.2.0.tar.gz (6.5MB)<br /> 100% |################################| 6.5MB 156kB/s<br /> Collecting jinja2 (from ansible)<br /> Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)<br /> 100% |################################| 133kB 1.7MB/s<br /> Collecting PyYAML (from ansible)<br /> Downloading PyYAML-3.12.tar.gz (253kB)<br /> 100% |################################| 256kB 2.3MB/s<br /> Collecting paramiko (from ansible)<br /> Downloading paramiko-2.4.0-py2.py3-none-any.whl (192kB)<br /> 100% |################################| 194kB 2.6MB/s<br /> Collecting cryptography (from ansible)<br /> Downloading cryptography-2.1.4-cp27-cp27mu-manylinux1_x86_64.whl (2.2MB)<br /> 100% |################################| 2.2MB 335kB/s<br /> Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from ansible)<br /> Collecting MarkupSafe>=0.23 (from jinja2->ansible)<br /> Downloading MarkupSafe-1.0.tar.gz<br /> Collecting pyasn1>=0.1.7 (from paramiko->ansible)<br /> Downloading pyasn1-0.4.2-py2.py3-none-any.whl (71kB)<br /> 100% |################################| 71kB 1.6MB/s<br /> Collecting bcrypt>=3.1.3 (from paramiko->ansible)<br /> Downloading bcrypt-3.1.4-cp27-cp27mu-manylinux1_x86_64.whl (57kB)<br /> 100% |################################| 61kB 2.4MB/s<br /> Collecting pynacl>=1.0.1 (from paramiko->ansible)<br /> Downloading PyNaCl-1.2.1-cp27-cp27mu-manylinux1_x86_64.whl (696kB)<br /> 100% |################################| 706kB 920kB/s<br /> Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography->ansible)<br /> Downloading cffi-1.11.4-cp27-cp27mu-manylinux1_x86_64.whl (406kB)<br /> 100% |################################| 409kB 1.3MB/s<br /> Collecting enum34; python_version < "3" (from cryptography->ansible)<br /> Downloading enum34-1.1.6-py2-none-any.whl<br /> Collecting asn1crypto>=0.21.0 (from cryptography->ansible)<br /> Downloading asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)<br /> 100% |################################| 102kB 2.2MB/s<br /> Collecting idna>=2.1 (from cryptography->ansible)<br /> Downloading idna-2.6-py2.py3-none-any.whl (56kB)<br /> 100% |################################| 61kB 2.1MB/s<br /> Collecting six>=1.4.1 (from cryptography->ansible)<br /> Downloading six-1.11.0-py2.py3-none-any.whl<br /> Collecting ipaddress; python_version < "3" (from cryptography->ansible)<br /> Downloading ipaddress-1.0.19.tar.gz<br /> Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible)<br /> Downloading pycparser-2.18.tar.gz (245kB)<br /> 100% |################################| 256kB 1.7MB/s<br /> Building wheels for collected packages: ansible, PyYAML, MarkupSafe, ipaddress, pycparser<br /> Running setup.py bdist_wheel for ansible ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/82/72/89/bcdf63814af976426a34174577b5775d8604b268b1b21fdc1a<br /> Running setup.py bdist_wheel for PyYAML ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/2c/f7/79/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc<br /> Running setup.py bdist_wheel for MarkupSafe ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57<br /> Running setup.py bdist_wheel for ipaddress ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/d7/6b/69/666188e8101897abb2e115d408d139a372bdf6bfa7abb5aef5<br /> Running setup.py bdist_wheel for pycparser ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/95/14/9a/5e7b9024459d2a6600aaa64e0ba485325aff7a9ac7489db1b6<br /> Successfully built ansible PyYAML MarkupSafe ipaddress pycparser<br /> Installing collected packages: MarkupSafe, jinja2, PyYAML, pyasn1, six, pycparser, cffi, bcrypt, enum34, asn1crypto, idna, ipaddress, cryptography, pynacl, paramiko, ansible<br /> Successfully installed MarkupSafe PyYAML ansible asn1crypto bcrypt cffi cryptography enum34 idna ipaddress jinja2 paramiko pyasn1 pycparser pynacl six<br /> python: ../sysdeps/posix/getaddrinfo.c:2603: getaddrinfo: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)' failed.<br /> Aborted (core dumped)</span></span></blockquote>
<br />
Este error es conocido y <a href="https://github.com/Microsoft/WSL/issues/2142" target="_blank">descrito acá</a>.<br />
Se resuelve deshabilitando IPv6 en apt-get como root:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> root@H6RMYZ1:~# vi /etc/apt/apt.conf.d/99force-ipv4</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> root@H6RMYZ1:~# cat /etc/apt/apt.conf.d/99force-ipv4<br /> Acquire::ForceIPv4 "true";<br /> root@H6RMYZ1:~# exit<br /> ncalero@H6RMYZ1:~$ pip install ansible --user<br /> Collecting ansible<br /> Downloading ansible-2.4.2.0.tar.gz (6.5MB)<br /> 100% |################################| 6.5MB 133kB/s<br /> Collecting jinja2 (from ansible)<br /> Downloading Jinja2-2.10-py2.py3-none-any.whl (126kB)<br /> 100% |################################| 133kB 1.2MB/s<br /> Collecting PyYAML (from ansible)<br /> Downloading PyYAML-3.12.tar.gz (253kB)<br /> 100% |################################| 256kB 3.9MB/s<br /> Collecting paramiko (from ansible)<br /> Downloading paramiko-2.4.0-py2.py3-none-any.whl (192kB)<br /> 100% |################################| 194kB 817kB/s<br /> Collecting cryptography (from ansible)<br /> Downloading cryptography-2.1.4-cp27-cp27mu-manylinux1_x86_64.whl (2.2MB)<br /> 100% |################################| 2.2MB 493kB/s<br /> Collecting setuptools (from ansible)<br /> Downloading setuptools-38.4.0-py2.py3-none-any.whl (489kB)<br /> 100% |################################| 491kB 2.7MB/s<br /> Collecting MarkupSafe>=0.23 (from jinja2->ansible)<br /> Downloading MarkupSafe-1.0.tar.gz<br /> Collecting pyasn1>=0.1.7 (from paramiko->ansible)<br /> Downloading pyasn1-0.4.2-py2.py3-none-any.whl (71kB)<br /> 100% |################################| 71kB 1.1MB/s<br /> Collecting bcrypt>=3.1.3 (from paramiko->ansible)<br /> Downloading bcrypt-3.1.4-cp27-cp27mu-manylinux1_x86_64.whl (57kB)<br /> 100% |################################| 61kB 1.3MB/s<br /> Collecting pynacl>=1.0.1 (from paramiko->ansible)<br /> Downloading PyNaCl-1.2.1-cp27-cp27mu-manylinux1_x86_64.whl (696kB)<br /> 100% |################################| 706kB 1.6MB/s<br /> Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography->ansible)<br /> Downloading cffi-1.11.4-cp27-cp27mu-manylinux1_x86_64.whl (406kB)<br /> 100% |################################| 409kB 3.1MB/s<br /> Collecting enum34; python_version < "3" (from cryptography->ansible)<br /> Downloading enum34-1.1.6-py2-none-any.whl<br /> Collecting asn1crypto>=0.21.0 (from cryptography->ansible)<br /> Downloading asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)<br /> 100% |################################| 102kB 3.2MB/s<br /> Collecting idna>=2.1 (from cryptography->ansible)<br /> Downloading idna-2.6-py2.py3-none-any.whl (56kB)<br /> 100% |################################| 61kB 1.1MB/s<br /> Collecting six>=1.4.1 (from cryptography->ansible)<br /> Downloading six-1.11.0-py2.py3-none-any.whl<br /> Collecting ipaddress; python_version < "3" (from cryptography->ansible)<br /> Downloading ipaddress-1.0.19.tar.gz<br /> Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible)<br /> Downloading pycparser-2.18.tar.gz (245kB)<br /> 100% |################################| 256kB 3.6MB/s<br /> Building wheels for collected packages: ansible, PyYAML, MarkupSafe, ipaddress, pycparser<br /> Running setup.py bdist_wheel for ansible ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/82/72/89/bcdf63814af976426a34174577b5775d8604b268b1b21fdc1a<br /> Running setup.py bdist_wheel for PyYAML ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/2c/f7/79/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc<br /> Running setup.py bdist_wheel for MarkupSafe ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57<br /> Running setup.py bdist_wheel for ipaddress ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/d7/6b/69/666188e8101897abb2e115d408d139a372bdf6bfa7abb5aef5<br /> Running setup.py bdist_wheel for pycparser ... done<br /> Stored in directory: /home/ncalero/.cache/pip/wheels/95/14/9a/5e7b9024459d2a6600aaa64e0ba485325aff7a9ac7489db1b6<br /> Successfully built ansible PyYAML MarkupSafe ipaddress pycparser<br /> Installing collected packages: MarkupSafe, jinja2, PyYAML, pyasn1, six, pycparser, cffi, bcrypt, enum34, asn1crypto, idna, ipaddress, cryptography, pynacl, paramiko, setuptools, ansible<br /> Successfully installed MarkupSafe PyYAML ansible asn1crypto bcrypt cffi cryptography enum34 idna ipaddress jinja2 paramiko pyasn1 pycparser pynacl setuptools-20.7.0 six<br /> You are using pip version 8.1.1, however version 9.0.1 is available.<br /> You should consider upgrading via the 'pip install --upgrade pip' command.</span></span></blockquote>
<br />
Esta vez se instaló sin problemas.<br />
<br />
Para completar la configuración de Ansible sólo falta ajustar el path por defecto de nuestro usuario, para que incluya el directorio donde lo instalamos:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:~$ ansible --version</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ansible 2.4.2.0</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> config file = None</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> configured module search path = [u'/home/ncalero/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ansible python module location = /home/ncalero/.local/lib/python2.7/site-packages/ansible</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> executable location = /home/ncalero/.local/bin/ansible</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> python version = 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:~$ which ansible</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> /home/ncalero/.local/bin/ansible</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:~$ echo 'PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc</span></span></blockquote>
<br />
<br />
<h3>
Instalar Vagrant </h3>
<br />
Vagrant soporta usar WLS, también en estado de prueba (alpha).<br />
Aquí se explica cómo habilitarlo https://www.vagrantup.com/docs/other/wsl.html<br />
<br />
Vagrant no viene instalado por defecto:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:~$ vagrant up</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The program 'vagrant' is currently not installed. You can install it by typing:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> sudo apt install vagrant</span></span></blockquote>
<br />
Bajé la última versión disponible tal como se describe, que en mi caso fue el archivo <a href="https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.deb">vagrant_2.0.1_x86_64.deb</a>, al direcotrio <i>d:\vagrant.d</i> y lo instalé desde la consola Ubuntu:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:~$ cd /mnt/d/vagrant.d/</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/vagrant.d$ ls</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> boxes data gems insecure_private_key rgloader setup_version tmp vagrant_2.0.1_x86_64.deb</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/vagrant.d$ sudo dpkg -i vagrant_2.0.1_x86_64.deb</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Selecting previously unselected package vagrant.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> (Reading database ... 34983 files and directories currently installed.)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Preparing to unpack vagrant_2.0.1_x86_64.deb ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Unpacking vagrant (1:2.0.1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up vagrant (1:2.0.1) ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/vagrant.d$ which vagrant</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> /usr/bin/vagrant</span></span></blockquote>
<br />
<br />
Para VirtualBox podríamos pensar en seguir el mismo camino, pero, esto es importante: no es necesario. <br />
Vagrant va a usar lo que tenemos instalado en Windows, tal como lo aclara la documentación:<br />
<br />
<blockquote class="tr_bq">
<i>when using the VirtualBox provider Vagrant will interact with VirtualBox installed on the Windows system, not within the WSL. It is important to ensure that any required Windows executable is available within your PATH to allow Vagrant to access them.</i></blockquote>
<br />
<br />
Ahora sí, todo pronto para continuar. <br />
Sólo tenemos que ajustar variables de ambiente antes de usarlo:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/vagrant.d$ export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/vagrant.d$ export VAGRANT_WSL_WINDOWS_ACCESS_USER="calero"</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/vagrant.d$ export PATH=/home/ncalero/bin:/home/ncalero/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Users/calero/AppData/Local/Microsoft/WindowsApps:/snap/bin:/mnt/c/Program\ Files/Oracle/VirtualBox</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/vagrant.d$ export VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH="/mnt/d/GitHub/vargant-builder"</span></span></blockquote>
<br />
<h3>
Usando vagrant-builder</h3>
<br />
Lo primero es clonar el repositorio que vamos a usar:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/vagrant.d$ cd /mnt/d/GitHub</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub$ git clone --recursive https://gitlab.com/FritsHoogland/vagrant-builder.git</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Cloning into 'vagrant-builder'...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> remote: Counting objects: 432, done.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> remote: Compressing objects: 100% (181/181), done.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> remote: Total 432 (delta 228), reused 392 (delta 196)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Receiving objects: 100% (432/432), 80.85 KiB | 0 bytes/s, done.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Resolving deltas: 100% (228/228), done.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Checking connectivity... done.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub$ ls</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> vagrant-builder</span></span></blockquote>
<br />
<br />
Para usar este repositorio conviene revisar <a href="https://fritshoogland.wordpress.com/2017/09/13/how-to-automatically-build-any-recent-version-of-the-oracle-database">este blog post</a> donde se explica cómo configurarlo.<br />
<br />
Bajé de <a href="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html">OTN </a>los binarios que necesitamos para instalar Oracle y los dejé en el directorio <i>D:\GitHub\vagrant-builder\ansible\files</i>, así me evito problemas de conectividad durante la ejecución de vagrant (si no están se conecta y los baja):<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder/ansible/files$ ls -lrt</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> total 3664896</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwxrwxrwx 1 root root 1395582860 Jan 20 19:07 p13390677_112040_Linux-x86-64_1of7.zip</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwxrwxrwx 1 root root 1151304589 Jan 20 19:07 p13390677_112040_Linux-x86-64_2of7.zip</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwxrwxrwx 1 root root 1205251894 Jan 20 19:08 p13390677_112040_Linux-x86-64_3of7.zip</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwxrwxrwx 1 root root 1069 Jan 21 13:38 ocm.rsp</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwxrwxrwx 1 root root 6633 Jan 21 13:38 getMOSPatch.sh</span></span></blockquote>
<br />
Modificamos el archivo Vagrantfile para habilitar solo las versiones que queremos usar:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"> linux = "bento/oracle-6.9"</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"> vm_cpus = "2"</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"> vm_memory = "4096"</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"> vm_hostname = "oracle-OEL69"</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"> kernel = "kernel-2.6.32-696.el6"</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"> asm_version="11.2.0.4.0"</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: small;"> database_version="11.2.0.4.0"</span></span><br />
<br />
<br />
Ahora ejecutamos vagrant para que haga todo el trabajo:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub$ cd vagrant-builder/</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant up</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Bringing machine 'default' up with 'virtualbox' provider...<br /> ==> default: Box 'bento/oracle-6.9' could not be found. Attempting to find and install...<br /> default: Box Provider: virtualbox<br /> default: Box Version: >= 0<br /> ==> default: Loading metadata for box 'bento/oracle-6.9'<br /> default: URL: https://vagrantcloud.com/bento/oracle-6.9<br /> ==> default: Adding box 'bento/oracle-6.9' (v201801.02.0) for provider: virtualbox<br /> default: Downloading: https://vagrantcloud.com/bento/boxes/oracle-6.9/versions/201801.02.0/providers/virtualbox.box<br /> ==> default: Successfully added box 'bento/oracle-6.9' (v201801.02.0) for 'virtualbox'!<br /> ==> default: Importing base box 'bento/oracle-6.9'...<br /> ==> default: Matching MAC address for NAT networking...<br /> ==> default: Checking if box 'bento/oracle-6.9' is up to date...<br /> ==> default: Setting the name of the VM: oracle-OEL69<br /> ==> default: Clearing any previously set network interfaces...<br /> ==> default: Preparing network interfaces based on configuration...<br /> default: Adapter 1: nat<br /> default: Adapter 2: hostonly<br /> ==> default: Forwarding ports...<br /> default: 22 (guest) => 2222 (host) (adapter 1)<br /> ==> default: Running 'pre-boot' VM customizations...<br /> ==> default: Booting VM...<br /> ==> default: Waiting for machine to boot. This may take a few minutes...<br /> default: SSH address: 127.0.0.1:2222<br /> default: SSH username: vagrant<br /> default: SSH auth method: private key<br /> default: Warning: Remote connection disconnect. Retrying...<br /> default: Warning: Remote connection disconnect. Retrying...<br /> default: Warning: Remote connection disconnect. Retrying...<br /> default: Warning: Remote connection disconnect. Retrying...<br /> default: Warning: Remote connection disconnect. Retrying...<br /> ==> default: Machine booted and ready!<br /> ==> default: Checking for guest additions in VM...<br /> ==> default: Setting hostname...<br /> ==> default: Configuring and enabling network interfaces...<br /> default: SSH address: 127.0.0.1:2222<br /> default: SSH username: vagrant<br /> default: SSH auth method: private key<br /> ==> default: Running provisioner: ansible...<br /> Vagrant has automatically selected the compatibility mode '2.0'<br /> according to the Ansible version installed (2.4.2.0).<br /><br /> Alternatively, the compatibility mode can be specified in your Vagrantfile:<br /> https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode<br /><br /> default: Running ansible-playbook...<br /> ..</span></span></blockquote>
<br />
Como se ve en el log anterior, se descargó la VM para el OS que indicamos (OEL 6.9, bento/oracle-6.9).<br />
Es un archivo de 646Mb, tenerlo en cuenta en función de la conexión a internet que usemos.<br />
<br />
Despues de muchos pasos y un log bastante largo, me retornó este error:<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ...</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> }</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> to retry, use: --limit @/mnt/d/GitHub/vagrant-builder/ansible/setup.retry</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> PLAY RECAP *********************************************************************</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> default : ok=11 changed=1 unreachable=0 failed=1</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span>
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> Ansible failed to complete successfully. Any error output should be</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> visible above. Please fix these errors and try again.</span></span></blockquote>
<br />
<br />
El mensaje es claro. <br />
En realidad, SElinux debería deshabilitarse para nuestras VMs de prueba.<br />
<br />
Para validar como está configurada, necesitamos conectarnos a la VM.<br />
Podemos hacerlo por Virtualbox o usando ssh en nuestra terminal.<br />
La forma simple de usar ssh desde vagrant no está configurada para nuestra nueva VM:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant ssh oracle-OEL69</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The machine with the name 'oracle-OEL69' was not found configured for</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> this Vagrant environment.</span></span></blockquote>
<br />
En el log de la ejecución anterior podemos ver los comandos ssh que se usaron para ejecutar los pasos de vagrant. Copiando el comando ssh de ahí me pude conectar. Éste es el comando:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ssh -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=2222 -o 'IdentityFile="/mnt/d/GitHub/vargant-builder/.vagrant.d/insecure_private_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=30 -o ControlPath=/home/ncalero/.ansible/cp/055b8f4af0 127.0.0.1 </span></span></blockquote>
<br />
Una vez dentro de la VM podemos ver que selinux no está deshabiltado:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [root@oracle-OEL69 ~]# cat /etc/selinux/config</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # This file controls the state of SELinux on the system.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # SELINUX= can take one of these three values:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # enforcing - SELinux security policy is enforced.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # permissive - SELinux prints warnings instead of enforcing.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # disabled - No SELinux policy is loaded.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> SELINUX=permissive</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # SELINUXTYPE= can take one of these two values:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # targeted - Targeted processes are protected,</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # mls - Multi Level Security protection.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> SELINUXTYPE=targeted</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [root@oracle-OEL69 ~]#</span></span></blockquote>
<br />
La solución simple para no cambiar la configuración y reiniciar la VM, es instalar la bilioteca que fue reportada en el error:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [root@oracle-OEL69 ~]# yum install libselinux-python</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Loaded plugins: ulninfo</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Setting up Install Process</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_UEKR4 | 1.2 kB 00:00</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_UEKR4/primary | 27 MB 00:06</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_UEKR4: [################################################## ] 308/560debug2: channel 2: window 999359 sent adjust 49217</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_UEKR4 560/560</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_latest | 1.4 kB 00:00</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_latest/primary | 67 MB 00:16</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_latest: [ ] 105/39733debug2: channel 2: window 999317 sent adjust 49259</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_latest: [##################################################################################### ] 39493/39733debug2: channel 2: window 999376 sent adjust 49200</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> public_ol6_latest 39733/39733</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Resolving Dependencies<br /> --> Running transaction check<br /> ---> Package libselinux-python.x86_64 0:2.0.94-7.el6 will be installed<br /> --> Finished Dependency Resolution</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Dependencies Resolved</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ========================================================================================================================</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Package Arch Version Repository Size</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ========================================================================================================================</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Installing:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libselinux-python x86_64 2.0.94-7.el6 public_ol6_latest 202 k</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Transaction Summary</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ========================================================================================================================</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Install 1 Package(s)</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Total download size: 202 k</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Installed size: 657 k</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Is this ok [y/N]: y</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Downloading Packages:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libselinux-python-2.0.94-7.el6.x86_64.rpm | 202 kB 00:00</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Running rpm_check_debug</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Running Transaction Test</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Transaction Test Succeeded</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Running Transaction</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Installing : libselinux-python-2.0.94-7.el6.x86_64 1/1</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Verifying : libselinux-python-2.0.94-7.el6.x86_64 1/1</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Installed:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> libselinux-python.x86_64 0:2.0.94-7.el6</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Complete!</span></span></blockquote>
<br />
<br />
Para evitar errores si estamos haciendo esta instalación por primera vez, tenemos que configurar las claves ssh de nuestro usuario antes de continuar:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ssh-keygen -q -N "" -f id_rsa</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ls -lrt ~/.ssh/</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> total 0</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ssh-keygen</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Generating public/private rsa key pair.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Enter file in which to save the key (/home/ncalero/.ssh/id_rsa):</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Enter passphrase (empty for no passphrase):</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Enter same passphrase again:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Your identification has been saved in /home/ncalero/.ssh/id_rsa.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Your public key has been saved in /home/ncalero/.ssh/id_rsa.pub.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The key fingerprint is:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> SHA256:KR9wXcoPa1yZGG1Xze/iElHjErQgEeTM0C2pk0+BYB0 ncalero@H6RMYZ1</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The key's randomart image is:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> +---[RSA 2048]----+</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | ooE===ooo oo|</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | . o==+.*+++ o|</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | .o=o*.== ..|</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | +o.o =o . .|</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | .+S + .o . |</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | o.o . . .|</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | . o . |</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | . . |</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> | . |</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> +----[SHA256]-----+</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ ls -lrt ~/.ssh/</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> total 4</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rw------- 1 ncalero ncalero 1675 Jan 21 18:53 id_rsa</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rw-r--r-- 1 ncalero ncalero 397 Jan 21 18:53 id_rsa.pub</span></span></blockquote>
<br />
<br />
Ahora podemos intentar ejecutar los pasos de provision nuevamente:<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ vagrant provision<br /> ==> default: Running provisioner: ansible...<br /> Vagrant has automatically selected the compatibility mode '2.0'<br /> according to the Ansible version installed (2.4.2.0).<br /><br /> Alternatively, the compatibility mode can be specified in your Vagrantfile:<br /> https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode<br /><br /> default: Running ansible-playbook...<br /><br /> PLAY [all] *********************************************************************<br /><br /> TASK [install simplejson if needed] ********************************************<br /> changed: [default]<br /><br /> PLAY [all] *********************************************************************<br /><br /> TASK [Gathering Facts] *********************************************************<br /> ok: [default]<br /><br /> ...<br /><br /> TASK [install_grid_sw : copy files available local in files directory] *********<br /> failed: [default] (item=p13390677_112040_Linux-x86-64_3of7.zip) => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --archive --rsh=/usr/bin/ssh -S none -i /mnt/d/GitHub/vargant-builder/.vagrant.d/insecure_private_key -o Port=2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null --rsync-path=sudo rsync --out-format=<<changed>>%i %n%L /mnt/d/GitHub/vagrant-builder/ansible/files/p13390677_112040_Linux-x86-64_3of7.zip vagrant@127.0.0.1:/u01/install", "item": {"changed": false, "failed": false, "invocation": {"module_args": {"checksum_algorithm": "sha1", "follow": false, "get_attributes": true, "get_checksum": false, "get_md5": false, "get_mime": true, "path": "files/p13390677_112040_Linux-x86-64_3of7.zip"}}, "item": {"file": "p13390677_112040_Linux-x86-64_3of7.zip", "number": "3", "unique_file": "grid"}, "stat": {"atime": 1516486134.0, "attr_flags": "", "attributes": [], "block_size": 512, "blocks": 2354176, "charset": "binary", "ctime": 1516486134.0, "dev": 13, "device_type": 0, "executable": true, "exists": true, "gid": 0, "gr_name": "root", "inode": 568223859040, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "application/zip", "mode": "0777", "mtime": 1516486134.0, "nlink": 1, "path": "files/p13390677_112040_Linux-x86-64_3of7.zip", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 1205251894, "uid": 0, "version": null, "wgrp": true, "woth": true, "writeable": true, "wusr": true, "xgrp": true, "xoth": true, "xusr": true}}, "msg": "Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.\r\nsudo: rsync: command not found\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]\nrsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]\n", "rc": 12}<br /> to retry, use: --limit @/mnt/d/GitHub/vagrant-builder/ansible/setup.retry<br /><br /> PLAY RECAP *********************************************************************<br /> default : ok=60 changed=31 unreachable=0 failed=1</changed></span></span><changed><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span></changed></blockquote>
<changed><br />Después de validar que rsync está instalado en ambos lados (local y la VM), la forma simple de evitar el error (que podría estar vinculado al uso de recursos, es Windows!), es usar copy en vez de rsync. <br />Claro que eso implica que cada nueva ejecución estaría repitiendo algo innecesario, y lo mejor sería tener un directorio compartido para ahorrar espacio en la VM. <br />Pero para seguir una solución simple, cambié el código del playbook <i>main.yml</i> (vagrant-builder\ansible\roles\install_grid_sw\tasks\main.yml) para que use el comando copy en vez de rsync (línea 42):<br /><br /><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> - name: copy files available local in files directory<br /> # synchronize: src=files/{{ item.item.file }} dest={{ stage_directory }}<br /> copy: src={{ item.item.file }} dest={{ stage_directory }} owner=oracle group=oinstall mode=0700</span></span><br /><br /><br />Al intentar de nuevo '<i>vagrant provision</i>', este paso se ejecuta bien, pero hay otro fallo más adelante:</changed><br />
<blockquote class="tr_bq">
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ...<br /> TASK [install_grid_sw : copy files available local in files directory] *********<br /> changed: [default] => (item=p13390677_112040_Linux-x86-64_3of7.zip)<br /><br /> TASK [install_grid_sw : set ownership of transferred files] ********************<br /> ok: [default] => (item=p13390677_112040_Linux-x86-64_3of7.zip)<br /> ...<br /> TASK [install_opatch : download opatch version 11.2] ***************************<br /> fatal: [default]: FAILED! => {"changed": true, "cmd": "./getMOSPatch.sh patch=6880880", "delta": "0:00:00.006562", "end": "2018-01-21 22:48:43.904304", "msg": "non-zero return code", "rc": 2, "start": "2018-01-21 22:48:43.897742", "stderr": "./getMOSPatch.sh: line 9: \r: command not found\n./getMOSPatch.sh: line 11: set: -\r: invalid option\nset: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]", "stderr_lines": ["./getMOSPatch.sh: line 9: ", ": command not found", "./getMOSPatch.sh: line 11: set: -", ": invalid option", "set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"], "stdout": "", "stdout_lines": []}<br /> to retry, use: --limit @/mnt/d/GitHub/vagrant-builder/ansible/setup.retry<br /><br /> PLAY RECAP *********************************************************************<br /> default : ok=84 changed=39 unreachable=0 failed=1</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed></blockquote>
<changed><br />El archivo que da error (<i>getMOSPatch.sh</i>) viene includo en el repositorio:</changed><br />
<blockquote class="tr_bq">
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ncalero@H6RMYZ1:/mnt/d/GitHub/vagrant-builder$ find . | grep getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ./ansible/files/getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed></blockquote>
<changed><br />Validando la versión copiada a la VM, vemos que da errores al ejecutarlo manualmente:</changed><br />
<blockquote class="tr_bq">
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [vagrant@oracle-OEL69 ~]$ cd /u01/install/</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [vagrant@oracle-OEL69 install]$ ls -lrt</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> total 8</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwx------. 1 oracle oinstall 6633 Jan 21 22:48 getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [vagrant@oracle-OEL69 install]$ su - oracle</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Password: </span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 ~]$ chmod +x /u01/install/getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 ~]$ set mosUser="myuser@mydomain.com"</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 ~]$ set mosPass="xxx"</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 ~]$ cd /u01/install/</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ ./getMOSPatch.sh patch=6880880</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> : command not foundine 9:</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> : invalid option: line 11: set: -</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> : command not foundine 12:</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> : command not foundine 21:</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> '/getMOSPatch.sh: line 71: syntax error near unexpected token `do</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> '/getMOSPatch.sh: line 71: ` do</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ </span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ head getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> #!/bin/bash</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # Maris Elsins / Pythian / 2013</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # Source: https://github.com/MarisElsins/TOOLS/blob/master/Shell/getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # Inspired by John Piwowar's work: http://only4left.jpiwowar.com/2009/02/retrieving-oracle-patches-with-wget/</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # Usage:</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # getMOSPatch.sh reset=yes # Use to refresh the platform and language settings</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # getMOSPatch.sh patch=patchnum_1[,patchnum_n]* [download=all] [regexp=...]# Use to download one or more patches. If "download=all" is set all patches will be downloaded without user interaction, you can also define regular expressen by passing regexp to filter the patch filenames.</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # v1.0 Initial version</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> # v1.1 Added support for multipart patches, previously these were simply ignored.</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed></blockquote>
<changed>Para descartar que el contenido del script no sea el correcto, bajé la versión actual en la VM:</changed><br />
<blockquote class="tr_bq">
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ wget https://raw.githubusercontent.com/MarisElsins/TOOLS/master/Shell/getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> --2018-01-22 00:04:59-- https://raw.githubusercontent.com/MarisElsins/TOOLS/master/Shell/getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Resolving raw.githubusercontent.com... 151.101.92.133</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Connecting to raw.githubusercontent.com|151.101.92.133|:443... connected.</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> HTTP request sent, awaiting response... 200 OK</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Length: 6818 (6.7K) [text/plain]</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Saving to: “getMOSPatch.sh.1”</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 100%[==============================================================================>] 6,818 --.-K/s in 0.002s<br /></span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 2018-01-22 00:04:59 (2.98 MB/s) - “getMOSPatch.sh.1” saved [6818/6818]</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed></blockquote>
<changed> <br />Quedó grabado con otro nombre, así que ajustando eso y permisos, lo corrí manualmente para ver si puedo reproducir el mismo error:</changed><br />
<blockquote class="tr_bq">
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ mv getMOSPatch.sh getMOSPatch.sh.win</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ mv getMOSPatch.sh.1 getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ ls -lrt</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> total 104</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rw-r--r--. 1 oracle oinstall 6818 Jan 22 00:04 getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwx--x--x. 1 oracle oinstall 6633 Jan 22 00:05 getMOSPatch.sh.win</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ chmod +x getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ </span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ export mosPass='xxx'</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ export mosUser="myuser@mydomain.com"</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ ./getMOSPatch.sh patch=6880880</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> This version of getMOSPatch is obsolete</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Download getMOSPatch V2 from: https://github.com/MarisElsins/getMOSPatch/raw/master/getMOSPatch.jar</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Check the README for the new version here: https://github.com/MarisElsins/getMOSPatch/blob/master/README.md</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Read my blog post about it here: http://bit.ly/getMOSPatchV2</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Getting list of files for patch 6880880 for "Linux x86-64"</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 1 - p6880880_121010_Linux-x86-64.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 2 - p6880880_122010_Linux-x86-64.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 3 - p6880880_139000_Generic.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 4 - p6880880_112000_Linux-x86-64.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 5 - p6880880_132000_Generic.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 6 - p6880880_111000_Linux-x86-64.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 7 - p6880880_131000_Generic.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 8 - p6880880_101000_Linux-x86-64.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 9 - p6880880_102000_Linux-x86-64.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Comma-delimited list of files to download: 4</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Files to download:</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> p6880880_112000_Linux-x86-64.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Downloading the patches:</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Downloading file p6880880_112000_Linux-x86-64.zip ...</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> % Total % Received % Xferd Average Speed Time Time Time Current</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Dload Upload Total Spent Left Speed</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 100 101M 100 101M 0 0 2123k 0 0:00:48 0:00:48 --:--:-- 1897k</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> p6880880_112000_Linux-x86-64.zip completed with status: 0</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ ls -lrt</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> total 103680</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwxr-xr-x. 1 oracle oinstall 6818 Jan 22 00:04 getMOSPatch.sh</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rwx--x--x. 1 oracle oinstall 6633 Jan 22 00:05 getMOSPatch.sh.win</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> -rw-r--r--. 1 oracle oinstall 106060978 Jan 22 00:10 p6880880_112000_Linux-x86-64.zip</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 install]$ </span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed></blockquote>
<changed><br /><br />Esta vez funcionó bien, lo que confirma que había algún problema con la versión original del script o con la copia de ubuntu en windows a la VM.<br />Para confirmar cual de las dos fue la que causó el error, habría que poner la versión nueva del script en ubuntu, borrar la VM y repetir los pasos hechos hasta acá. <br />Les dejo eso como ejercicio. <br /><br />Para ahorrame ejecutar la instalación desde el principio, lo que implica repetir los ajustes manuales ya hechos, edito el playbook y comento los pasos que ejecuté manualmente hasta ahora, así validamos si con este nuevo ajuste se puede completar la configuración de Oracle.<br /><br />Estas son las líneas comentadas: <br /><br /><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> vagrant-builder/ansible/install_opatch/main.yml:<br /> # - name: copy getMOSPatch.sh script<br /> ...<br /> # - name: set getMOSPatch.sh config<br /> ...<br /> # - name: download opatch version 11.2</span></span><br /> </changed><br />
<changed>Ahora al ejecutar '<i>vagrant provision</i>' de nuevo, termina sin errores y completa la instalación de Oracle en la VM usando ASM.<br /><br />No tengo el log completo de esta ejecución porque lo dejé corriendo y al revisarlo una hora después tenía una <a href="https://es.wikipedia.org/wiki/Pantalla_azul_de_la_muerte">BSOD</a> :)<br />Pero despues de reiniciar y levantar manualmente las VM, todo estaba ahí corriendo:</changed><br />
<blockquote class="tr_bq">
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [vagrant@oracle-OEL69 ~]$ df -h</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Filesystem Size Used Avail Use% Mounted on</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> /dev/mapper/VolGroup-lv_root</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 50G 3.6G 43G 8% /</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> tmpfs 1.5G 91M 1.4G 7% /dev/shm</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> /dev/sda1 477M 150M 302M 34% /boot</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> /dev/mapper/VolGroup-lv_home</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 12G 29M 11G 1% /home</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> /dev/mapper/vg_oracle-lv_oracle</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> 35G 8.5G 25G 26% /u01</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [vagrant@oracle-OEL69 ~]$ cat /etc/issue</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Oracle Linux Server release 6.9</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Kernel \r on an \m</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [vagrant@oracle-OEL69 ~]$ ps -eaf | grep pmon</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> oracle 2005 1 0 01:14 ? 00:00:00 asm_pmon_+ASM</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> oracle 2100 1 0 01:14 ? 00:00:00 ora_pmon_orcl</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> vagrant 2446 2423 0 01:33 pts/0 00:00:00 grep pmon</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [vagrant@oracle-OEL69 ~]$ su - oracle</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Password:</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 ~]$ . oraenv</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> ORACLE_SID = [oracle] ? orcl</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> The Oracle base has been set to /u01/app/oracle</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> [oracle@oracle-OEL69 ~]$ sqlplus / as sysdba</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> SQL*Plus: Release 11.2.0.4.0 Production on Mon Jan 22 01:34:08 2018</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Copyright (c) 1982, 2013, Oracle. All rights reserved.</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Connected to:</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> With the Partitioning, Automatic Storage Management, OLAP, Data Mining</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> and Real Application Testing options</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> SQL> set lines 180 pages 180<br /> SQL> archive log list;<br /> Database log mode No Archive Mode<br /> Automatic archival Disabled<br /> Archive destination /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/arch<br /> Oldest online log sequence 10<br /> Current log sequence 13<br /> SQL> select file_name from dba_data_files;<br /><br /> FILE_NAME<br /> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br /> +DATA/orcl/datafile/system.261.966039381<br /> +DATA/orcl/datafile/sysaux.262.966039387<br /> +DATA/orcl/datafile/undotbs1.263.966039393<br /><br /> SQL> select open_mode from v$database;<br /><br /> OPEN_MODE<br /> --------------------<br /> READ WRITE<br /><br /> SQL> select count(1) from v$recover_file;<br /><br /> COUNT(1)<br /> ----------<br /> 0<br /><br /> SQL> select * From v$asm_diskgroup;<br /><br /> GROUP_NUMBER NAME SECTOR_SIZE BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE TYPE TOTAL_MB FREE_MB HOT_USED_MB COLD_USED_MB REQUIRED_MIRROR_FREE_MB<br /> ------------ ------------------------------ ----------- ---------- -------------------- ----------- ------ ---------- ---------- ----------- ------------ -----------------------<br /> USABLE_FILE_MB OFFLINE_DISKS COMPATIBILITY DATABASE_COMPATIBILITY V<br /> -------------- ------------- ------------------------------------------------------------ ------------------------------------------------------------ -<br /> 1 DATA 512 4096 1048576 CONNECTED EXTERN 40960 39767 0 1193 0<br /> 39767 0 11.2.0.0.0 10.1.0.0.0 N<br /><br /><br /> SQL> exit</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> With the Partitioning, Automatic Storage Management, OLAP, Data Mining</span></span></changed><br />
<changed><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> and Real Application Testing options</span></span></changed><br />
<changed></changed></blockquote>
<changed><br /><br />Espero que les sirva de referencia si quieren intentar lo mismo.<br /><br />Un saludo.</changed>Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-73153125380540694112018-02-12T15:13:00.001-03:002018-02-12T15:13:40.779-03:00Configurar Oracle Standby 12c usando RMAN duplicate y Data Guard brokerCrear una base de datos Standby en Oracle es algo bien conocido estos días, y hay muchas referencias para hacerlo, empezando por la <a href="https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sbydb/creating-oracle-data-guard-physical-standby.html#GUID-D5F0EB8F-8534-462A-911C-216E6DC7CE69" target="_blank">documentación oficial</a>.<br />
<br />
Me interesa mostrar en este post todos los ajustes necesarios si creamos las VM siguiendo <a href="http://databaseindex.blogspot.com.uy/2018/02/crear-oracle-standby-12c-usando.html" target="_blank">mi post anterior</a>, usando Vagrant, Ansible y VirtualBox en Windows 10. <br />
<br />
Lo que sigue son los pasos conocidos para configurar una base <i>standby </i>usando <i>ASM </i>a partir de una <i>single instance</i>, con un par de ajustes propios de este ambiente. Con un poco de tiempo extra, todo esto puede agregarse a un playbook e incluirlo en los pasos que ejecuta Ansible.<br />
<br />
Hay que tener presente que Dataguard es una opción de Oracle Enterprise Edition, y no es posible usarlo en edición Standard (SE).<br />
<br />
Repasando la configuración que tenemos:<br />
<ul>
<li>hosts: ora12c-si-asm-oel681/2 </li>
<li>IPs: 172.16.56.30 y 172.16.56.31</li>
<li>ORACLE_SID: orclcdb</li>
<li>usan ASM y PDBs</li>
<li>no tienen configurado archivelog</li>
<li>los usuarios tienen contraseñas por defecto del <a href="https://github.com/oravirt/vagrant-vbox-si-asm" target="_blank">playbook ansible</a> </li>
</ul>
<br />
Esto se puede ver con una rápida validación después de creadas las VM en el post anterior:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> D:\GitHub\vagrant-vbox-si-asm><b>vagrant ssh ora12c-si-asm-oel681</b><br /> Last login: Wed Jan 24 21:22:11 2018 from 10.0.2.2<br /><br /> ----------------------------------------<br /> Welcome to ora12c-si-asm-oel681<br /> OracleLinux 6.8 x86_64<br /><br /> FQDN: ora12c-si-asm-oel681.internal.lab<br /> IP: 10.0.2.15<br /><br /> Processor: Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz<br /> #CPU's: 1<br /> Memory: 3254 MB<br /> Kernel: 4.1.12-37.4.1.el6uek.x86_64<br /><br /> ----------------------------------------<br /> [vagrant@ora12c-si-asm-oel681 ~]$ <b>sudo su - oracle</b><br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>df -h</b><br /> Filesystem Size Used Avail Use% Mounted on<br /> /dev/sda2 47G 2.4G 43G 6% /<br /> tmpfs 1.6G 1.1G 580M 65% /dev/shm<br /> /dev/mapper/vgora-lvora<br /> 74G 18G 53G 26% /u01<br /> /dev/sr0 56M 56M 0 100% /mnt<br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>ps -eaf | grep pmon</b><br /> oracle 15488 1 0 15:46 ? 00:00:05 ora_pmon_orclcdb<br /> oracle 24473 1 0 14:03 ? 00:00:05 asm_pmon_+ASM<br /> oracle 31671 31653 0 22:57 pts/0 00:00:00 grep pmon<br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>tail /etc/oratab</b><br /> # The first and second fields are the system identifier and home<br /> # directory of the database respectively. The third field indicates<br /> # to the dbstart utility that the database should , "Y", or should not,<br /> # "N", be brought up at system boot time.<br /> #<br /> # Multiple entries with the same $ORACLE_SID are not allowed.<br /> #<br /> #<br /> +ASM:/u01/app/oracle/12.1.0.2/grid:N # line added by Agent<br /> orclcdb:/u01/app/oracle/12.1.0.2/db1:N # line added by Agent<br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>. oraenv</b><br /> ORACLE_SID = [orcldb] ? <b>orclcdb</b><br /> The Oracle base has been set to /u01/app/oracle<br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>sqlplus / as sysdba</b><br /><br /> SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 24 22:58:15 2018<br /><br /> Copyright (c) 1982, 2014, Oracle. All rights reserved.<br /><br /><br /> Connected to:<br /> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options<br /><br /> 22:58:23 SYS @ orclcdb:><b>set lines 180 pages 180</b><br /> 22:58:25 SYS @ orclcdb:><b>archive log list;</b><br /> Database log mode No Archive Mode<br /> Automatic archival Disabled<br /> Archive destination USE_DB_RECOVERY_FILE_DEST<br /> Oldest online log sequence 6<br /> Current log sequence 8<br /> 22:58:25 SYS @ orclcdb:><b>show pdbs</b><br /><br /> CON_ID CON_NAME OPEN MODE RESTRICTED<br /> ---------- ------------------------------ ---------- ----------<br /> 2 PDB$SEED READ ONLY NO<br /> 3 ORCL READ WRITE NO<br /> 22:58:27 SYS @ orclcdb:><b>alter session set container=orcl;</b><br /><br /> Session altered.<br /><br /> 22:58:40 SYS @ orclcdb:><b>select file_name from dba_data_files;</b><br /><br /> FILE_NAME<br /> ------------------------------------------------------------------------------------------------------------------------<br /> ------------------------------------------------------------<br /> +DATA/ORCLCDB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/system.269.966268047<br /> +DATA/ORCLCDB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/sysaux.270.966268047<br /> +DATA/ORCLCDB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/users.272.966268171<br /><br /> 22:59:28 SYS @ orclcdb:><b>exit</b><br /> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options<br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>ifconfig | grep "inet "</b><br /> inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0<br /> inet addr:192.168.9.70 Bcast:192.168.9.255 Mask:255.255.255.0<br /> inet addr:172.16.56.30 Bcast:172.16.56.255 Mask:255.255.255.0<br /> inet addr:127.0.0.1 Mask:255.0.0.0<br /> <br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>ssh 172.16.56.31</b><br /> oracle@172.16.56.31's password:<br /><br /> ----------------------------------------<br /> Welcome to ora12c-si-asm-oel682<br /> OracleLinux 6.8 x86_64<br /><br /> FQDN: ora12c-si-asm-oel682.internal.lab<br /> IP: 10.0.2.15<br /><br /> Processor: Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz<br /> #CPU's: 1<br /> Memory: 3254 MB<br /> Kernel: 4.1.12-37.4.1.el6uek.x86_64<br /><br /> ----------------------------------------<br /> [oracle@ora12c-si-asm-oel682 ~]$ <br /> [oracle@ora12c-si-asm-oel682 ~]$ <b>ps -eaf | grep pmon</b><br /> oracle 7285 1 0 15:29 ? 00:00:05 ora_pmon_orclcdb<br /> oracle 19530 19514 0 23:11 pts/0 00:00:00 grep pmon<br /> oracle 21172 1 0 14:03 ? 00:00:05 asm_pmon_+ASM</span></span></blockquote>
<br />
Me interesa configurar una de ellas como standby, digamos en <span style="color: blue;"><i>ora12c-si-asm-oel682</i></span>.<br />
<br />
Este es un resumen de los pasos que vamos a seguir, usando RMAN duplicate para la copia inicial de la base, y Dataguard Broker para configurar la replicación hacia la base standby.<br />
<br />
Agrego un paso extra (6) para evitar un error al usar RMAN en el siguiente. <br />
Esto es particular de este ambiente de pruebas, no es algo necesario siempre.<br />
<br />
1) ajustar la base primaria:<br />
a) habilitar force_logging <br />
b) habilitar archivado <br />
c) agregar standby redo logs<br />
d) habilitar DataGuard Broker<br />
2) agregar entradas en tnsnames.ora de ambos servidores<br />
3) agregar una entrada al listener.ora en el servidor standby<br />
4) parar la base corriendo en la standby<br />
5) iniciar la base standby con un archivo de arranque ajustado (init.ora)<br />
6) crear alias en ASM para el spfile en la primaria<br />
7) crear la base standby usando RMAN duplicate from active <br />
8) habilitar standby usando DataGuard Broker<br />
<br />
Y estos son los detalles de aplicar estos pasos.<br />
Al final incluyo como referencia los dos problemas que encontré y son evitados al seguir los pasos anteriores.<br />
<br />
<h4>
1) Ajustes en la base primaria</h4>
<br />
force_logging y archivado son necesario en la base primaria para configurar una standby.<br />
Agregar standby redo logs es algo recomendado para estar preparados para un cambio de rol, pero no es obligatorio.<br />
Yo lo agrego para que no se muestren alertas al final al usar Dataguard Broker<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> [oracle@ora12c-si-asm-oel681 ~]$<b> sqlplus / as sysdba</b><br /> SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 24 23:12:13 2018<br /><br /> Copyright (c) 1982, 2014, Oracle. All rights reserved.<br /><br /><br /> Connected to:<br /> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options<br /><br /> 23:12:13 SYS @ orclcdb:><b>alter database force logging;</b><br /> Database altered.<br /><br /> 23:12:25 SYS @ orclcdb:><b>archive log list;</b><br /> Database log mode No Archive Mode<br /> Automatic archival Disabled<br /> Archive destination USE_DB_RECOVERY_FILE_DEST<br /> Oldest online log sequence 6<br /> Current log sequence 8<br /><br /> 23:13:08 SYS @ orclcdb:><b>alter system set dg_broker_start=true;</b><br /><br /> System altered.<br /><br /> 23:13:20 SYS @ orclcdb:><b>set lines 180 pages 180</b><br /> 23:13:24 SYS @ orclcdb:><b>select group#, thread#, bytes/1024/1024 from v$log order by 1;</b><br /><br /> GROUP# THREAD# BYTES/1024/1024<br /> ---------- ---------- ---------------<br /> 1 1 100<br /> 2 1 100<br /> 3 1 100<br /> 4 1 100<br /><br /><br /> 23:14:50 SYS @ orclcdb:><b>alter database add standby logfile ('+DATA','+FRA') size 100M;</b><br /><br /> Database altered.<br /><br /> 23:14:55 SYS @ orclcdb:><b>alter database add standby logfile ('+DATA','+FRA') size 100M;</b><br /><br /> Database altered.<br /><br /> 23:14:57 SYS @ orclcdb:><b>alter database add standby logfile ('+DATA','+FRA') size 100M;</b><br /><br /> Database altered.<br /> <br /> 23:14:59 SYS @ orclcdb:><b>alter database add standby logfile ('+DATA','+FRA') size 100M;</b><br /><br /> Database altered.<br /> <br /> 23:15:08 SYS @ orclcdb:><b>col member for a50</b><br /> 23:15:12 SYS @ orclcdb:><b>select * from v$logfile order by type, group#;</b><br /><br /> GROUP# STATUS TYPE MEMBER IS_ CON_ID<br /> ---------- ------- ------- -------------------------------------------------- --- ----------<br /> 1 ONLINE +DATA/ORCLCDB/ONLINELOG/group_1.261.966265055 NO 0<br /> 1 ONLINE +FRA/ORCLCDB/ONLINELOG/group_1.257.966265067 YES 0<br /> 2 ONLINE +DATA/ORCLCDB/ONLINELOG/group_2.262.966303565 NO 0<br /> 2 ONLINE +FRA/ORCLCDB/ONLINELOG/group_2.258.966303569 NO 0<br /> 7 ONLINE +DATA/ORCLCDB/ONLINELOG/group_7.276.966303573 NO 0<br /> 7 ONLINE +FRA/ORCLCDB/ONLINELOG/group_7.265.966303577 NO 0<br /> 8 ONLINE +FRA/ORCLCDB/ONLINELOG/group_8.266.966303587 NO 0<br /> 8 ONLINE +DATA/ORCLCDB/ONLINELOG/group_8.277.966303583 NO 0<br /> 3 STANDBY +DATA/ORCLCDB/ONLINELOG/group_3.263.966307683 NO 0<br /> 3 STANDBY +FRA/ORCLCDB/ONLINELOG/group_3.268.966307685 NO 0<br /> 4 STANDBY +FRA/ORCLCDB/ONLINELOG/group_4.262.966303491 NO 0<br /> 4 STANDBY +DATA/ORCLCDB/ONLINELOG/group_4.273.966303489 NO 0<br /> 5 STANDBY +DATA/ORCLCDB/ONLINELOG/group_5.275.966303495 NO 0<br /> 5 STANDBY +FRA/ORCLCDB/ONLINELOG/group_5.264.966303499 NO 0<br /> 6 STANDBY +DATA/ORCLCDB/ONLINELOG/group_6.274.966303325 NO 0<br /> 6 STANDBY +FRA/ORCLCDB/ONLINELOG/group_6.263.966303329 NO 0<br /><br /> 16 rows selected.<br /><br /> 23:15:28 SYS @ orclcdb:><b>shutdown immediate;</b><br /> Database closed.<br /> Database dismounted.<br /> ORACLE instance shut down.<br /><br /> 23:15:57 SYS @ orclcdb:><b>startup mount;</b><br /> ORACLE instance started.<br /><br /> Total System Global Area 1073741824 bytes<br /> Fixed Size 2932632 bytes<br /> Variable Size 666894440 bytes<br /> Database Buffers 398458880 bytes<br /> Redo Buffers 5455872 bytes<br /> Database mounted.<br /><br /> 23:16:19 SYS @ orclcdb:><b>alter database archivelog;</b><br /><br /> Database altered.<br /><br /> 23:16:21 SYS @ orclcdb:><b>startup force;</b><br /> ORACLE instance started.<br /><br /> Total System Global Area 1073741824 bytes<br /> Fixed Size 2932632 bytes<br /> Variable Size 666894440 bytes<br /> Database Buffers 398458880 bytes<br /> Redo Buffers 5455872 bytes<br /> Database mounted.<br /> Database opened.<br /> 23:17:03 SYS @ orclcdb:>archive log list;<br /> Database log mode Archive Mode<br /> Automatic archival Enabled<br /> Archive destination USE_DB_RECOVERY_FILE_DEST<br /> Oldest online log sequence 6<br /> Next log sequence to archive 8<br /> Current log sequence 8<br /> 23:17:05 SYS @ orclcdb:><b>exit</b><br /> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options</span></span></blockquote>
<br />
Notar que es una práctica recomendada crear standby redo logs con un grupo más de los usados en la primaria.<br />
En este ejemplo no es realmente necesario ya que no se va a poner nunca en producción, pero hay que tenerlo presente si van a seguir un procedimiento similar en producción.<br />
<br />
<br />
<h4>
2) agregar entradas en tnsnames.ora de ambos servidores</h4>
<br />
En 12c todo debería funcionar con Easy Connect, pero en mis pruebas no siempre anduvo bien, así que por simplicidad configuramos las entradas en los archivos tnsnames.ora<br />
<br />
En primaria:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>vi /u01/app/oracle/12.1.0.2/db1/network/admin/tnsnames.ora</b><br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>cat /u01/app/oracle/12.1.0.2/db1/network/admin/tnsnames.ora</b><br /> # tnsnames.ora Network Configuration File: /u01/app/oracle/12.1.0.2/db1/network/admin/tnsnames.ora<br /> # Generated by Oracle configuration tools.<br /><br /> primary,ORCLCDB =<br /> (DESCRIPTION =<br /> (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c-si-asm-oel681.internal.lab)(PORT = 1521))<br /> (CONNECT_DATA =<br /> (SERVER = DEDICATED)<br /> (SERVICE_NAME = orclcdb)<br /> )<br /> )<br /><br /> standby,orclstb =<br /> (DESCRIPTION =<br /> (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c-si-asm-oel682)(PORT = 1521))<br /> (CONNECT_DATA =<br /> (SERVER = DEDICATED)<br /> (SERVICE_NAME = orclstb)<br /> )<br /> )</span></span></blockquote>
<br />
En standby:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> [oracle@ora12c-si-asm-oel682 admin]$ <b>vi /u01/app/oracle/12.1.0.2/db1/network/admin/tnsnames.ora</b><br /> [oracle@ora12c-si-asm-oel682 admin]$ <b>cat </b></span></span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><b>/u01/app/oracle/12.1.0.2/db1/network/admin/</b></span></span><b>tnsnames.ora</b><br /> # tnsnames.ora Network Configuration File: /u01/app/oracle/12.1.0.2/db1/network/admin/tnsnames.ora<br /> # Generated by Oracle configuration tools.<br /><br /> LISTENER_orclcdb =<br /> (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c-si-asm-oel682)(PORT = 1521))<br /><br /> primary,ORCLCDB =<br /> (DESCRIPTION =<br /> (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c-si-asm-oel681.internal.lab)(PORT = 1521))<br /> (CONNECT_DATA =<br /> (SERVER = DEDICATED)<br /> (SERVICE_NAME = orclcdb)<br /> )<br /> )<br /><br /> standby,orclstb =<br /> (DESCRIPTION =<br /> (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c-si-asm-oel682)(PORT = 1521))<br /> (CONNECT_DATA =<br /> (SERVER = DEDICATED)<br /> (SERVICE_NAME = orclstb)<br /> )<br /> )</span></span></blockquote>
<br />
<h4>
3) agregar una entrada al listener.ora en el servidor standby</h4>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel682 oracle]$ <b>vi /u01/app/oracle/12.1.0.2/grid/network/admin/listener.ora</b><br /> [oracle@ora12c-si-asm-oel682 oracle]$ <b>cat /u01/app/oracle/12.1.0.2/grid/network/admin/listener.ora</b><br /> # listener.ora Network Configuration File: /u01/app/oracle/12.1.0.2/grid/network/admin/listener.ora<br /> # Generated by Oracle configuration tools.<br /><br /> LISTENER =<br /> (DESCRIPTION_LIST =<br /> (DESCRIPTION =<br /> (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c-si-asm-oel682.internal.lab)(PORT = 1521))<br /> (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))<br /> )<br /> )<br /><br /> # ncalero: static entry for standby:<br /> SID_LIST_LISTENER =<br /> (SID_LIST =<br /> (SID_DESC =<br /> (GLOBAL_DBNAME = orclstb)<br /> (ORACLE_HOME = /u01/app/oracle/12.1.0.2/db1)<br /> (SID_NAME = orclcdb)<br /> )<br /> )<br /><br /> ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent<br /> VALID_NODE_CHECKING_REGISTRATION_LISTENER=SUBNET # line added by Agent<br /><br /> [oracle@ora12c-si-asm-oel682 oracle]$ <b>/u01/app/oracle/12.1.0.2/grid/bin/lsnrctl reload listener</b><br /><br /> LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 24-JAN-2018 23:29:27<br /><br /> Copyright (c) 1991, 2014, Oracle. All rights reserved.<br /><br /> Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))<br /> The command completed successfully<br /> [oracle@ora12c-si-asm-oel682 oracle]$<br /> [oracle@ora12c-si-asm-oel682 oracle]$ <b>tail /etc/oratab</b><br /> # directory of the database respectively. The third field indicates<br /> # to the dbstart utility that the database should , "Y", or should not,<br /> # "N", be brought up at system boot time.<br /> #<br /> # Multiple entries with the same $ORACLE_SID are not allowed.<br /> #<br /> #<br /> +ASM:/u01/app/oracle/12.1.0.2/grid:N # line added by Agent<br /> orclcdb:/u01/app/oracle/12.1.0.2/db1:N # line added by Agent<br /></span></span></blockquote>
<br />
<h4>
4) parar la base corriendo en la standby</h4>
<br />
Esta VM tiene una base igual que la primaria y no la necesitamos.<br />
Podemos borrarla y de paso liberar espacio de ASM, o solo detenerla y continuar con este ejemplo, ya que el espacio en disco alcanza.<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>. oraenv</b><br /> ORACLE_SID = [orclcdb] ? <br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>srvctl status database -d orclcdb</b><br /> Database is running.<br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>srvctl stop database -d orclcdb</b><br /> [oracle@ora12c-si-asm-oel682 dbs]$</span></span></blockquote>
<br />
Solo para evitar problemas con la configuración en el futuro, borro la base configurada en clusterware, ya que la configuración cambió:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>srvctl remove database -d orclcdb</b><br /> Remove the database orclcdb? (y/[n]) <b>y</b><br /> [oracle@ora12c-si-asm-oel682 dbs]$</span></span></blockquote>
<br />
<h4>
5) iniciar la base standby con un archivo de arranque ajustado (init.ora)</h4>
<br />
Vamos a quitar el spfile que usaba la base anterior, y crear un archivo de parámetros mínimo para la nueva standby para poder levantarla en modo nomount.<br />
Luego cuando ejecutamos el comando RMAN duplicate vamos a poner todos los parámetros necesarios para la standby.<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>. oraenv</b><br /> ORACLE_SID = [orclcdb] ? <br /> The Oracle base remains unchanged with value /u01/app/oracle<br /> [oracle@ora12c-si-asm-oel682 oracle]$ <b>cd $ORACLE_HOME</b><br /> [oracle@ora12c-si-asm-oel682 db1]$ <b>pwd</b><br /> /u01/app/oracle/12.1.0.2/db1<br /> [oracle@ora12c-si-asm-oel682 db1]$ <b>cd dbs</b><br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>mv spfileorclcdb.ora spfileorclcdb-bad.ora</b><br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>echo '*.db_name=orclcdb' > initorclcdb.ora</b><br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>cat initorclcdb.ora</b><br /> *.db_name=orclcdb<br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>sqlplus / as sysdba</b><br /><br /> SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 24 23:47:34 2018<br /><br /> Copyright (c) 1982, 2014, Oracle. All rights reserved.<br /><br /> Connected to an idle instance.<br /><br /> 23:47:35 SYS @ orclcdb:><b>startup nomount;</b><br /> ORACLE instance started.<br /><br /> Total System Global Area 218103808 bytes<br /> Fixed Size 2922712 bytes<br /> Variable Size 159385384 bytes<br /> Database Buffers 50331648 bytes<br /> Redo Buffers 5464064 bytes<br /> 23:47:41 SYS @ orclcdb:><b>exit</b><br /> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options<br /> [oracle@ora12c-si-asm-oel682 dbs]$<br /> [oracle@ora12c-si-asm-oel682 dbs]$ <b>ps -eaf | grep pmon</b><br /> oracle 21258 1 0 13:43 ? 00:00:01 asm_pmon_+ASM<br /> oracle 25855 1 0 23:47 ? 00:00:00 ora_pmon_orclcdb<br /> oracle 25907 23932 0 23:48 pts/1 00:00:00 grep pmon<br /> [oracle@ora12c-si-asm-oel682 dbs]$ </span></span></blockquote>
<br />
<br />
<h4>
6) crear alias en ASM para el spfile en la primaria</h4>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>sqlplus / as sysdba</b><br /><br /> SQL*Plus: Release 12.1.0.2.0 Production on Thu Jan 25 00:43:22 2018<br /><br /> Copyright (c) 1982, 2014, Oracle. All rights reserved.<br /><br /><br /> Connected to:<br /> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options<br /><br /> 00:43:22 SYS @ orclcdb:><b>show parameter spfile</b><br /><br /> NAME TYPE VALUE<br /> ------------------------------------ ----------- ------------------------------<br /> spfile string +DATA/ORCLCDB/PARAMETERFILE/sp<br /> file.268.966266805<br /> 00:43:24 SYS @ orclcdb:> <b>exit</b><br /><br /><br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>cd $ORACLE_HOME/dbs</b><br /> [oracle@ora12c-si-asm-oel681 dbs]$ <b>ls -lrt</b><br /> total 24<br /> -rw-r--r--. 1 oracle oinstall 2992 Feb 3 2012 init.ora<br /> -rw-r-----. 1 oracle dba 24 Jan 24 14:49 lkORCLCDB<br /> -rw-r-----. 1 oracle oinstall 7680 Jan 24 15:26 orapworclcdb<br /> -rw-r-----. 1 oracle oinstall 41 Jan 24 15:45 initorclcdb.ora<br /> -rw-rw----. 1 oracle dba 1544 Jan 25 00:49 hc_orclcdb.dat<br /> [oracle@ora12c-si-asm-oel681 dbs]$ <b>cat initorclcdb.ora</b><br /> SPFILE='+DATA/orclcdb/spfileorclcdb.ora'<br /> [oracle@ora12c-si-asm-oel681 dbs]$ <b>. oraenv</b><br /> ORACLE_SID = [orclcdb] ? <b>+ASM</b><br /> The Oracle base remains unchanged with value /u01/app/oracle<br /> [oracle@ora12c-si-asm-oel681 dbs]$ <b>asmcmd</b><br /> ASMCMD> <b>cd data/orclcdb</b><br /> ASMCMD> <b>ls spfileorclcdb.ora</b><br /> ASMCMD-8002: entry 'spfileorclcdb.ora' does not exist in directory '+data/orclcdb/'<br /> ASMCMD> <b>cd parameterfile</b><br /> ASMCMD> <b>ls</b><br /> spfile.268.966266805<br /> ASMCMD> <b>cd ..</b><br /> ASMCMD> <b>mkalias parameterfile/spfile.268.966266805 spfileorclcdb.ora</b><br /> ASMCMD> <b>ls</b><br /> 63871D5DE1F02321E0534609A8C0357B/<br /> 6387BBFEF9833D92E0534609A8C0BF8E/<br /> CONTROLFILE/<br /> DATAFILE/<br /> FD9AC20F64D244D7E043B6A9E80A2F2F/<br /> ONLINELOG/<br /> PARAMETERFILE/<br /> TEMPFILE/<br /> spfileorclcdb.ora<br /> ASMCMD> <b>exit</b></span></span></blockquote>
<br />
<h4>
7) crear la base standby usando RMAN duplicate from active </h4>
<br />
Antes de lanzar RMAN, validamos conectivitidad SQL*Net a ambas bases desde la primaria:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> <br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>. oraenv</b><br /> ORACLE_SID = [+ASM] ? <b>orclcdb</b><br /> The Oracle base remains unchanged with value /u01/app/oracle<br /><br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>tnsping orclcdb</b><br /><br /> TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 25-JAN-2018 01:26:03<br /><br /> Copyright (c) 1997, 2014, Oracle. All rights reserved.<br /><br /> Used parameter files:<br /><br /><br /> Used TNSNAMES adapter to resolve the alias<br /> Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c-si-asm-oel681.internal.lab)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orclcdb)))<br /> OK (20 msec)<br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>tnsping orclstb</b><br /><br /> TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 25-JAN-2018 01:26:06<br /><br /> Copyright (c) 1997, 2014, Oracle. All rights reserved.<br /><br /> Used parameter files:<br /><br /><br /> Used TNSNAMES adapter to resolve the alias<br /> Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ora12c-si-asm-oel682)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orclstb)))<br /> OK (10 msec)<br /><br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>sqlplus sys/Oracle123@orclstb as sysdba</b><br /><br /> SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 25 01:26:17 2018<br /><br /> Copyright (c) 1982, 2014, Oracle. All rights reserved.<br /><br /><br /> Connected to:<br /> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options<br /><br /> 01:26:17 SYS @ orclstb:><b>exit</b><br /> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options<br /><br /> </span></span></blockquote>
Ahora sí, lanzamos el backup:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> RMAN> <b>run<br /> 2> {<br /> 3> allocate channel c1 type disk;<br /> 4> allocate channel c2 type disk;<br /> 5> allocate auxiliary channel aux type disk;<br /> 6> duplicate target database for standby from active database nofilenamecheck spfile<br /> 7> set log_archive_max_processes='8'<br /> 8> set memory_target='0'<br /> 9> set sga_target='768M'<br /> 10> set pga_aggregate_target='256M'<br /> 11> set db_unique_name='orclstb'<br /> 12> set db_create_file_dest='+DATA'<br /> 13> set DB_CREATE_ONLINE_LOG_DEST_1='+DATA'<br /> 14> set DB_RECOVERY_FILE_DEST='+FRA'<br /> 15> set DB_RECOVERY_FILE_DEST_SIZE='10G'<br /> 16> set standby_file_management='AUTO';<br /> 17> }</b><br /><br /> using target database control file instead of recovery catalog<br /> allocated channel: c1<br /> channel c1: SID=76 device type=DISK<br /><br /> allocated channel: c2<br /> channel c2: SID=57 device type=DISK<br /><br /> allocated channel: aux<br /> channel aux: SID=1 device type=DISK<br /><br /> Starting Duplicate Db at 25-JAN-18<br /><br /> contents of Memory Script:<br /> {<br /> backup as copy reuse<br /> targetfile '/u01/app/oracle/12.1.0.2/db1/dbs/orapworclcdb' auxiliary format<br /> '/u01/app/oracle/12.1.0.2/db1/dbs/orapworclcdb' targetfile<br /> '+DATA/orclcdb/spfileorclcdb.ora' auxiliary format<br /> '/u01/app/oracle/12.1.0.2/db1/dbs/spfileorclcdb.ora' ;<br /> sql clone "alter system set spfile= ''/u01/app/oracle/12.1.0.2/db1/dbs/spfileorclcdb.ora''";<br /> }<br /> executing Memory Script<br /><br /> Starting backup at 25-JAN-18<br /> Finished backup at 25-JAN-18<br /><br /> sql statement: alter system set spfile= ''/u01/app/oracle/12.1.0.2/db1/dbs/spfileorclcdb.ora''<br /><br /> contents of Memory Script:<br /> {<br /> sql clone "alter system set log_archive_max_processes =<br /> 8 comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set memory_target =<br /> 0 comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set sga_target =<br /> 768M comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set pga_aggregate_target =<br /> 256M comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set db_unique_name =<br /> ''orclstb'' comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set db_create_file_dest =<br /> ''+DATA'' comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set DB_CREATE_ONLINE_LOG_DEST_1 =<br /> ''+DATA'' comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set db_recovery_file_dest =<br /> ''+FRA'' comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set DB_RECOVERY_FILE_DEST_SIZE =<br /> 10G comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set standby_file_management =<br /> ''AUTO'' comment=<br /> '''' scope=spfile";<br /> shutdown clone immediate;<br /> startup clone nomount;<br /> }<br /> executing Memory Script<br /><br /> sql statement: alter system set log_archive_max_processes = 8 comment= '''' scope=spfile<br /><br /> sql statement: alter system set memory_target = 0 comment= '''' scope=spfile<br /><br /> sql statement: alter system set sga_target = 768M comment= '''' scope=spfile<br /><br /> sql statement: alter system set pga_aggregate_target = 256M comment= '''' scope=spfile<br /><br /> sql statement: alter system set db_unique_name = ''orclstb'' comment= '''' scope=spfile<br /><br /> sql statement: alter system set db_create_file_dest = ''+DATA'' comment= '''' scope=spfile<br /><br /> sql statement: alter system set DB_CREATE_ONLINE_LOG_DEST_1 = ''+DATA'' comment= '''' scope=spfile<br /><br /> sql statement: alter system set db_recovery_file_dest = ''+FRA'' comment= '''' scope=spfile<br /><br /> sql statement: alter system set DB_RECOVERY_FILE_DEST_SIZE = 10G comment= '''' scope=spfile<br /><br /> sql statement: alter system set standby_file_management = ''AUTO'' comment= '''' scope=spfile<br /><br /> Oracle instance shut down<br /><br /> connected to auxiliary database (not started)<br /> Oracle instance started<br /><br /> Total System Global Area 805306368 bytes<br /><br /> Fixed Size 2929552 bytes<br /> Variable Size 318770288 bytes<br /> Database Buffers 478150656 bytes<br /> Redo Buffers 5455872 bytes<br /> allocated channel: aux<br /> channel aux: SID=28 device type=DISK<br /><br /> contents of Memory Script:<br /> {<br /> sql clone "alter system set control_files =<br /> ''+DATA/ORCLSTB/CONTROLFILE/current.289.967913439'', ''+FRA/ORCLSTB/CONTROLFILE/current.261.967913439'' comment=<br /> ''Set by RMAN'' scope=spfile";<br /> backup as copy current controlfile for standby auxiliary format '+DATA/ORCLSTB/CONTROLFILE/current.288.967913439';<br /> restore clone primary controlfile to '+FRA/ORCLSTB/CONTROLFILE/current.275.967913439' from<br /> '+DATA/ORCLSTB/CONTROLFILE/current.288.967913439';<br /> sql clone "alter system set control_files =<br /> ''+DATA/ORCLSTB/CONTROLFILE/current.288.967913439'', ''+FRA/ORCLSTB/CONTROLFILE/current.275.967913439'' comment=<br /> ''Set by RMAN'' scope=spfile";<br /> shutdown clone immediate;<br /> startup clone nomount;<br /> }<br /> executing Memory Script<br /><br /> sql statement: alter system set control_files = ''+DATA/ORCLSTB/CONTROLFILE/current.289.967913439'', ''+FRA/ORCLSTB/CONTROLFILE/current.261.967913439'' comment= ''Set by RMAN'' scope=spfile<br /><br /> Starting backup at 25-JAN-18<br /> channel c1: starting datafile copy<br /> copying standby control file<br /> output file name=/u01/app/oracle/12.1.0.2/db1/dbs/snapcf_orclcdb.f tag=TAG20180125T034620<br /> channel c1: datafile copy complete, elapsed time: 00:00:07<br /> Finished backup at 25-JAN-18<br /><br /> Starting restore at 25-JAN-18<br /><br /> channel aux: copied control file copy<br /> Finished restore at 25-JAN-18<br /><br /> sql statement: alter system set control_files = ''+DATA/ORCLSTB/CONTROLFILE/current.288.967913439'', ''+FRA/ORCLSTB/CONTROLFILE/current.275.967913439'' comment= ''Set by RMAN'' scope=spfile<br /><br /> Oracle instance shut down<br /><br /> connected to auxiliary database (not started)<br /> Oracle instance started<br /><br /> Total System Global Area 805306368 bytes<br /><br /> Fixed Size 2929552 bytes<br /> Variable Size 318770288 bytes<br /> Database Buffers 478150656 bytes<br /> Redo Buffers 5455872 bytes<br /> allocated channel: aux<br /> channel aux: SID=28 device type=DISK<br /><br /> contents of Memory Script:<br /> {<br /> sql clone 'alter database mount standby database';<br /> }<br /> executing Memory Script<br /><br /> sql statement: alter database mount standby database<br /><br /> contents of Memory Script:<br /> {<br /> set newname for clone tempfile 1 to new;<br /> set newname for clone tempfile 2 to new;<br /> set newname for clone tempfile 3 to new;<br /> switch clone tempfile all;<br /> set newname for clone datafile 1 to new;<br /> set newname for clone datafile 3 to new;<br /> set newname for clone datafile 4 to new;<br /> set newname for clone datafile 5 to new;<br /> set newname for clone datafile 6 to new;<br /> set newname for clone datafile 7 to new;<br /> set newname for clone datafile 8 to new;<br /> set newname for clone datafile 9 to new;<br /> set newname for clone datafile 10 to new;<br /> backup as copy reuse<br /> datafile 1 auxiliary format new<br /> datafile 3 auxiliary format new<br /> datafile 4 auxiliary format new<br /> datafile 5 auxiliary format new<br /> datafile 6 auxiliary format new<br /> datafile 7 auxiliary format new<br /> datafile 8 auxiliary format new<br /> datafile 9 auxiliary format new<br /> datafile 10 auxiliary format new<br /> ;<br /> sql 'alter system archive log current';<br /> }<br /> executing Memory Script<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> renamed tempfile 1 to +DATA in control file<br /> renamed tempfile 2 to +DATA in control file<br /> renamed tempfile 3 to +DATA in control file<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> executing command: SET NEWNAME<br /><br /> Starting backup at 25-JAN-18<br /> channel c1: starting datafile copy<br /> input datafile file number=00001 name=+DATA/ORCLCDB/DATAFILE/system.257.966264763<br /> channel c2: starting datafile copy<br /> input datafile file number=00003 name=+DATA/ORCLCDB/DATAFILE/sysaux.256.966264621<br /> output file name=+DATA/ORCLSTB/DATAFILE/sysaux.286.967913491 tag=TAG20180125T034709<br /> channel c2: datafile copy complete, elapsed time: 00:01:46<br /> channel c2: starting datafile copy<br /> input datafile file number=00009 name=+DATA/ORCLCDB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/sysaux.270.966268047<br /> output file name=+DATA/ORCLSTB/DATAFILE/system.287.967913491 tag=TAG20180125T034709<br /> channel c1: datafile copy complete, elapsed time: 00:01:50<br /> channel c1: starting datafile copy<br /> input datafile file number=00007 name=+DATA/ORCLCDB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/sysaux.265.966265243<br /> output file name=+DATA/ORCLSTB/63871D5DE1F02321E0534609A8C0357B/DATAFILE/sysaux.284.967913601 tag=TAG20180125T034709<br /> channel c1: datafile copy complete, elapsed time: 00:01:26<br /> channel c1: starting datafile copy<br /> input datafile file number=00005 name=+DATA/ORCLCDB/FD9AC20F64D244D7E043B6A9E80A2F2F/DATAFILE/system.266.966265245<br /> output file name=+DATA/ORCLSTB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/sysaux.285.967913599 tag=TAG20180125T034709<br /> channel c2: datafile copy complete, elapsed time: 00:01:28<br /> channel c2: starting datafile copy<br /> input datafile file number=00008 name=+DATA/ORCLCDB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/system.269.966268047<br /> output file name=+DATA/ORCLSTB/63871D5DE1F02321E0534609A8C0357B/DATAFILE/system.279.967913687 tag=TAG20180125T034709<br /> channel c1: datafile copy complete, elapsed time: 00:00:45<br /> channel c1: starting datafile copy<br /> input datafile file number=00004 name=+DATA/ORCLCDB/DATAFILE/undotbs1.259.966264923<br /> output file name=+DATA/ORCLSTB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/system.278.967913687 tag=TAG20180125T034709<br /> channel c2: datafile copy complete, elapsed time: 00:00:46<br /> channel c2: starting datafile copy<br /> input datafile file number=00006 name=+DATA/ORCLCDB/DATAFILE/users.258.966264919<br /> output file name=+DATA/ORCLSTB/DATAFILE/users.277.967913735 tag=TAG20180125T034709<br /> channel c2: datafile copy complete, elapsed time: 00:00:07<br /> channel c2: starting datafile copy<br /> input datafile file number=00010 name=+DATA/ORCLCDB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/users.272.966268171<br /> output file name=+DATA/ORCLSTB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/users.282.967913743 tag=TAG20180125T034709<br /> channel c2: datafile copy complete, elapsed time: 00:00:03<br /> output file name=+DATA/ORCLSTB/DATAFILE/undotbs1.280.967913733 tag=TAG20180125T034709<br /> channel c1: datafile copy complete, elapsed time: 00:00:16<br /> Finished backup at 25-JAN-18<br /><br /> sql statement: alter system archive log current<br /><br /> contents of Memory Script:<br /> {<br /> switch clone datafile all;<br /> }<br /> executing Memory Script<br /><br /> datafile 1 switched to datafile copy<br /> input datafile copy RECID=3 STAMP=967913751 file name=+DATA/ORCLSTB/DATAFILE/system.287.967913491<br /> datafile 3 switched to datafile copy<br /> input datafile copy RECID=4 STAMP=967913751 file name=+DATA/ORCLSTB/DATAFILE/sysaux.286.967913491<br /> datafile 4 switched to datafile copy<br /> input datafile copy RECID=5 STAMP=967913752 file name=+DATA/ORCLSTB/DATAFILE/undotbs1.280.967913733<br /> datafile 5 switched to datafile copy<br /> input datafile copy RECID=6 STAMP=967913752 file name=+DATA/ORCLSTB/63871D5DE1F02321E0534609A8C0357B/DATAFILE/system.279.967913687<br /> datafile 6 switched to datafile copy<br /> input datafile copy RECID=7 STAMP=967913752 file name=+DATA/ORCLSTB/DATAFILE/users.277.967913735<br /> datafile 7 switched to datafile copy<br /> input datafile copy RECID=8 STAMP=967913753 file name=+DATA/ORCLSTB/63871D5DE1F02321E0534609A8C0357B/DATAFILE/sysaux.284.967913601<br /> datafile 8 switched to datafile copy<br /> input datafile copy RECID=9 STAMP=967913753 file name=+DATA/ORCLSTB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/system.278.967913687<br /> datafile 9 switched to datafile copy<br /> input datafile copy RECID=10 STAMP=967913754 file name=+DATA/ORCLSTB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/sysaux.285.967913599<br /> datafile 10 switched to datafile copy<br /> input datafile copy RECID=11 STAMP=967913754 file name=+DATA/ORCLSTB/6387BBFEF9833D92E0534609A8C0BF8E/DATAFILE/users.282.967913743<br /> Finished Duplicate Db at 25-JAN-18<br /> released channel: c1<br /> released channel: c2<br /> released channel: aux<br /><br /> RMAN> exit<br /><br /><br /> Recovery Manager complete.</span></span></blockquote>
<br />
<br />
Podemos ver el espacio usado en ASM del servidor standby por la nueva base:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel682 ~]$ <b>. oraenv</b><br /> ORACLE_SID = [orclcdb] ? <b>+ASM</b><br /> The Oracle base remains unchanged with value /u01/app/oracle<br /> [oracle@ora12c-si-asm-oel682 ~]$ <b>asmcmd</b><br /> ASMCMD> lsdg<br /> State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name<br /> MOUNTED EXTERN N 512 4096 4194304 10236 10140 0 10140 0 N CRS/<br /> MOUNTED EXTERN N 512 4096 4194304 20472 16472 0 16472 0 N DATA/<br /> MOUNTED EXTERN N 512 4096 4194304 30708 29536 0 29536 0 N FRA/<br /> </span></span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">ASMCMD></span></span></span></span></blockquote>
<br />
<h4>
8) Configurar standby usando DataGuard Broker</h4>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel681 admin]$ <b>dgmgrl /</b><br /> DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production<br /><br /> Copyright (c) 2000, 2013, Oracle. All rights reserved.<br /><br /> Welcome to DGMGRL, type "help" for information.<br /> Connected as SYSDG.<br /> DGMGRL> <b>create configuration orcl_dg as primary database is orclcdb connect identifier is orclcdb;</b><br /> Configuration "orcl_dg" created with primary database "orclcdb"<br /> DGMGRL> <b>add database orclstb as connect identifier is orclstb maintained as physical;</b><br /> Database "orclstb" added<br /> DGMGRL> <b>enable configuration</b><br /> Enabled.<br /> DGMGRL> <b>show configuration</b><br /><br /> Configuration - orcl_dg<br /><br /> Protection Mode: MaxPerformance<br /> Members:<br /> orclcdb - Primary database<br /> orclstb - Physical standby database<br /><br /> Fast-Start Failover: DISABLED<br /><br /> Configuration Status:<br /> SUCCESS (status updated 50 seconds ago)<br /><br /> DGMGRL> <b>show database orclstb</b><br /><br /> Database - orclstb<br /><br /> Role: PHYSICAL STANDBY<br /> Intended State: APPLY-ON<br /> Transport Lag: 0 seconds (computed 46 seconds ago)<br /> Apply Lag: 0 seconds (computed 46 seconds ago)<br /> Average Apply Rate: 456.00 KByte/s<br /> Real Time Query: OFF<br /> Instance(s):<br /> orclcdb<br /><br /> Database Warning(s):<br /> ORA-16857: standby disconnected from redo source for longer than specified threshold<br /><br /> Database Status:<br /> WARNING<br /><br /> DGMGRL> <b>show database orclstb</b><br /><br /> Database - orclstb<br /><br /> Role: PHYSICAL STANDBY<br /> Intended State: APPLY-ON<br /> Transport Lag: 1 minute 22 seconds (computed 9 seconds ago)<br /> Apply Lag: 1 minute 22 seconds (computed 9 seconds ago)<br /> Average Apply Rate: 456.00 KByte/s<br /> Real Time Query: OFF<br /> Instance(s):<br /> orclcdb<br /><br /> Database Status:<br /> SUCCESS<br /><br /> DGMGRL> exit</span></span></blockquote>
<br />
<br />
Como vemos le toma unos segundos activar la configuración hasta que no se reportan más errores.<br />
<br />
<h4>
Validaciones</h4>
<br />
En la base primaria podemos ver que el envío de logs está funcionando:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel681 admin]$ <b>sqlplus / as sysdba</b><br /><br /> SQL*Plus: Release 12.1.0.2.0 Production on Thu Jan 25 04:05:41 2018<br /><br /> Copyright (c) 1982, 2014, Oracle. All rights reserved.<br /><br /><br /> Connected to:<br /> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options<br /><br /> 04:05:41 SYS @ orclcdb:><b>set lines 180 pages 180</b><br /> 04:07:09 SYS @ orclcdb:><b>col dest_name for a20</b><br /> 04:07:11 SYS @ orclcdb:><b>select dest_id, dest_name, status, db_unique_name, database_mode,recovery_mode, archived_seq#,error, gap_status</b><br /> 04:07:11 2 <b>from V$ARCHIVE_DEST_STATUS</b><br /> 04:07:11 3 <b>where status !='INACTIVE';</b><br /><br /> DEST_ID DEST_NAME STATUS DB_UNIQUE_NAME DATABASE_MODE RECOVERY_MODE ARCHIVED_SEQ#<br /> ---------- -------------------- --------- ------------------------------ --------------- ----------------------- -------------<br /> ERROR GAP_STATUS<br /> ----------------------------------------------------------------- ------------------------<br /> 1 LOG_ARCHIVE_DEST_1 VALID NONE OPEN IDLE 17<br /><br /><br /> 2 LOG_ARCHIVE_DEST_2 VALID orclstb MOUNTED-STANDBY MANAGED REAL TIME APPLY 17<br /> NO GAP<br /><br /><br /> 04:07:12 SYS @ orclcdb:><b>archive log list;</b><br /> Database log mode Archive Mode<br /> Automatic archival Enabled<br /> Archive destination USE_DB_RECOVERY_FILE_DEST<br /> Oldest online log sequence 15<br /> Next log sequence to archive 18<br /> Current log sequence 18<br /> 04:07:21 SYS @ orclcdb:><b>exit</b><br /> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options<br /> [oracle@ora12c-si-asm-oel681 admin]$</span></span></blockquote>
<br />
Y en la standby podemos ver que se reciben y aplican:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel681 admin]$ <b>ssh ora12c-si-asm-oel682</b><br /> oracle@ora12c-si-asm-oel682's password:<br /> Last login: Mon Feb 12 17:04:14 2018 from ora12c-si-asm-oel681.internal.lab<br /><br /> ----------------------------------------<br /> Welcome to ora12c-si-asm-oel682<br /> OracleLinux 6.8 x86_64<br /><br /> FQDN: ora12c-si-asm-oel682.internal.lab<br /> IP: 10.0.2.15<br /><br /> Processor: Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz<br /> #CPU's: 1<br /> Memory: 3254 MB<br /> Kernel: 4.1.12-37.4.1.el6uek.x86_64<br /><br /> ----------------------------------------<br /> [oracle@ora12c-si-asm-oel682 ~]$ <b>. oraenv</b><br /> ORACLE_SID = [oracle] ? <b>orclcdb</b><br /> The Oracle base has been set to /u01/app/oracle<br /> [oracle@ora12c-si-asm-oel682 ~]$ <b>sqlplus / as sysdba</b><br /><br /> SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 12 17:11:54 2018<br /><br /> Copyright (c) 1982, 2014, Oracle. All rights reserved.<br /><br /><br /> Connected to:<br /> Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options<br /><br /> 17:11:17 SYS @ orclcdb:><b>set lines 180 pages 180</b><br /> 17:11:54 SYS @ orclcdb:><b>SELECT name,open_mode, DATABASE_ROLE, PROTECTION_MODE, PROTECTION_LEVEL FROM V$DATABASE;</b><br /><br /> NAME OPEN_MODE DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL<br /> --------- -------------------- ---------------- -------------------- --------------------<br /> ORCLCDB MOUNTED PHYSICAL STANDBY MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE<br /><br /> 17:12:23 SYS @ orclcdb:><b>select inst_id, pid, process, thread#, sequence#, status from gv$managed_standby where process='MRP0';</b><br /><br /> INST_ID PID PROCESS THREAD# SEQUENCE# STATUS<br /> ---------- ------------------------ --------- ---------- ---------- ------------<br /> 1 27307 MRP0 1 18 WAIT_FOR_LOG<br /><br /> 17:12:30 SYS @ orclcdb:><b>exit</b><br /> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production<br /> With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics<br /> and Real Application Testing options<br /> [oracle@ora12c-si-asm-oel682 ~]$ <b>cd /u01/app/oracle/diag/rdbms/orclstb/orclcdb/trace/</b><br /> [oracle@ora12c-si-asm-oel682 trace]$ <b>ls -lrt | tail</b><br /> -rw-r-----. 1 oracle dba 34895 Feb 12 17:07 drcorclcdb.log<br /> -rw-r-----. 1 oracle dba 3335 Feb 12 17:07 orclcdb_rfs_26965.trm<br /> -rw-r-----. 1 oracle dba 24927 Feb 12 17:07 orclcdb_rfs_26965.trc<br /> -rw-r-----. 1 oracle dba 82 Feb 12 17:07 orclcdb_rfs_27314.trm<br /> -rw-r-----. 1 oracle dba 1074 Feb 12 17:07 orclcdb_rfs_27314.trc<br /> -rw-r-----. 1 oracle dba 229 Feb 12 17:07 orclcdb_mrp0_27307.trm<br /> -rw-r-----. 1 oracle dba 3774 Feb 12 17:07 orclcdb_mrp0_27307.trc<br /> -rw-r-----. 1 oracle dba 348822 Feb 12 17:08 alert_orclcdb.log<br /> -rw-r-----. 1 oracle dba 2556 Feb 12 17:08 orclcdb_rsm0_26912.trm<br /> -rw-r-----. 1 oracle dba 13241 Feb 12 17:08 orclcdb_rsm0_26912.trc<br /> [oracle@ora12c-si-asm-oel682 trace]$ <b>date</b><br /> Mon Feb 12 17:12:59 CET 2018<br /> [oracle@ora12c-si-asm-oel682 trace]$ <b>tail alert_orclcdb.log</b><br /> Mon Feb 12 17:07:54 2018<br /> Media Recovery Log +FRA/ORCLSTB/ARCHIVELOG/2018_02_12/thread_1_seq_14.276.967913829<br /> Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT NODELAY<br /> Mon Feb 12 17:07:55 2018<br /> Media Recovery Log +FRA/ORCLSTB/ARCHIVELOG/2018_02_12/thread_1_seq_15.277.967913829<br /> Mon Feb 12 17:07:56 2018<br /> Media Recovery Log +FRA/ORCLSTB/ARCHIVELOG/2018_02_12/thread_1_seq_16.278.967913831<br /> Mon Feb 12 17:07:58 2018<br /> Media Recovery Log +FRA/ORCLSTB/ARCHIVELOG/2018_02_12/thread_1_seq_17.279.967914469<br /> Media Recovery Waiting for thread 1 sequence 18 (in transit)<br /> [oracle@ora12c-si-asm-oel682 trace]$<br />
<br /></span></span></blockquote>
<h4>
Problemas encontrados</h4>
<br />
a) Si no creamos el alias en ASM (o ajustamos el nombre del spfile en el init, es otra solución posible), vamos a tener este error al intentar tomar un respaldo de la base primaria:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>rman target sys/Oracle123 auxiliary sys/Oracle123@orclstb</b><br /><br /> Recovery Manager: Release 12.1.0.2.0 - Production on Wed Jan 24 23:49:57 2018<br /><br /> Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.<br /><br /> connected to target database: ORCLCDB (DBID=2737326422)<br /> connected to auxiliary database: ORCLCDB (not mounted)<br /><br /> RMAN> <b>run<br /> 2> {<br /> 3> allocate channel c1 type disk;<br /> 4> allocate channel c2 type disk;<br /> 5> allocate auxiliary channel aux type disk;<br /> d6> uplicate target database for standby from active database nofilenamecheck spfile<br /> 7> set log_archive_max_processes='8'<br /> 8> set db_unique_name='orclstb'<br /> 9> set standby_file_management='AUTO';<br /> 10> }</b><br /><br /> using target database control file instead of recovery catalog<br /> allocated channel: c1<br /> channel c1: SID=57 device type=DISK<br /><br /> allocated channel: c2<br /> channel c2: SID=82 device type=DISK<br /><br /> allocated channel: aux<br /> channel aux: SID=22 device type=DISK<br /><br /> Starting Duplicate Db at 24-JAN-18<br /><br /> contents of Memory Script:<br /> {<br /> backup as copy reuse<br /> targetfile '/u01/app/oracle/12.1.0.2/db1/dbs/orapworclcdb' auxiliary format<br /> '/u01/app/oracle/12.1.0.2/db1/dbs/orapworclcdb' targetfile<br /> '+DATA/orclcdb/spfileorclcdb.ora' auxiliary format<br /> '/u01/app/oracle/12.1.0.2/db1/dbs/spfileorclcdb.ora' ;<br /> sql clone "alter system set spfile= ''/u01/app/oracle/12.1.0.2/db1/dbs/spfileorclcdb.ora''";<br /> }<br /> executing Memory Script<br /><br /> Starting backup at 24-JAN-18<br /> released channel: c1<br /> released channel: c2<br /> released channel: aux<br /> RMAN-00571: ===========================================================<br /> RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============<br /> RMAN-00571: ===========================================================<br /> RMAN-03002: failure of Duplicate Db command at 01/24/2018 23:51:46<br /> RMAN-05501: aborting duplication of target database<br /> RMAN-03015: error occurred in stored script Memory Script<br /> RMAN-03009: failure of backup command on c2 channel at 01/24/2018 23:51:46<br /> ORA-19505: failed to identify file "+DATA/orclcdb/spfileorclcdb.ora"<br /><b><span style="color: red;"> ORA-15173: entry 'spfileorclcdb.ora' does not exist in directory 'orclcdb'</span></b><br /><br /> RMAN> exit<br /><br /><br /> Recovery Manager complete.</span></span></blockquote>
<br />
<br />
b) Si no agregamos los parametros de memoria al usar RMAN, vamos a tener este error al intentar crear la copia:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br /> [oracle@ora12c-si-asm-oel681 ~]$ <b>rman target sys/Oracle123 auxiliary sys/Oracle123@orclstb</b><br /><br /> Recovery Manager: Release 12.1.0.2.0 - Production on Thu Jan 25 00:55:33 2018<br /><br /> Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.<br /><br /> connected to target database: ORCLCDB (DBID=2737326422)<br /> connected to auxiliary database: ORCLCDB (not mounted)<br /><br /> RMAN> <b>run<br /> 2> {<br /> 3> allocate channel c1 type disk;<br /> a4> llocate channel c2 type disk;<br /> 5> allocate auxiliary channel aux type disk;<br /> 6> duplicate target database for standby from active database nofilenamecheck spfile<br /> 7> set log_archive_max_processes='8'<br /> 8> set db_unique_name='orclstb'<br /> 9> set standby_file_management='AUTO';<br /> 10> }</b><br /><br /> using target database control file instead of recovery catalog<br /> allocated channel: c1<br /> channel c1: SID=51 device type=DISK<br /><br /> allocated channel: c2<br /> channel c2: SID=59 device type=DISK<br /><br /> allocated channel: aux<br /> channel aux: SID=1 device type=DISK<br /><br /> Starting Duplicate Db at 25-JAN-18<br /><br /> contents of Memory Script:<br /> {<br /> backup as copy reuse<br /> targetfile '/u01/app/oracle/12.1.0.2/db1/dbs/orapworclcdb' auxiliary format<br /> '/u01/app/oracle/12.1.0.2/db1/dbs/orapworclcdb' targetfile<br /> '+DATA/orclcdb/spfileorclcdb.ora' auxiliary format<br /> '/u01/app/oracle/12.1.0.2/db1/dbs/spfileorclcdb.ora' ;<br /> sql clone "alter system set spfile= ''/u01/app/oracle/12.1.0.2/db1/dbs/spfileorclcdb.ora''";<br /> }<br /> executing Memory Script<br /><br /> Starting backup at 25-JAN-18<br /> Finished backup at 25-JAN-18<br /><br /> sql statement: alter system set spfile= ''/u01/app/oracle/12.1.0.2/db1/dbs/spfileorclcdb.ora''<br /><br /> contents of Memory Script:<br /> {<br /> sql clone "alter system set log_archive_max_processes =<br /> 8 comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set db_unique_name =<br /> ''orclstb'' comment=<br /> '''' scope=spfile";<br /> sql clone "alter system set standby_file_management =<br /> ''AUTO'' comment=<br /> '''' scope=spfile";<br /> shutdown clone immediate;<br /> startup clone nomount;<br /> }<br /> executing Memory Script<br /><br /> sql statement: alter system set log_archive_max_processes = 8 comment= '''' scope=spfile<br /><br /> sql statement: alter system set db_unique_name = ''orclstb'' comment= '''' scope=spfile<br /><br /> sql statement: alter system set standby_file_management = ''AUTO'' comment= '''' scope=spfile<br /><br /> Oracle instance shut down<br /><br /> connected to auxiliary database (not started)<br /> released channel: c1<br /> released channel: c2<br /> RMAN-00571: ===========================================================<br /> RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============<br /> RMAN-00571: ===========================================================<br /> RMAN-03002: failure of Duplicate Db command at 01/25/2018 00:57:53<br /> RMAN-05501: aborting duplication of target database<br /> RMAN-03015: error occurred in stored script Memory Script<br /> <b><span style="color: red;">RMAN-04014: startup failed: ORA-00845: MEMORY_TARGET not supported on this system</span></b><br /><br /> RMAN><br /><br /></span></span></blockquote>
<h3>
Conclusiones</h3>
<br />
Crear una configuración primary/standby en Oracle es un procedimiento conocido, y muy simple usando Dataguard broker.<br />
Hay varias formas de crear la copia inicial de la base de datos, y en este artículo vimos como hacerlo usando RMAN duplicate from active. <br />
Lo más importante aquí es mostrar los pasos adicionales necesarios para completar esta configuración si creamos las bases de forma automática usando Ansible, Vagrant y VirtualBox, <a href="http://databaseindex.blogspot.com.uy/2018/02/crear-oracle-standby-12c-usando.html" target="_blank">como describí en el post anterior</a>.<br />
<br />
Un saludo.Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-3021784293886341432018-02-08T21:03:00.001-03:002018-02-08T21:03:14.645-03:00Crear Oracle Standby 12c usando Vagrant/Ansible en Windows 10Este es otro ejemplo de cómo crear rápidamente y de forma automatizada un ambiente de pruebas Oracle con Vagrant y Ansible. En un post anterior mostraba como <a href="http://databaseindex.blogspot.com.uy/2017/04/automatizar-instalacion-de-oracle-rac.html" target="_blank">crear un RAC de dos nodos en windows 7</a>, y en este vamos a ver como crear y configurar Oracle 12c con dataguard (un server primario y otro standby).<br />
<br />
Otra vez voy a usar el repositorio de <a href="https://github.com/oravirt/" target="_blank">oravirt</a>, que hizo un gran laburo y tiene varios repos con distintas configurationes, reusando la mayor parte del código.<br />
<br />
Incluyo en este artículo todos los ajustes que tuve que hacer por usarlo en Windows 10.<br />
Seguramente no sean necesarios si tratan de hacer esta misma instalación en un host linux.<br />
<br />
Actualicé todas las versiones en mi PC desde el post anterior al usar RAC.<br />
Ahora tengo:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> Microsoft Windows [Version 10.0.16299.192]<br /> (c) 2017 Microsoft Corporation. All rights reserved.<br /><br /> D:\GitHub> git --version<br /> git version 2.11.0.windows.3<br /><br /> D:\GitHub> VBoxManage --version<br /> 5.2.6r120293<br /><br /> D:\GitHub> vagrant --version<br /> Vagrant 2.0.1</span></span></blockquote>
<br />
Pasos a seguir:<br />
<br />
<h3>
1) Instalar el repositorio</h3>
<br />
oravirt tiene varios repositorios preconfigurados para distintos escenarios.<br />
Me interesa crear Oracle single instance usando ASM, para luego configurar dataguard con dos máquinas. Así que el repo indicado es <a href="https://github.com/oravirt/vagrant-vbox-si-asm" target="_blank">vagrant-vbox-si-asm</a>.<br />
<br />
Para instalarlo:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> D:\github> <span style="color: blue;"><b>git clone --recursive https://github.com/oravirt/vagrant-vbox-si-asm</b></span><br /> Cloning into 'vagrant-vbox-si-asm'...<br /> remote: Counting objects: 87, done.<br /> remote: Total 87 (delta 0), reused 0 (delta 0), pack-reused 87<br /> Unpacking objects: 100% (87/87), done.<br /> Submodule 'extra-provision/ansible-oracle' (https://github.com/oravirt/ansible-oracle.git) registered for path 'extra-provision/ansible-oracle'<br /> Cloning into 'D:/GitHub/vagrant-vbox-si-asm/extra-provision/ansible-oracle'...<br /> remote: Counting objects: 2464, done.<br /> remote: Total 2464 (delta 0), reused 0 (delta 0), pack-reused 2464<br /> Receiving objects: 100% (2464/2464), 581.92 KiB | 320.00 KiB/s, done.<br /> Resolving deltas: 100% (1210/1210), done.<br /> Submodule path 'extra-provision/ansible-oracle': checked out '852ca12ad5f8025761529c19315b4e7198250740'</span></span></blockquote>
<br />
<br />
<h3>
2) Ajustes a los archivos de configuracion</h3>
<br />
Se necesitan ajustes menores a la configuración por defecto de este repo para crear un entorno standby: queremos dos VMs y connectividad entre ellas.<br />
Siempre hay que poner las versiones de Oracle y OS que queremos usar.<br />
En este ejemplo me interesa probar Oracle 12.1.0.2 y Oracle Enterprise Linux 6.8<br />
<br />
Los archivos y código a modificar son:<br />
<br />
<ul>
<li><i>\vagrant-vbox-si-asm\hosts.yml</i></li>
</ul>
<br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> basename_vm: <span style="color: red;">ora12c-si-asm-oel68</span></span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> num_vm: <span style="color: red;">2</span></span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-size: x-small;"> base_priv_ip: <span style="color: red;">172.16.56.30 </span> </span></span> # (esto es una IP arbiraria)<br />
<br />
<ul>
<li><i>\vagrant-vbox-si-asm\extra-provision\ansible-oracle\group_vars</i></li>
</ul>
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> oracle_install_version_gi: <span style="color: red;">12.1.0.2</span></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New", Courier, monospace;"> oracle_version_db: <span style="color: red;">12.1.0.2</span> </span></span><br />
<br />
Esto es todo lo necesario para mi prueba.<br />
Se pueden cambiar más cosas, como por ejemplo: nombre y cantidad de diskgroups, IPs, claves de usuarios root y oracle, etc.<br />
Todo está muy bien documentado en el repositorio, tanto en el readme como en cada archivo de configuración.<br />
<br />
<h3>
3) Copiar archivos de instalación de Oracle</h3>
<br />
En el directorio <i>\vagrant-vbox-si-asm\swrepo </i>se deben copiar los archivos de instalación de Oracle para la versión que queremos instalar.<br />
Estos archivos se bajan de <a href="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html" target="_blank">OTN</a>, previo registro gratuito.<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"> D:\GitHub\vagrant-vbox-si-asm\swrepo><span style="color: blue;"><b>dir</b></span><br /> Volume in drive D is externo<br /> Volume Serial Number is 88CD-FFE4<br /><br /> Directory of D:\GitHub\vagrant-vbox-si-asm\swrepo<br /><br /> 01/20/2018 09:36 PM <dir> .<br /> 01/20/2018 09:36 PM <dir> ..<br /> 01/20/2018 09:36 PM 0 .keep<br /> 01/20/2018 07:07 PM 1,151,304,589 p13390677_112040_Linux-x86-64_2of7.zip<br /> 01/20/2018 07:08 PM 1,205,251,894 p13390677_112040_Linux-x86-64_3of7.zip<br /> 01/20/2018 07:07 PM 1,395,582,860 p13390677_112040_Linux-x86-64_1of7.zip<br /> 07/29/2016 09:48 PM 1,747,021,273 linuxamd64_12102_grid_1of2.zip<br /> 07/29/2016 11:28 PM 646,969,279 linuxamd64_12102_grid_2of2.zip<br /> 07/29/2016 09:35 PM 1,673,519,571 linuxamd64_12102_database_1of2.zip<br /> 07/29/2016 09:27 PM 1,014,527,110 linuxamd64_12102_database_2of2.zip<br /> 8 File(s) 8,834,176,576 bytes<br /> 2 Dir(s) 378,020,823,040 bytes free</dir></dir></span></span><br />
</blockquote>
<br />
Como ven tengo Oracle 11.2.0.4 y 12.1.0.2, pero en este artículo vamos a usar sólo los archivos de 12.1.0.2.<br />
<br />
<h3>
4) Ajustes para prevenir errores</h3>
<br />
Los problemas que siguen me dieron al intentar ejecutar el paso 5.<br />
Acá me estoy adelantando y les digo como resolverlos, así pueden hacer los ajustes antes de empezar y ahorrase problemas.<br />
<h4>
a) lvol.py</h4>
<br />
El primer intento de crear las VMs me dio este error:
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;"><br />TASK [orahost : filesystem | create lv] ****************************************<br /> An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SyntaxError: invalid syntax<br /> fatal: [ora12c-si-asm-oel681]: FAILED! => {"failed": true, "msg": "Unexpected failure during module execution.", "stdout": ""}<br /> to retry, use: --limit @/vagrant/ansible-oracle/vbox-si-asm-install.retry<br /><br /> PLAY RECAP *********************************************************************<br /> ora12c-si-asm-oel681 : ok=13 changed=11 unreachable=0 failed=1<br /><br /> Ansible failed to complete successfully. Any error output should be<br /> visible above. Please fix these errors and try again.</span></span></blockquote>
<br />
Reporté el problema y tuve pronta respuesta de Mickael, el creador del repositorio. Pero el error no pudo ser reproducido usando versiones similares. Así que es posible que no le pase a todos.<br />
Despues de investigar un poco, esto era causado por el archivo lvol.py incluido en el directorio library de este repo.<br />
<br />
La solución en mi caso fue borrar el archivo <i>\vagrant-vbox-si-asm\extra-provision\ansible-oracle\library\lvol.py</i>.<br />
<br />
<h4>
b) variables de ambiente</h4>
<br />
Otro problema fue que el paso de provisioning no se ejecutaba. <br />
<br />
El comando '<i>vagrant up</i>' terminaba sin instalar el software, y '<i>vagrant provision</i>' tampoco hacía nada.<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
D:\GitHub\vagrant-vbox-si-asm> <span style="color: blue;"><b>set setup=true</b></span><br /> D:\GitHub\vagrant-vbox-si-asm> <span style="color: blue;"><b>vagrant provision</b></span><br /> ==> ora12c-si-asm-oel681: Running provisioner: ansible_local...<br /> Vagrant has automatically selected the compatibility mode '2.0'<br /> according to the Ansible version installed (2.2.1.0).<br /><br /> Alternatively, the compatibility mode can be specified in your Vagrantfile:<br /> https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode<br /> ora12c-si-asm-oel681: Running ansible-playbook...<br /><br /> PLAY [all] *********************************************************************<br /><br /> TASK [setup] *******************************************************************<br /> ok: [ora12c-si-asm-oel681]<br /><br /> TASK [init : Install packages] *************************************************<br /> ok: [ora12c-si-asm-oel681] => (item=[u'ntp', u'dnsmasq'])<br /><br /> TASK [init : Make sure ntp is running] *****************************************<br /> ok: [ora12c-si-asm-oel681]<br /><br /> TASK [init : Generate /etc/hosts] **********************************************<br /> ok: [ora12c-si-asm-oel681]<br /><br /> TASK [init : Generate /etc/resolv.conf] ****************************************<br /> ok: [ora12c-si-asm-oel681]<br /><br /> TASK [init : Generate dnsmasq config] ******************************************<br /> ok: [ora12c-si-asm-oel681]<br /><br /> TASK [init : Start and enable dnsmasq] *****************************************<br /> ok: [ora12c-si-asm-oel681]<br /><br /> PLAY RECAP *********************************************************************<br /> ora12c-si-asm-oel681 : ok=7 changed=0 unreachable=0 failed=0<br /> <br /> D:\GitHub\vagrant-vbox-si-asm></span></span></blockquote>
<br />
El problema es con Vagrant usando variables de ambiente en Windows 10, ya que en otras versiones de Windows se ha probado y funciona bien. <br />
Este error me dio con Powershell y cmd.<br />
<br />
Lo arreglé comentado el código que valida la variable para decidir si ejecutar el provisionamiento, así lo ejecute siempre.<br />
Hay que tener este cambio presente si volvemos a ejecutar y no queremos que haga provisioning. No es nuestro caso, yo siempre que tuve problemas borre y empecé de nuevo, así que siempre lo necesité.<br />
<br />
Estas son las dos líneas a modificar en el archivo Vagrantfile (notar el agregado del <b>#</b> al principio para comentar el código):<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> (line 166) <b><span style="color: blue;">#</span></b> if provisioning and ENV['setup'] == 'true'<br /> ...<br /> (line 190) <span style="color: blue;"><b>#</b></span> end # end provisioning</span></span></blockquote>
<br />
<h3>
5) Ahora sí, creando nuestro ambiente</h3>
<br />
Luego de los dos cambios anteriores, un solo comando crea las VM, las configura e instala el software:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> D:\github\vagrant-vbox-si-asm> <span style="color: blue;"><b>vagrant up</b></span><br /> Bringing machine 'ora12c-si-asm-oel681' up with 'virtualbox' provider...<br /> ==> ora12c-si-asm-oel681: Box 'oravirt/ol68' could not be found. Attempting to find and install...<br /> ora12c-si-asm-oel681: Box Provider: virtualbox<br /> ora12c-si-asm-oel681: Box Version: >= 0<br /> ==> ora12c-si-asm-oel681: Loading metadata for box 'oravirt/ol68'<br /> ora12c-si-asm-oel681: URL: https://vagrantcloud.com/oravirt/ol68<br /> ==> ora12c-si-asm-oel681: Adding box 'oravirt/ol68' (v20170418) for provider: virtualbox<br /> ora12c-si-asm-oel681: <span style="color: red;"><b>Downloading</b></span>: https://vagrantcloud.com/oravirt/boxes/ol68/versions/20170418/providers/virtualbox.box<br /> ora12c-si-asm-oel681:<br /> ==> ora12c-si-asm-oel681: Successfully added box 'oravirt/ol68' (v20170418) for 'virtualbox'!<br /> ==> ora12c-si-asm-oel681: Importing base box 'oravirt/ol68'...<br /> ...</span></span></blockquote>
<br />
Notar que la primera ejecución descarga la imagen del SO a usar, de 968Mb.<br />
El tamaño cmabia según la versión de SO que hayan elegido.<br />
<br />
Si tenemos que ejecutar el mismo comando (luego de corregir algún error) sólo se valida que la imagen ya exista y se reusa.<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> D:\GitHub\vagrant-vbox-si-asm> <span style="color: blue;"><b>vagrant up</b></span><br /> Bringing machine 'ora12c-si-asm-oel681' up with 'virtualbox' provider...<br /> ==> ora12c-si-asm-oel681: Importing base box 'oravirt/ol68'...</span></span></blockquote>
<br />
Volviendo a la ejecución original: tomó un par de horas completar la instalación en mi máquina (Intel i7, 16Gb RAM, HD 1Tb). Este tiempo varía si usan un disco SSD.<br />
<br />
El output es largo, así son las líneas finales si anduvo todo bien:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">...<br />PLAY RECAP *********************************************************************<br />ora12c-si-asm-oel681 : ok=109 changed=77 unreachable=0 failed=0<br />ora12c-si-asm-oel682 : ok=109 changed=77 unreachable=0 failed=0</span></span></blockquote>
<br />
<br />
<h3>
6) Conectando a las VM</h3>
<br />
Esta es la parte fácil, si todo anduvo bien las VM estan corriendo y con el software instalado:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> D:\GitHub\vagrant-vbox-si-asm> <span style="color: blue;"><b>vagrant box list</b></span><br /> kikitux/oracle6-racattack (virtualbox, 16.01.01)<br /> oravirt/ol68 (virtualbox, 20170418)<br /><br /> D:\GitHub\vagrant-vbox-si-asm> <span style="color: blue;"><b>vagrant ssh ora12c-si-asm-oel681</b></span><br /> Last login: Wed Jan 24 15:56:58 2018 from 192.168.9.70<br /><br /> ----------------------------------------<br /> Welcome to ora12c-si-asm-oel681<br /> OracleLinux 6.8 x86_64<br /><br /> FQDN: ora12c-si-asm-oel681.internal.lab<br /> IP: 10.0.2.15<br /><br /> Processor: Intel(R) Core(TM) i7-4600M CPU @ 2.90GHz<br /> #CPU's: 1<br /> Memory: 3254 MB<br /> Kernel: 4.1.12-37.4.1.el6uek.x86_64<br /><br /> ----------------------------------------<br /> [vagrant@ora12c-si-asm-oel681 ~]$ <span style="color: blue;"><b>ps -eaf | grep pmon</b></span><br /> oracle 15488 1 0 15:46 ? 00:00:04 ora_pmon_orclcdb<br /> oracle 24473 1 0 14:03 ? 00:00:04 asm_pmon_+ASM<br /> vagrant 27939 27921 0 21:22 pts/0 00:00:00 grep pmon</span></span></blockquote>
<br />
En caso de necesitar recrear el ambiente para hacer ajustes en los scripts, se pueden borrar cada VM con un comando:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">
<br /> D:\github\vagrant-vbox-si-asm> <span style="color: blue;"><b>vagrant destroy ora12c-si-asm-oel681</b></span><br /> ora12c-si-asm-oel681: Are you sure you want to destroy the 'ora12c-si-asm-oel681' VM? [y/N] y<br /> ==> ora12c-si-asm-oel681: Destroying VM and associated drives...</span></span></blockquote>
<br />
<br />
<h3>
7) Configurar la base standby</h3>
<br />
Este paso lo hice manual, ya que ambas VMs quedaron configuradas iguales con una base Oracle corriendo de nombre orcldb, y no hay repositorios todavía con un playbook de ansible para hacer esta configuración.<br />
<br />
Son varios pasos extra, así que lo dejo para el próximo post para mantener ambos de fácil referencia<br />
<br />
<br />
<br />
<h3>
Resumen </h3>
<br />
Si no necesitan instalar distintas versiones de forma frecuente, y ya saben como instalar todo de forma manual, hacer todo este proceso la primera vez les puede llevar el mismo tiempo.<br />
<br />
El valor de este procedimiento es que hace todo con un solo comando, y una vez que estamos familiarizados con la configuración, crear ambientes a medida es muy simple, libre de errores, y rápido.<br />
Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-20703490751817406522018-02-07T00:30:00.000-03:002018-03-05T01:14:18.369-03:00Infraestructura como código - ejemplos con OracleInstalar servidores siguiendo una larga lista de pasos de configuración es algo del pasado, desde que existen servidores virtuales y containers, y utilitarios para automatizar la creación y posterior configuración de los mismos. Quizás un pasado no muy lejano todavía, pero seguro lo va a ser dentro de muy poco tiempo.<br />
<br />
Algunas palabras clave por si todavía no queda muy claro lo que sigue: VirtualBox, Docker, Vagrant, Ansible, Kubernetes, Terraform.<br />
<br />
Para ponerme al día con todo esto, probé varias de las opciones disponibles actualmente para elegir como crear mis ambientes de prueba, lo que se traduce en poder crear servidores virtuales aislados usando cualquier combinación de versiones de OS y BD en una hora. <br />
Bueno, más o menos una hora, depende de la capacidad del PC usado para esto (host), y el hardware virtual que vamos a crear (guest). Pero una hora es razonable para crear una virtual de 1Gb de RAM, con una base Oracle de menos de 1Gb de SGA y sin contar el tiempo extra en cargar datos.<br />
Empecé con VMs que puedo correr en el hardware que tengo, aunque también voy a probar las opciones basadas en Cloud.<br />
<br />
La idea de este post es tener un índice de estas pruebas, mostrando todos los problemas a resolver para usar estas herramientas creando ambientes Oracle de forma automática - RAC, Single instance, Standby.<br />
El trabajo manual se reduce a ajustar archivos de configuración y ejecutar un comando que se encarga de todas las tareas: crear los servidores, instalar el software, configuralo y crear la base de datos.<br />
<br />
Como referencia, las pruebas las hice en un notebook Dell Latitude E6440, Intel Core i7-4600, 16Gb de RAM, disco duro de 1Tb y 10000RPM, usando Windows 10 professional.<br />
<br />
Hay mucha informacion sobre los conceptos de fondo y sobre variantes a las instalaciones que probé, todo a un google search de distancia, así que no voy a profundizar acá.<br />
Esta es la guía:<br />
<ul>
<li><a href="http://databaseindex.blogspot.com.uy/2017/04/automatizar-instalacion-de-oracle-rac.html" target="_blank">Crear Oracle RAC 12c usando Vagrant/Ansible en Windows 7 </a></li>
<li><a href="https://databaseindex.blogspot.com/2018/02/crear-oracle-standby-12c-usando.html" target="_blank">Crear Oracle Standby 12c usando Vagrant/Ansible en Windows 10 </a></li>
<ul>
<li><a href="http://databaseindex.blogspot.com.uy/2018/02/configurar-oracle-standby-12c-usando.html" target="_blank">Configurar Oracle Standby 12c usando RMAN duplicate y Data Guard broker</a></li>
</ul>
<li><a href="http://databaseindex.blogspot.com/2018/03/oracle-12c-vagrant-windows-wls-ubuntu.html" target="_blank">Crear VM Oracle 12c usando Vagrant en Windows 10 con ubuntu shell (WLS)</a> </li>
<li>Usar Oracle 12c en Docker sobre Windows 10 (3/2018)</li>
<li>Configurar Oracle Standby 12c en Docker sobre Windows 10 (3/2018)</li>
<li>Crear Oracle 12c en Oracle Cloud sin GUI (3/2018)</li>
</ul>
El plan es ir agregando links a los artículos mencionados antes, espero que sea uno por semana, y agregar nuevos cuando termine con estos.<br />
<br />
Un saludoNelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-51636499180944123292017-10-10T23:00:00.000-03:002017-10-11T00:57:41.932-03:00ODC Appreciation Day : Oracle Real Application Clusters #ThanksODCSiguiendo nuevamente la iniciativa de <a href="https://oracle-base.com/blog/2017/09/25/odc-appreciation-day-2017-thanksodc/" target="_blank">Tim Hall</a> de publicar hoy un post corto explicando porque nos gusta una funcionalidad de Oracle, mi granito va para <a href="https://www.oracle.com/database/real-application-clusters/index.html" target="_blank">Real Application Clusters</a>, la solución de clustering de Oracle que está disponible desde hace 17 años con su versión inicial en 9i (sin contar al Parallel server en versiones anteriores).<br />
<br />Además de brindar las funcionalidades obvias de alta disponiblildad y escalablidad, incluye algoritmos sofisticados y únicos en la industria, como la gestión de <a href="https://docs.oracle.com/database/121/RACAD/GUID-B1CFEBD7-9F45-45A8-B1EE-4699950885B4.htm#RACAD7274" target="_blank">caché global</a>.<br /><br />Lo destaco no solo por sus funcionalidades básicas, sino por la innovación que incorpora en cada nueva release, abriendo posibilidades y empujando a la industria.<br /><br />Por ejemplo, el <a href="http://www.oracle.com/technetwork/database/options/clustering/ahf/overview/index.html" target="_blank">Autonomous Health Framework (AHF)</a> incluido en 12.2 agrupando varios utilitarios, entre ellos el <a href="https://docs.oracle.com/database/122/ATNMS/cluster-health-advisor.htm#ATNMS-GUID-464029A9-AE1D-4F6A-B75E-4E85A2DE9901" target="_blank">Cluster Health Advisor,</a> será una parte muy importante del futuro <a href="https://www.oracle.com/database/autonomous-database/feature.html" target="_blank">autónomo de la base de datos</a>, que tanto se promociona en estos días.<br /><br />Un saludo.Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-39661855577887921942017-09-12T10:06:00.002-03:002017-09-12T10:06:40.463-03:00Mis sesiones en el OTN Tour Latinoamérica 2017Hace unos días terminó el <a href="http://www.oracle.com/technetwork/es/community/user-groups/otn-latinoamerica-tour-2017-3804485-esa.html" target="_blank">Oracle Technology Network Tour Latinoamérica</a>, en su octava edición, después de visitar 12 países. <br /><br />Esta fue mi primera participación como <a href="https://apex.oracle.com/pls/apex/f?p=19297:4:::NO:4:P4_ID:8720" target="_blank">Oracle ACE Director</a>, lo que me permitió ir a varios países: Argentina, Paraguay, Guatemala y Costa Rica, además de Uruguay obviamente.<br />Además del apoyo de OTN, esto no lo podría hacer sin el auspicio de <a href="https://www.pythian.com/" target="_blank">Pythian</a> y mi equipo, que me permiten tomar días libres para presentar.<br /><br />Cuatro conferencias de doce no es un porcentaje alto, pero les puedo asegurar que requiere mucho esfuerzo viajar tan seguido y presentar varias horas por día. <br />Mis respetos a las personas que se animan a visitar más países en tan poco tiempo.<br /><br />En todos los eventos tuve suerte de encontrar gente muy interesada en ambos temas.<br />Más allá de lo llenas que estén las salas, es muy lindo quedarse después de terminada la presentación discutiendo casos concretos y cómo encararlos.<br />
<br />
<br />
Estas son las agendas de los eventos en que participé:<br />
<br />
<br />
<br />
Uruguay<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://uyoug.org.uy/images/stories/otntour2017-uy-agenda-dia1-v4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://uyoug.org.uy/images/stories/otntour2017-uy-agenda-dia1-v4.png" data-original-height="561" data-original-width="800" height="448" width="640" /></a></div>
<br />
Argentina<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://aroug.org/wp-content/uploads/2017/06/OTNTour17-Dia1-v12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://aroug.org/wp-content/uploads/2017/06/OTNTour17-Dia1-v12.png" data-original-height="462" data-original-width="800" height="368" width="640" /></a></div>
<br />
Paraguay<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://i0.wp.com/ougpy.org/wp-content/uploads/2017/06/ougpy-otn-tour-programa.jpg?resize=768%2C624" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="624" data-original-width="768" height="520" src="https://i0.wp.com/ougpy.org/wp-content/uploads/2017/06/ougpy-otn-tour-programa.jpg?resize=768%2C624" width="640" /></a></div>
<br />
Guatemala<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://pbs.twimg.com/media/DFHrpNBUIAA4NMS.jpg:large" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="580" data-original-width="800" height="462" src="https://pbs.twimg.com/media/DFHrpNBUIAA4NMS.jpg:large" width="640" /></a></div>
Costa Rica<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVL1gNJKgNWsOMG3BkgwwBz-t__cwK9CYO0b43AQdjxLtc949pNSLxqFUIXKwyyYVA2HQlBwUh6sj0_OZfkIPV93Um9V1NbAzTS9vUG5p2zpGQX_ZQC7FnzDNBxAMa76tuYgGggXY0QhI/s1600/agenda-OTN17-costarica.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="532" data-original-width="1124" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVL1gNJKgNWsOMG3BkgwwBz-t__cwK9CYO0b43AQdjxLtc949pNSLxqFUIXKwyyYVA2HQlBwUh6sj0_OZfkIPV93Um9V1NbAzTS9vUG5p2zpGQX_ZQC7FnzDNBxAMa76tuYgGggXY0QhI/s640/agenda-OTN17-costarica.jpg" width="640" /></a></div>
<br />
Ahora vamos a lo importante, que es compartir las dos presentaciones nuevas que hice para estos eventos, disponibles en Slideshare:<br />
<ul>
<li><a href="https://www.slideshare.net/ncalero/redefining-tables-online-without-surprises" target="_blank">Redefiniendo tablas online sin sorpresas</a></li>
<li><a href="https://www.slideshare.net/ncalero/welcome-to-databases-in-the-cloud" target="_blank">Bienvenidos a las bases de datos en la nube</a></li>
</ul>
Los scripts de ejemplo de la primera están en <a href="https://www.dropbox.com/s/7r313kg2rstivf0/ncalero-redefinition-otnla2017.zip?dl=0" target="_blank">dropbox</a><br /><br />Ambos temas tienen mucho más para ver en profundidad de lo que se puede incluir en una sesión de 45 minutos. En siguientes posts voy a mostrar ejemplos de funcionalidades en ambos temas, y sobre todo lo nuevo en dbms_redefinition 12.2 que no dio tiempo de cubrir en detalle durante la presentación.<br /><br />Un saludo.Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-15982739884518768562017-04-14T16:12:00.001-03:002017-04-14T16:12:47.361-03:00Automatizar instalación de Oracle RAC con AnsibleEstoy empezando a usar <a href="https://www.ansible.com/" target="_blank">Ansible</a> para automatizar tareas frecuentes, y entre los primeros pasos de ver que hay hecho con Oracle encontré el repositorio <a href="https://github.com/racattack/racattack-ansible-oracle" target="_blank">racattack-ansible-oracle</a> para instalar un <a href="https://www.oracle.com/database/real-application-clusters/index.html" target="_blank">cluster (RAC)</a>.<br />
<br />
Terrible laburo, felicitaciones a <a href="https://github.com/kikitux" target="_blank">Alvaro Miranda</a> y <a href="https://oravirt.wordpress.com/" target="_blank">Mikael Sandström</a> por la contribución.<br />
<br />
Para mi sorpresa en el sitio del <a href="https://en.wikibooks.org/wiki/RAC_Attack_-_Oracle_Cluster_Database_at_Home/RAC_Attack_Automation" target="_blank">RAC Attack tiene documentado</a> parte de esto (el uso de Vagrant) desde hace un par de años. Es algo que en los eventos donde se realiza el RAC Attack no se llega a ver, ya que la idea es ejecutar paso a paso una instalación desde cero aprendiendo del proceso.<br />
Quizás en algún nuevo evento orientado a instalaciones avanzadas se pueda llegar a incluir, junto con el uso de una instalación existente para ver en funcionamiento todos los chiches que lo hacen un producto único (como <a href="http://www.oracle.com/technetwork/products/clustering/ac-overview-1967264.html" target="_blank">application continuity</a> por ejemplo).<br />
<br />
En <a href="https://oravirt.wordpress.com/2014/12/23/racattack-meet-ansible-oracle/" target="_blank">este post </a>de Mikael está bien explicado como usar el proyecto completo con Ansible.<br />
<br />
Así que para aportar algo además de hacerle propaganda al proyecto, incluyo detalles de como probarlo en Windows 7 64 bits.<br />
Usé una máquina con Intel Core i7-4600 y 16Gb de RAM.<br />
<br />
<h3>
Instalar utilitarios</h3>
Ya tenía instalado <a href="https://git-scm.com/download/win" target="_blank">Git</a> 2.7.0 y <a href="http://download.virtualbox.org/virtualbox/5.1.18/VirtualBox-5.1.18-114002-Win.exe" target="_blank">VirtualBox</a> 5.1.4, no se necesita actualizarlos a las últimas versiones para que funcione.<br />
Tuve que instalar <a href="https://www.vagrantup.com/downloads.html" target="_blank">Vagrant </a>en su versión actual <a href="https://releases.hashicorp.com/vagrant/1.9.3/vagrant_1.9.3.msi" target="_blank">1.9.3.</a><br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLDrSvjFrpTXVzwwzdTtN5DBRcLjgJxeE_BaOmohcaunWDA_weuN-LYkvsQgIV4Gv1lFVGz19YzaCjLqVj5dfajZoPmA9YBU8r0MD6S_XpmWV7T1AgmbyO_YAuQUlI19yzC5-4kICGJH4/s1600/tools-version.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="358" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLDrSvjFrpTXVzwwzdTtN5DBRcLjgJxeE_BaOmohcaunWDA_weuN-LYkvsQgIV4Gv1lFVGz19YzaCjLqVj5dfajZoPmA9YBU8r0MD6S_XpmWV7T1AgmbyO_YAuQUlI19yzC5-4kICGJH4/s640/tools-version.png" width="640" /></a></div>
<br />
<h4>
Cambiar directorio por defecto de Vagrant</h4>
Algo importante a ajustar es el directorio donde Vagrant guarda los archivos de las VM, ya que ocupan mucho espacio y nuestro disco C: se puede quedar sin espacio pronto.<br />
<br />
Por defecto las imágenes de VMs van a <i>C:\Users\USER\.vagrant.d</i> aunque los binarios se hayan instalado en otro disco.<br />
<br />
Esto es simple de ajustar: hay que definir la variable de ambiente <b>VAGRANT_HOME</b> y mover el direcotorio <i>C:\Users\USER\.vagrant.d</i> al nuevo. Yo lo moví a otro disco:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">set VAGRANT_HOME=D:\vagrant.d
move C:\Users\USER\.vagrant.d d:\</span></span></blockquote>
<br />
<br />
<br />
Conviene no solo hacerlo en la shell y dejar esta variable de forma permanente en las propiedades del sistema (botón de inicio, "computer" y con el botón derecho elegir propiedades, y "change settings" para abrir el diálogo de propiedades del sistema).<br />
Ahí en el tab "advanced" hay que elegir "Enviroment Variables" y agregar la nueva variable VAGRANT_HOME.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRWRhJ3QYiiricpvMzc4NddIX4KLdez0tZtkNYVSBHBxcAamiEjnaJvIqbM4iJhc-cOAuiqZcjT0g5WUPlSbJCRgjA7kmILLyv-rlN61Z_DwNi43pOH8W1LTU8GIqfuTunnqoNoNHuTys/s1600/win-system-properties.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRWRhJ3QYiiricpvMzc4NddIX4KLdez0tZtkNYVSBHBxcAamiEjnaJvIqbM4iJhc-cOAuiqZcjT0g5WUPlSbJCRgjA7kmILLyv-rlN61Z_DwNi43pOH8W1LTU8GIqfuTunnqoNoNHuTys/s320/win-system-properties.png" width="287" /> </a>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO8kTOHNK-TB8zei2X6oCXI9GA0YdopyPA8NU0TEOjM5Z8brjmc2hitSxhzBs08xBhfLRl1Yx2K0VSqyvuEoDDmBP43EhKnIK5SbGWEcQuHMobJ__uxSFLLM8tHWtmKT1t82wWNwdV-UY/s1600/win-system-properties-variable.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO8kTOHNK-TB8zei2X6oCXI9GA0YdopyPA8NU0TEOjM5Z8brjmc2hitSxhzBs08xBhfLRl1Yx2K0VSqyvuEoDDmBP43EhKnIK5SbGWEcQuHMobJ__uxSFLLM8tHWtmKT1t82wWNwdV-UY/s320/win-system-properties-variable.png" width="289" /></a></div>
<br />
<br />
<h3>
</h3>
<h3>
Usando racattack-ansible</h3>
Primero hay que clonar el repositorio.<br />
Mi directorio de trabajo es d:\github donde solo tengo proyectos:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub><b>git clone --recursive https://github.com/racattack/racattack-ansible-oracle</b><br />Cloning into 'racattack-ansible-oracle'...<br />remote: Counting objects: 320, done.<br />Receiving objects: 100% (320/320), 52.22 KiB | 0 bytes/s, done.<br />remote: Total 320 (delta 0), reused 0 (delta 0), pack-reused 320<br />Resolving deltas: 100% (210/210), done.<br />Checking connectivity... done.<br />Submodule 'stagefiles/ansible-oracle' (https://github.com/oravirt/ansible-oracle) registered for path 'stagefiles/ansible-oracle'<br />Cloning into 'stagefiles/ansible-oracle'...<br />remote: Counting objects: 2181, done.<br />remote: Compressing objects: 100% (11/11), done.<br />remote: Total 2181 (delta 2), reused 0 (delta 0), pack-reused 2169<br />Receiving objects: 100% (2181/2181), 535.77 KiB | 245.00 KiB/s, done.<br />Resolving deltas: 100% (1027/1027), done.<br />Checking connectivity... done.<br />Submodule path 'stagefiles/ansible-oracle': checked out '00651e0caf9a876fcefe51d21e44a6e78c313e76'</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span></blockquote>
<br />
De más está decir que lean el README.md del proyecto donde se explica como usarlo, y los posts mencionados al comienzo para entender mejor lo que sigue.<br />
<br />
<h4>
Copiar archivos de instalación de Oracle 12cR1.</h4>
<br />
Ya tenía a mano estos archivos y los moví al directorio requerido:<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">D:\GitHub\racattack-ansible-oracle><b>dir 12cr1</b><br /> Volume in drive D is externo<br /> Volume Serial Number is 88CD-FFE4<br /><br /> Directory of D:\GitHub\racattack-ansible-oracle\12cr1<br /><br />13/04/2017 11:37 AM </span></span><br />
<br />
<dir><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> .<br />13/04/2017 11:37 AM <dir> ..<br />13/04/2017 11:37 AM 111 .gitattributes<br />13/04/2017 11:37 AM 0 keep<br />13/04/2017 11:37 AM 187 readme.txt<br />29/07/2016 09:35 PM 1,673,519,571 linuxamd64_12102_database_1of2.zip<br />29/07/2016 09:27 PM 1,014,527,110 linuxamd64_12102_database_2of2.zip<br />29/07/2016 09:48 PM 1,747,021,273 linuxamd64_12102_grid_1of2.zip<br />29/07/2016 11:28 PM 646,969,279 linuxamd64_12102_grid_2of2.zip<br /> 7 File(s) 5,082,037,531 bytes<br /> 2 Dir(s) 688,935,665,664 bytes free</dir></span></span></dir></blockquote>
<br />
Lo único que tuve que ajustar fueron los nombres de archivos, porque yo tenía estos:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">29/07/2016 09:48 PM 1,747,021,273 p21419221_121020_Linux-x86-64_5of10.zip<br />29/07/2016 11:28 PM 646,969,279 p21419221_121020_Linux-x86-64_6of10.zip<br />29/07/2016 09:35 PM 1,673,519,571 p21419221_121020_Linux-x86-64_1of10.zip<br />29/07/2016 09:27 PM 1,014,527,110 p21419221_121020_Linux-x86-64_2of10.zip</span></span></blockquote>
<br />
Si no los tienen a mano, los pueden bajar del <a href="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html" target="_blank">sitio de Oracle</a><br />
Notar que actualmente están disponibles los binarios de 12.2 y esta configuración usa 12.1.<br />
Al final de la página de descarga en el sitio de Oracle tienen las instrucciones para pedir archivos viejos ya no disponibles.<br />
<br />
<h3>
Creando virtuales</h3>
<br />
Este es el primer paso, usando '<b>vagrant up</b>'.<br />
Llevó varios minutos bajar la virtual de OEL6 (1.2Gb) desde https://atlas.hashicorp.com.<br />
<br />
Ahora pueden validar que el directorio por defecto de vagrant quedó bien cambiado, ya que estos archivos se guardan en <i>D:\vagrant.d\boxes\kikitux-VAGRANTSLASH-oracle6-racattack\16.01.01\virtualbox </i><br />
<br />
Si lo ejecutaron sin cambiar el archivo de configuración <i>Vagrantfile </i>(en <i>D:\GitHub\racattack-ansible-oracle</i>), van a ver que se creó una sola VM, ya que la configuración por defecto viene para una sola instancia.<br />
Eso es por esta variable:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">num_DB_INSTANCES = 1</span></blockquote>
<br />
Y la ejecución con valores por defecto:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle><b>vagrant up</b><br /><br />collabn1 eth1 lanip :192.168.78.51<br />collabn1 eth2 privip :172.16.100.51<br />collabn1 dns server role is master<br />on first boot shared disks will be created, this will take some time<br />Bringing machine 'collabn1' up with 'virtualbox' provider...<br />==> collabn1: Box 'kikitux/oracle6-racattack' could not be found. Attempting to find and install...<br /> collabn1: Box Provider: virtualbox<br /> collabn1: Box Version: >= 0<br />==> collabn1: Loading metadata for box 'kikitux/oracle6-racattack'<br /> collabn1: URL: https://atlas.hashicorp.com/kikitux/oracle6-racattack<br />==> collabn1: Adding box 'kikitux/oracle6-racattack' (v16.01.01) for provider: virtualbox<br /> collabn1: Downloading: https://atlas.hashicorp.com/kikitux/boxes/oracle6-racattack/versions/16.01.01/providers/virtualbox.box<br /> collabn1: Progress: 100% (Rate: 590k/s, Estimated time remaining: --:--:--)<br />==> collabn1: Successfully added box 'kikitux/oracle6-racattack' (v16.01.01) for 'virtualbox'!<br />==> collabn1: Importing base box 'kikitux/oracle6-racattack'...<br />==> collabn1: Matching MAC address for NAT networking...<br />==> collabn1: Checking if box 'kikitux/oracle6-racattack' is up to date...<br />==> collabn1: Setting the name of the VM: collabn1.1704131427<br />==> collabn1: Clearing any previously set network interfaces...<br />==> collabn1: Preparing network interfaces based on configuration...<br /> collabn1: Adapter 1: nat<br /> collabn1: Adapter 2: hostonly<br /> collabn1: Adapter 3: hostonly<br />==> collabn1: Forwarding ports...<br /> collabn1: 22 (guest) => 2222 (host) (adapter 1)<br />==> collabn1: Running 'pre-boot' VM customizations...<br />==> collabn1: Booting VM...<br />==> collabn1: Waiting for machine to boot. This may take a few minutes...<br /> collabn1: SSH address: 127.0.0.1:2222<br /> collabn1: SSH username: vagrant<br /> collabn1: SSH auth method: private key<br /> collabn1: Warning: Remote connection disconnect. Retrying...<br />==> collabn1: Machine booted and ready!<br />==> collabn1: Checking for guest additions in VM...<br /> collabn1: The guest additions on this VM do not match the installed version of<br /> collabn1: VirtualBox! In most cases this is fine, but in rare cases it can<br /> collabn1: prevent things such as shared folders from working properly. If you see<br /> collabn1: shared folder errors, please make sure the guest additions withinthe<br /> collabn1: virtual machine match the version of VirtualBox you have installed on<br /> collabn1: your host and reload your VM.<br /> collabn1:<br /> collabn1: Guest Additions Version: 5.0.0<br /> collabn1: VirtualBox Version: 5.1<br />==> collabn1: Setting hostname...<br />==> collabn1: Configuring and enabling network interfaces...<br />==> collabn1: Mounting shared folders...<br /> collabn1: /vagrant => D:/GitHub/racattack-ansible-oracle<br /> collabn1: /media/sf_12cR1 => D:/GitHub/racattack-ansible-oracle/12cR1<br />==> collabn1: Detected mount owner ID within mount options. (uid: 54320 guestpath: /media/sf_12cR1)<br />==> collabn1: Detected mount group ID within mount options. (gid: 54321 guestpath: /media/sf_12cR1)<br /> collabn1: /media/stagefiles => D:/GitHub/racattack-ansible-oracle/stagefiles<br /><br />==> collabn1: Detected mount group ID within mount options. (gid: 54321 guestpath: /media/stagefiles)<br />==> collabn1: Running provisioner: shell...<br /> collabn1: Running: inline script<br />==> collabn1: overwriting /etc/resolv.conf<br />==> collabn1: Running provisioner: shell...<br /> collabn1: Running: inline script<br />==> collabn1: wrote key file "/etc/rndc.key"<br />==> collabn1: Stopping named:<br />==> collabn1: [ OK ]<br />==> collabn1: Starting named:<br />==> collabn1: [ OK ]<br />==> collabn1: successfully completed named steps</span></span></blockquote>
<br />
Podemos validar que la VM quedó configurada<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle><b>vagrant box list</b><br />kikitux/oracle6-racattack (virtualbox, 16.01.01)</span></span></blockquote>
<br />
Y podemos entrar usando SSH.<br />
Acá algo que tuve que ajustar: agregar los binarios de Git al path por defecto, ya que estos incluyen una versión de ssh.<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle><b>ssh</b><br />'ssh' is not recognized as an internal or external command,<br />operable program or batch file.<br /><br />D:\GitHub\racattack-ansible-oracle><b>vagrant ssh</b><br /><br />collabn1 eth1 lanip :192.168.78.51<br />collabn1 eth2 privip :172.16.100.51<br />collabn1 dns server role is master<br />`ssh` executable not found in any directories in the %PATH% variable. Is an<br />SSH client installed? Try installing Cygwin, MinGW or Git, all of which<br />contain an SSH client. Or use your favorite SSH client with the following<br />authentication information shown below:<br /><br />Host: 127.0.0.1<br />Port: 2222<br />Username: vagrant<br />Private key: D:/vagrant.d/insecure_private_key<br /><br />D:\GitHub\racattack-ansible-oracle><b>set PATH=%PATH%;"C:\Program Files\Git\usr\bin"</b></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle><b>ssh</b><br />usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]<br /> [-D [bind_address:]port] [-E log_file] [-e escape_char]<br /> [-F configfile] [-I pkcs11] [-i identity_file]<br /> [-L address] [-l login_name] [-m mac_spec]<br /> [-O ctl_cmd] [-o option] [-p port]<br /> [-Q cipher | cipher-auth | mac | kex | key]<br /> [-R address] [-S ctl_path] [-W host:port]<br /> [-w local_tun[:remote_tun]] [user@]hostname [command]</span></span></blockquote>
<br />
Extrañamente a pesar de tener ssh en el path ahora, no funciona desde vagrant:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle><b>vagrant ssh</b><br /><br />collabn1 eth1 lanip :192.168.78.51<br />collabn1 eth2 privip :172.16.100.51<br />collabn1 dns server role is master<br />`ssh` executable not found in any directories in the %PATH% variable. Is an<br />SSH client installed? Try installing Cygwin, MinGW or Git, all of which<br />contain an SSH client. Or use your favorite SSH client with the following<br />authentication information shown below:<br /><br />Host: 127.0.0.1<br />Port: 2222<br />Username: vagrant<br />Private key: D:/vagrant.d/insecure_private_key</span></span></blockquote>
<br />
Pero podemos usarlo directamente y confirmar que la VM está ejecutando:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle>ssh vagrant@127.0.0.1 -p2222 -i D:/vagrant.d/insecure_private_key</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be establis</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">hed.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">RSA key fingerprint is SHA256:9AOzhyrPyO5Z1/4F9ATt90X0kco87RIdGLSUTw4swgg.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">Are you sure you want to continue connecting (yes/no)? yes</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">Warning: Permanently added '[127.0.0.1]:2222' (RSA) to the list of known hosts.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">[vagrant@collabn1 ~]$</span></span></blockquote>
<br />
Para agregar la segunda VM, modificamos el archivo de configuración Vagranfile:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">num_DB_INSTANCES = 2</span></span></blockquote>
<br />
Y volvemos a ejecutar '<b>vagrant up</b>':<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle>vagrant up<br /><br />collabn2 eth1 lanip :192.168.78.52<br />collabn2 eth2 privip :172.16.100.52<br />collabn2 dns server role is slave<br /><br />collabn1 eth1 lanip :192.168.78.51<br />collabn1 eth2 privip :172.16.100.51<br />collabn1 dns server role is master<br />Bringing machine 'collabn2' up with 'virtualbox' provider...<br />Bringing machine 'collabn1' up with 'virtualbox' provider...<br />==> collabn2: Importing base box 'kikitux/oracle6-racattack'...<br />==> collabn2: Matching MAC address for NAT networking...<br />==> collabn2: Checking if box 'kikitux/oracle6-racattack' is up to date...<br />==> collabn2: Setting the name of the VM: collabn2.1704131511<br />==> collabn2: Fixed port collision for 22 => 2222. Now on port 2200.<br />==> collabn2: Clearing any previously set network interfaces...<br />==> collabn2: Preparing network interfaces based on configuration...<br /> collabn2: Adapter 1: nat<br /> collabn2: Adapter 2: hostonly<br /> collabn2: Adapter 3: hostonly<br />==> collabn2: Forwarding ports...<br /> collabn2: 22 (guest) => 2200 (host) (adapter 1)<br />==> collabn2: Running 'pre-boot' VM customizations...<br />==> collabn2: Booting VM...<br />==> collabn2: Waiting for machine to boot. This may take a few minutes...<br /> collabn2: SSH address: 127.0.0.1:2200<br /> collabn2: SSH username: vagrant<br /> collabn2: SSH auth method: private key<br /> collabn2: Warning: Remote connection disconnect. Retrying...<br />==> collabn2: Machine booted and ready!<br />==> collabn2: Checking for guest additions in VM...<br /> collabn2: The guest additions on this VM do not match the installed version of<br /> collabn2: VirtualBox! In most cases this is fine, but in rare cases it can<br /> collabn2: prevent things such as shared folders from working properly. If you see<br /> collabn2: shared folder errors, please make sure the guest additions within the<br /> collabn2: virtual machine match the version of VirtualBox you have installed on<br /> collabn2: your host and reload your VM.<br /> collabn2:<br /> collabn2: Guest Additions Version: 5.0.0<br /> collabn2: VirtualBox Version: 5.1<br />==> collabn2: Setting hostname...<br />==> collabn2: Configuring and enabling network interfaces...<br />==> collabn2: Mounting shared folders...<br /> collabn2: /vagrant => D:/GitHub/racattack-ansible-oracle<br /> collabn2: /media/sf_12cR1 => D:/GitHub/racattack-ansible-oracle/12cR1<br />==> collabn2: Detected mount owner ID within mount options. (uid: 54320 guestpath: /media/sf_12cR1)<br />==> collabn2: Detected mount group ID within mount options. (gid: 54321 guestpath: /media/sf_12cR1)<br /> collabn2: /media/stagefiles => D:/GitHub/racattack-ansible-oracle/stagefiles<br /><br />==> collabn2: Detected mount group ID within mount options. (gid: 54321 guestpath: /media/stagefiles)<br />==> collabn2: Running provisioner: shell...<br /> collabn2: Running: inline script<br />==> collabn2: overwriting /etc/resolv.conf<br />==> collabn2: Running provisioner: shell...<br /> collabn2: Running: inline script<br />==> collabn2: Stopping named:<br />==> collabn2: [ OK ]<br />==> collabn2: wrote key file "/etc/rndc.key"<br />==> collabn2: Stopping named:<br />==> collabn2: [ OK ]<br />==> collabn2: Starting named:<br />==> collabn2: [ OK ]<br />==> collabn2: successfully completed named steps<br />==> collabn1: Checking if box 'kikitux/oracle6-racattack' is up to date...<br />==> collabn1: Machine already provisioned. Run `vagrant provision` or use the `--provision`<br />==> collabn1: flag to force provisioning. Provisioners marked to run always will still run.<br /><br />D:\GitHub\racattack-ansible-oracle></span></span></blockquote>
<br />
<br />
Una vez que termina, validamos que podemos conectarnos a la nueva VM:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle><b>ssh vagrant@192.168.78.52 -i D:/vagrant.d/insecure_private_key</b><br />The authenticity of host '192.168.78.52 (192.168.78.52)' can't be established.<br />RSA key fingerprint is SHA256:9AOzhyrPyO5Z1/4F9ATt90X0kco87RIdGLSUTw4swgg.<br />Are you sure you want to continue connecting (yes/no)? yes<br />Warning: Permanently added '192.168.78.52' (RSA) to the list of known hosts.<br />Last login: Thu Apr 13 18:20:17 2017 from 192.168.78.51<br />[vagrant@collabn2 ~]$</span></span></blockquote>
<br />
<h3>
Instalar RAC</h3>
<br />
Con las virtuales corriendo, queda la parte que realmente interesa de ejecutar la instalación automática del RAC: esto incluye todos los pasos de configuración incluídos en el RAC Attack y que dejan las dos instancias funcionando, con ASM y una base de sid <i>racdba</i>.<br />
<br />
Mi prueba tomó varias horas, lejos de los 60 minutos que comenta el post original.<br />
Para ejecutarlo usando valores por defecto (BD 12.1, ASM 12.1):<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">D:\GitHub\racattack-ansible-oracle><b>set setup=standard</b><br /><br />D:\GitHub\racattack-ansible-oracle><b>vagrant provision</b><br /><br />collabn2 eth1 lanip :192.168.78.52<br />collabn2 eth2 privip :172.16.100.52<br />collabn2 dns server role is slave<br /><br />collabn1 eth1 lanip :192.168.78.51<br />collabn1 eth2 privip :172.16.100.51<br />collabn1 dns server role is master<br />==> collabn2: Running provisioner: shell...<br /> collabn2: Running: inline script<br />...</span></span></blockquote>
<br />
El log de esa ejecución es muy largo para incluirlo acá.<br />
Lo bueno es que si algún paso reporta problemas, pueden revisar los logs y luego de resolver el problema de fondo volver a ejecutar '<b>valgrant provision</b>' que si bien arranca desde el principio, va descartando los pasos que ya fueron completados.<br />
<br />
Tuve problemas durante la creación de la base - dbca falla y vagrant aborta.<br />
Como van a ver a continuación, esto es porque el hardware no es suficiente para la configuración usada, o simplemente porque Windows no puede manejar bien la falta de recursos.<br />
<br />
Esto no debería ocurrir si tienen mejor hardware y deberían poder completar la instalación sin problemas.<br />
Pero me parece interesante mostrarles como se puede resolver en caso que tengan el mismo problema.<br />
<br />
Esto es lo que se ve en la terminal donde estaba corriendo vagrant:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">==> collabn1: stderr:<br />==> collabn1: real 8m13.313s<br />==> collabn1: user 0m29.813s<br />==> collabn1: sys 0m5.689s<br />==> collabn1: stdout: Copying database files<br />==> collabn1: 1% complete<br />==> collabn1: 3% complete<br />==> collabn1: DBCA Operation failed.<br />==> collabn1: Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/racdba/racdba.log" for further details.<br />==> collabn1:<br />==> collabn1: TASK: [oradb-create | debug var=oradbcreate.stdout_lines] ********<br />...</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">==> collabn1: PLAY RECAP *******************************************************<br />********<br />==> collabn1: *****<br />==> collabn1: to retry, use: --limit @/root/racattack-full-install.retry<br />==> collabn1:<br />==> collabn1: collabn1 : ok=96 changed=32 unreachable=0 failed=1<br />==> collabn1: collabn2 : ok=102 changed=22 unreachable=0 failed=0<br />==> collabn1: real 144m15.544s<br />==> collabn1: user 0m12.850s<br />==> collabn1: sys 0m14.901s<br />The SSH command responded with a non-zero exit status. Vagrant<br />assumes that this means the command failed. The output for this command<br />should be in the log above. Please read the output to determine what<br />went wrong.</span></span></blockquote>
<br />
Revisando los archivos de logs, encontré el motivo de la falla:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">[oracle@collabn1 ~]$ <b>cat /u01/app/oracle/cfgtoollogs/dbca/racdba/CloneRmanRestore.log</b><br /><span style="color: red;">ORA-00445: background process "DBRM" did not start after 120 seconds</span><br />BEGIN dbms_backup_restore.resetCfileSection(dbms_backup_restore.RTYP_DFILE_COPY); END;<br /><br />*<br />ERROR at line 1:<br /><br />Process ID: 0</span></span></blockquote>
<br />
Esto es típico de falta de recursos de hardware.<br />
Ejecutando dbca nuevamente y monitoreando más de cerca, este error se reporta por el proceso VKTM en otras ejecuciones.<br />
<br />
Después de algunas pruebas logré resolverlo aumentando el timeout de 120 segundos a 500, agregando este parámetro de inicio a la base:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">event='10281 trace name context forever, level 500'</span></blockquote>
<br />
El arreglo simple fue incluirlo en el template que usa DBCA (<i>/u01/app/oracle/12.1.0.2/</i><wbr></wbr><i>rachome1/assistants/dbca/</i><wbr></wbr><i>templates/General_Purpose.dbc</i>), ya que tuve problemas para incluirlo en el response file y en la línea de comandos.<br />
<br />
Después de esto, la ejecución manual de dbca completó de forma exitosa y la base quedó andando:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">[oracle@collabn1 ~]$ /u01/app/oracle/12.1.0.2/rachome1/bin/dbca -responseFile /u01/stage/rsp/dbca_racdba.rsp -silent -redoLogFileSize 100<br />Copying database files<br />1% complete<br />3% complete<br />9% complete<br />15% complete<br />21% complete<br />27% complete<br />30% complete<br />Creating and starting Oracle instance<br />32% complete<br />36% complete<br />40% complete<br />44% complete<br />45% complete<br />48% complete<br />50% complete<br />...<br />
[oracle@collabn1 ~]$ ps -eaf | grep pmon</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">oracle 5971 20007 0 12:36 pts/3 00:00:00 grep pmon</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">grid 6090 1 0 02:13 ? 00:00:03 mdb_pmon_-MGMTDB</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">oracle 10222 1 0 10:44 ? 00:00:01 ora_pmon_racdba1</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">grid 23150 1 0 01:42 ? 00:00:05 asm_pmon_+ASM1</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">[oracle@collabn1 ~]$[oracle@collabn1 ~]$ export ORACLE_HOME=/u01/app/oracle/12.1.0.2/rachome1</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">[oracle@collabn1 ~]$ export ORACLE_SID=racdba1</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">[oracle@collabn1 ~]$ $ORACLE_HOME/bin/sqlplus / as sysdba</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">SQL*Plus: Release 12.1.0.2.0 Production on Fri Apr 14 13:05:53 2017</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">Copyright (c) 1982, 2014, Oracle. All rights reserved.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">Connected to:</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">Advanced Analytics and Real Application Testing options</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">13:07:31 SYS @ racdba1:>select instance_name, host_name, status from gv$instance;</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">INSTANCE_NAME</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">----------------</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">HOST_NAME STATUS</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">---------------------------------------------------------------- ------------</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">racdba1</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: x-small;">collabn1.racattack OPEN</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span></blockquote>
<br />
Luego de esto volví a ejecutar '<b>valgrant provision' </b>pero reporta error nuevamente con la ejecución de dbca, aunque el log no muestra errores esta vez y la instancia creada antes sigue en ejecución.<br />
<br />
Claramente necesita más investigación para poder retomar desde esta situación.<br />
<br />
La solución simple para evitar esto sería limpiar la instalación y empezar nuevamente (<b>setup=clean</b>) agregando en algún paso el ajuste al template que es necesario para el harware que estoy usando.<br />
<br />
Esos detalles quedan para un próximo post.<br />
<br />
Un saludo <br />
<br />Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-20440961933280751752017-01-31T21:03:00.000-03:002017-01-31T21:03:25.312-03:00Oracle TFA y support toolsFrecuentemente tengo que hacer health checks de bases de datos Oracle, y para esto es de gran utilidad ORAchk y TFA, herramientas gratuitas provistas por Oracle.<br />
Un detalle menor que encontré recientemente es una buena excusa para presentarles ambos en este post.<br />
<br />
Si no conocen ORAchk, vean la nota de soporte <b>1268927.2</b> <i>"ORAchk - Health Checks for the Oracle Stack"</i>.<br />
Tiene su tiempo en la vuelta y en cada actualización se validan más cosas. Y no solo la base de datos - OEM y ZFS también. Es parte del Database Support Tools Bundle y recientemente se incluye en la distribución del utilitario Trace File Analyzer (TFA).<br />
<br />
TFA originalmente se usaba para simplificar la recolección de logs, pero también se mejora en cada nueva versión y tiene cosas muy buenas - prueben 'show parameter ' en un cluster grande para ir tomándole el gusto.<br />
Vean la nota <b>1513912.1</b><i> "TFA with Database Support Tools Bundle"</i> para saber todo lo que tiene.<br />
<br />
Hay muchos post en internet explicando como usar e instalar TFA.<br />
Pueden ver <a href="https://www.toadworld.com/platforms/oracle/b/weblog/archive/2016/05/01/upgrading-tfa-to-use-the-rac-and-db-support-tools" target="_blank">esta guía muy completa por Deiby Gómez</a>.<br />
<br />
La documentación es buena y pueden encontrarse algunos casos interesantes.<br />
Por ejemplo, en una instalación de TFA con root el usuario oracle viene configurado por defecto para usar las tools y TFA. Pero eso no incluye todos los comandos, algunos van a dar error a pesar de tener permiso:<br />
<br />
<br />
<blockquote class="tr_bq">
[oracle@bigdatalite ~]$ /u01/app/oracle/product/tfa/bin/tfactl access lsusers<br /><br />Access Denied: Only TFA Admin can run this command</blockquote>
<br />
Lo que no implica que oracle no pueda usar TFA y las tools:<br />
<blockquote class="tr_bq">
[oracle@bigdatalite ~]$ /u01/app/oracle/product/tfa/bin/tfactl<br />tfactl> toolstatus<br />.------------------------------------------.<br />| External Support Tools |<br />+-------------+--------------+-------------+<br />| Host | Tool | Status |<br />+-------------+--------------+-------------+<br />| bigdatalite | alertsummary | DEPLOYED |<br />| bigdatalite | exachk | DEPLOYED |<br />| bigdatalite | ls | DEPLOYED |<br />| bigdatalite | pstack | DEPLOYED |<br />| bigdatalite | orachk | DEPLOYED |<br />| bigdatalite | sqlt | DEPLOYED |<br />| bigdatalite | grep | DEPLOYED |<br />| bigdatalite | summary | DEPLOYED |<br />| bigdatalite | prw | NOT RUNNING |<br />| bigdatalite | vi | DEPLOYED |<br />| bigdatalite | tail | DEPLOYED |<br />| bigdatalite | param | DEPLOYED |<br />| bigdatalite | dbglevel | DEPLOYED |<br />| bigdatalite | darda | DEPLOYED |<br />| bigdatalite | history | DEPLOYED |<br />| bigdatalite | oratop | DEPLOYED |<br />| bigdatalite | oswbb | NOT RUNNING |<br />| bigdatalite | dbperf | DEPLOYED |<br />| bigdatalite | changes | DEPLOYED |<br />| bigdatalite | events | DEPLOYED |<br />| bigdatalite | ps | DEPLOYED |<br />| bigdatalite | srdc | DEPLOYED |<br />'-------------+--------------+-------------'
<br />
tfactl> orachk<br />This computer is for [S]ingle instance database or part of a [C]luster to run RAC database [S|C] [C]:^C</blockquote>
<br />Para poder usar todos los comandos de TFA con el usuario Oracle, no queda otra que configurar sudo:<br /><blockquote class="tr_bq">
[oracle@bigdatalite ~]$ sudo /u01/app/oracle/product/tfa/bin/tfactl access lsusers<br />ncalero's password on bigdatalite:<br />.---------------------------------.<br />| TFA Users in bigdatalite |<br />+-----------+-----------+---------+<br />| User Name | User Type | Status |<br />+-----------+-----------+---------+<br />| oracle | USER | Allowed |<br />'-----------+-----------+---------'</blockquote>
Un saludo.Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-84049749536872748992016-10-11T09:39:00.000-03:002016-10-11T09:39:00.780-03:00OTN Appreciation Day: Oracle read/write consistency #ThanksOTNMe sumo a la iniciativa de <a href="https://oracle-base.com/blog/2016/09/28/otn-appreciation-day/" target="_blank">Tim Hall</a> de publicar hoy un post corto explicando porque nos gusta una funcionalidad de Oracle.<br />
<br />
De las miles de funcionalidades que tiene la base de datos Oracle quiero resaltar una central - la versión 4 de Oracle (año 1984) implementó <a href="https://docs.oracle.com/database/121/CNCPT/consist.htm#CNCPT221">Read Consistency</a>, un mecanismo de consistencia de datos usando <a href="https://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm#i17881">Multiversion Concurrency Control</a> (MVCC) que permite sesiones concurrentes de lectura sobre datos que están siendo modificados por otra sesión.<br />
Esto es la I de las <a href="https://en.wikipedia.org/wiki/ACID">propiedades ACID</a> que cumplen las bases de datos transaccionales.<br />
<br />
MVCC es algo normal en las bases de datos modernas (por ejemplo en <a href="http://dev.mysql.com/doc/refman/5.7/en/innodb-consistent-read.html">MySQL</a> y <a href="https://www.postgresql.org/docs/9.1/static/transaction-iso.html">Postgres</a>) pero fue muy innovador para su época.<br />
<br />
Lo que me parece más importante es que tiene un impacto directo sobre la capacidad de respuesta y escalabilidad de la base de datos, ya que las consultas no se bloquean por escrituras. Esto pasa inadvertido para el usuario final y agrega muy poco trabajo extra al motor.<br />
<br />
¿Pero no todas las funcionalidades básicas de la base de datos serían igual de importantes: respaldos, recuperación, paralelismo, transacciones distribuidas, y un largo etcétera?.<br />
<br />
Después de descubrir que Oracle además implementa write-consistency - explicado con claridad por Tom Kyte <a href="http://tkyte.blogspot.com.uy/2005/08/something-different-part-i-of-iii.html">acá</a> y <a href="http://tkyte.blogspot.com.uy/2005/08/part-ii-seeing-restart.html">acá</a> - se vuelve mi favorita por ser fundamental para la escalabilidad del motor, compleja y de elegante implementación, siendo un buen ejemplo de lo sofisticado que son los algoritmos incluidos en el motor y la importancia de que una base de datos tenga una arquitectura robusta.<br />
<br />
Un saludo.Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-35338236293610418012016-10-02T14:30:00.003-03:002016-10-02T14:32:46.797-03:00Validando inicio automático con scripts de Oracle en LinuxHace poco tuve que revisar una base Oracle 11g en Linux que no estaba inciando cuando el servidor se reinciaba, a pesar de estar configurada para hacerlo.<br /><br />Comparto la experiencia, ya que esto es algo bien simple pero que puede llevar algo de tiempo resolverlo ya que la documentación no es explícita en este punto: <b>las entradas en /etc/oratab que configuran el inicio de una base no tienen que tener ningún comentario al final para que funcionen.</b><br />
<br />
Esto quiere decir que esta entrada en /etc/oratab se ignora:<br /> TEST:/u01/app/oracle/product/11.2.0/db_1:Y # line added by Agent<br /><br />
<h3>
Contexto</h3>
Antes de ir al detalle, un poco de contexto: ¿cómo se puede configurar el inicio automático de una base de datos Oracle?. Hay dos opciones, dependiendo de si estamos usando clusterware o no:<br />
<ul>
<li> configurando scripts en /etc/init.d </li>
Esta es la opción clásica desde 9i con algunas variantes<br />Hay un muy buen blog post from Tim Hall <a href="https://oracle-base.com/articles/linux/automating-database-startup-and-shutdown-on-linux#oracle-11gr2-update" target="_blank">explicando las opciones</a>
<li>usando Oracle Clusterware </li>
Desde 10g para base RAC o standalone.<br />Notar que Oracle Restart (disponible desde 11g para standalone) es <a href="http://docs.oracle.com/database/121/ADMIN/restart.htm#ADMIN12708" target="_blank">deprecado en 12c</a> y se recomienda usar Clusterware con ASM en instalaciones standalone.<br />Hay un muy buen <a href="http://portrix-systems.de/blog/brost/oracle-restart-deprecated-in-12c/" target="_blank">post por Bjoern</a> validando el uso de GI y otro de Bobby mostrando que se puede <a href="https://dbasolved.com/2013/12/30/oracle-restart-with-oracle-database-12c-12-1-0-1/" target="_blank">usar Restart en 12c</a>
</ul>
¿Cuál es la recomendación de Oracle en 12c para instalaciones no RAC? <a href="https://docs.oracle.com/database/121/UNXAR/strt_stp.htm#UNXAR150" target="_blank">Usar scripts</a><br />
<br />
<h3>
Validando la configuración</h3>
El primer paso es validar que tenemos todo configurado para el incio automático:<br />
<ul>
<li>el script dbora está instalado en /etc/init.d/dbora </li>
<li>la variable ORACLE_HOME tiene el path de nuestra instalación en ese script</li>
<li>los scripts dbshut y dbstart existen en nuestro Oracle home (vienen por defecto, pero por las dudas)</li>
<li>el script dbora está configurado para ejecutarse con el inicio y baja del SO</li>
<li>/etc/oratab tiene una entrada con "Y" para la base que queremos manejar con estos scripts</li>
</ul>
En mi caso, todo estaba en su lugar:<br />
<blockquote class="tr_bq">
[oracle@oraculo ~]$ <b>cat /etc/init.d/dbora</b><br /> #!/bin/sh<br /> # chkconfig: 345 99 10<br /> # description: Oracle auto start-stop script.<br /> #<br /> # Change the value of ORACLE_HOME to specify the correct Oracle home<br /> # directory for your installation.<br /><br /> ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1<br /> #<br /> # Change the value of ORACLE to the login name of the<br /> # oracle owner at your site.<br /> #<br /> ORACLE=oracle<br /> PATH=${PATH}:$ORACLE_HOME/bin<br /> export ORACLE_HOME PATH<br /> #<br /><br /> case $1 in<br /> 'start')<br /> runuser -l $ORACLE -c '$ORACLE_HOME/bin/dbstart $ORACLE_HOME &'<br /> touch /var/lock/subsys/dbora<br /> ;;<br /> 'stop')<br /> runuser -l $ORACLE -c '$ORACLE_HOME/bin/dbshut $ORACLE_HOME'<br /> rm -f /var/lock/subsys/dbora<br /> ;;<br /> *)<br /> echo "usage: $0 {start|stop}"<br /> exit<br /> ;;<br /> esac<br /> #<br /> exit<br /> <br /> [oracle@oraculo ~]$ <b>ls -lrt /u01/app/oracle/product/11.2.0/db_1/bin/dbstart</b><br /> -rwxr-x--- 1 oracle oinstall 13957 Sep 9 2014 /u01/app/oracle/product/11.2.0/db_1/bin/dbstart<br /><br /> [oracle@oraculo ~]$ <b>ls -lrt /u01/app/oracle/product/11.2.0/db_1/bin/dbshut*</b><br /> -rwxr-x---. 1 oracle oinstall 6030 Jan 1 2000 /u01/app/oracle/product/11.2.0/db_1/bin/dbshut<br /><br /> [oracle@oraculo ~]$ <b>chkconfig --list dbora</b><br /> dbora 0:off 1:off 2:off 3:on 4:on 5:on 6:off<br /> <br /> [oracle@oraculo ~]$ <b>cat /etc/issue</b><br /> Red Hat Enterprise Linux Server release 6.6 (Santiago)<br /> Kernel \r on an \m<br /><br /> [oracle@oraculo ~]$ <b>tail /etc/oratab</b><br /> ##<br /> ## Multiple entries with the same $ORACLE_SID are not allowed.<br /> ##<br /> ##<br /> +ASM1:/u01/app/11.2.0/grid:N # line added by Agent<br /> OLDT:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent<br /> TEST:/u01/app/oracle/product/11.2.0/db_1:Y # line added by Agent</blockquote>
<br />Pero luego de reiniciar el servidor, la base no levantó.<br /><br />
<h3>
Investigando el problema</h3>
Al ejectuar el script dbstart, se generan dos archivos de log:<br />
<blockquote class="tr_bq">
/u01/app/oracle/product/11.2.0/db_1/listener.log<br /> /u01/app/oracle/product/11.2.0/db_1/startup.log</blockquote>
En mi caso solo estaba creado el de listener, no el de la base.<br /><br />Mirando el código del script dbstart, y después de habilitar trace agregando la variable <i>ORACLE_TRACE=T</i> en su código, algunos mensajes extras y reiniciar, encontré el problema en esta parte del código:<br />
<blockquote class="tr_bq">
ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`<br /> ...<br /> # Proceed only if last field is 'Y'.<br /> if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "Y" ] ; then</blockquote>
Validando ese código con nuestro archivo de configuración:<br />
<blockquote class="tr_bq">
[oracle@oraculo ~]$ <b>cat /etc/oratab | awk -F: '{print $NF}' -</b><br /> #Backup file is /u01/app/oracle/product/11.2.0/db_1/srvm/admin/oratab.bak.TESTlinux1 line added by Agent<br /> ##<br /> #<br /> #<br /> #<br /> ## This file is used by ORACLE utilities. It is created by root.sh<br /> ## and updated by either Database Configuration Assistant while creating<br /> ## a database or ASM Configuration Assistant while creating ASM instance.<br /> #<br /> ## A colon is used as the field terminator. A new line terminates<br /> ## the entry. Lines beginning with a pound sign, '#', are comments.<br /> ##<br /><br /><br /> ##<br /> ## The first and second fields are the system identifier and home<br /> ## directory of the database respectively. The third filed indicates<br /> ## to the dbstart utility that the database should , "Y", or should not,<br /> ## "N", be brought up at system boot time.<br /> ##<br /> ## Multiple entries with the same $ORACLE_SID are not allowed.<br /> ##<br /> ##<br /> N # line added by Agent<br /> N # line added by Agent<br /> Y # line added by Agent</blockquote>
<br />Cada línea es lo que se compara con "Y".<br />Para que ese código funcione, las líneas del archivo /etc/oratab deben terminar con la Y:<br /><br />
<blockquote class="tr_bq">
[oracle@oraculo ~]$ <b>echo "TEST:/u01/app/oracle/product/11.2.0/db_1:Y" | awk -F: '{print $NF}' -</b><br /> Y</blockquote>
Después de quitar los comentarios al final de la entrada en /etc/oratab, al siguiente reinicio del servidor ahora se reinicia la base:<br />
<blockquote class="tr_bq">
[oracle@oraculo ~]$ <b>tail /etc/oratab</b><br /> ## "N", be brought up at system boot time.<br /> ##<br /> ## Multiple entries with the same $ORACLE_SID are not allowed.<br /> ##<br /> ##<br /> +ASM1:/u01/app/11.2.0/grid:N # line added by Agent<br /> OLDT:/u01/app/oracle/product/11.2.0/db_1:N # line added by Agent<br /> TEST:/u01/app/oracle/product/11.2.0/db_1:Y<br /> <br /> [oracle@oraculo ~]$ <b>uptime</b><br /> 12:13:10 up 4 days, 1:50, 1 user, load average: 2.10, 1.31, 1.02<br /><br /> [oracle@oraculo ~]$<b> ls -lrt /u01/app/oracle/product/11.2.0/db_1/startup.log</b><br /> -rw-r--r-- 1 oracle oinstall 2334 Sep 28 10:46 /u01/app/oracle/product/11.2.0/db_1/startup.log<br /><br /> [oracle@oraculo ~]$ <b>tail -17 /u01/app/oracle/product/11.2.0/db_1/startup.log</b><br /> ORACLE instance started.<br /><br /> Total System Global Area 8017100800 bytes<br /> Fixed Size 2244192 bytes<br /> Variable Size 1392509344 bytes<br /> Database Buffers 6610223104 bytes<br /> Redo Buffers 12124160 bytes<br /> Database mounted.<br /> SQL><br /> Database altered.<br /><br /> SQL> Disconnected from Oracle Database 11g Release 11.2.0.3.0 - 64bit Production<br /> + '[' 0 -eq 0 ']'<br /> + echo ''<br /><br /> + echo '/u01/app/oracle/product/11.2.0/db_1/bin/dbstart: Database instance "TEST" warm started.'<br /> /u01/app/oracle/product/11.2.0/db_1/bin/dbstart: Database instance "TEST" warm started.<br /> [oracle@oraculo ~]$</blockquote>
Un saludo. <br />Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-28672455295966919532016-07-12T10:05:00.000-03:002016-07-12T10:05:14.740-03:00Implementando row level security en OracleMe interesaba ponerme al día con las distintas opciones para implementar una solución de seguridad a nivel de registros en Oracle, un tema conocido con diferentes nombres: Virtual Private Database (VPD), Row Level Security (RLS) y Fine Grained Access Control (FGAC).<br /><br />Este es un tema del que se ha hablado mucho, ya que desde la versión 8i (año 1999) Oracle tiene la funcionalidad VPD, agregando luego Label security (OLS).<br /><br />Me tomé un tiempo para revisar que hay de nuevo en cada versión de Oracle sobre estas funcionalidades, para descubrir Real Application Security (RAS) en 12c que resuelve el tema con un enfoque más general separando seguridad de sesiones de esquemas.<br /><br />Armé una presentación repasando las diferentes formas de implementar FGAC usando estas funcionalidades en base a ejemplos, y tuve la suerte de ser seleccionado para presentarla en el evento KScope16 organizado por ODTUG en Chicago hace unas semanas.<br /><br />Dejo aquí los <a href="https://www.dropbox.com/s/lagscdzqa2uglyt/ncalero-fga-scripts-kscope16.zip?dl=0">scripts SQL usados</a>, y el <a href="http://www.slideshare.net/ncalero/protect-sensitive-data-implementing-finegrained-access-control-in-oracle" target="_blank">link a la presentación.</a><br />
<br />
Cada alternativa tiene muchos detalles y en esta presentación de 50 minutos apenas da para titulares, pero es una buena referencia para comenzar.<br /><br />
Un saludo.Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-12989688195113245362015-09-04T10:16:00.000-03:002015-09-04T10:16:32.502-03:00Actualizar repositorio Yum de OEL 6Ayer usé una VM que hacía un tiempo no usaba, <a href="http://www.oracle.com/technetwork/database/bigdata-appliance/bigdatalite-30-2301352.html">bigdatalite 3.0</a>.<br />
<br />
Esta es una VM provista por Oracle para testing que trae muchos productos instalados, además de la base de datos, y ya anda por la <a href="http://www.oracle.com/technetwork/database/bigdata-appliance/oracle-bigdatalite-2104726.html">versión 4.2.1</a><br />
<br />
Lo interesante para compartir es que quise instalar unos paquetes nuevos para testear integración, usando el public-yum de Oracle, y falló por no encontrar los archivos:<br />
<br />
<blockquote>
[root@bigdatalite ~]# yum install postgresql-server<br />Loaded plugins: refresh-packagekit, security<br />epel/metalink | 2.9 kB 00:00 <br />epel | 4.3 kB 00:00 <br />epel/primary_db | 5.7 MB 00:04 <br />ol6_UEK_latest | 1.2 kB 00:00 <br />ol6_UEK_latest/primary | 23 MB 00:07 <br />ol6_UEK_latest 491/491<br />ol6_latest | 1.4 kB 00:00 <br />ol6_latest/primary | 52 MB 00:26 <br />http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum<br />Trying other mirror.<br />Setting up Install Process<br />Resolving Dependencies<br />--> Running transaction check<br />---> Package postgresql-server.x86_64 0:8.4.20-1.el6_5 will be installed<br />--> Processing Dependency: postgresql(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64<br />--> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-1.el6_5 for package: postgresql-server-8.4.20-1.el6_5.x86_64<br />--> Processing Dependency: libcrypto.so.10(libcrypto.so.10)(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64<br />--> Processing Dependency: libssl.so.10(libssl.so.10)(64bit) for package: postgresql-server-8.4.20-1.el6_5.x86_64<br />--> Running transaction check<br />---> Package openssl.x86_64 0:1.0.0-27.el6_4.2 will be updated<br />--> Processing Dependency: openssl = 1.0.0-27.el6_4.2 for package: openssl-devel-1.0.0-27.el6_4.2.x86_64<br />---> Package openssl.x86_64 0:1.0.1e-16.el6_5.7 will be an update<br />---> Package postgresql.x86_64 0:8.4.13-1.el6_3 will be updated<br />--> Processing Dependency: postgresql(x86-64) = 8.4.13-1.el6_3 for package: postgresql-devel-8.4.13-1.el6_3.x86_64<br />---> Package postgresql.x86_64 0:8.4.20-1.el6_5 will be an update<br />---> Package postgresql-libs.x86_64 0:8.4.13-1.el6_3 will be updated<br />---> Package postgresql-libs.x86_64 0:8.4.20-1.el6_5 will be an update<br />--> Running transaction check<br />---> Package openssl-devel.x86_64 0:1.0.0-27.el6_4.2 will be updated<br />---> Package openssl-devel.x86_64 0:1.0.1e-16.el6_5.7 will be an update<br />---> Package postgresql-devel.x86_64 0:8.4.13-1.el6_3 will be updated<br />---> Package postgresql-devel.x86_64 0:8.4.20-1.el6_5 will be an update<br />--> Finished Dependency Resolution<br /><br />Dependencies Resolved<br /><br />===========================================================================================================================<br /> Package Arch Version Repository Size<br />===========================================================================================================================<br />Installing:<br /> postgresql-server x86_64 8.4.20-1.el6_5 ol6_latest 3.4 M<br />Updating for dependencies:<br /> openssl x86_64 1.0.1e-16.el6_5.7 ol6_latest 1.5 M<br /> openssl-devel x86_64 1.0.1e-16.el6_5.7 ol6_latest 1.2 M<br /> postgresql x86_64 8.4.20-1.el6_5 ol6_latest 2.6 M<br /> postgresql-devel x86_64 8.4.20-1.el6_5 ol6_latest 815 k<br /> postgresql-libs x86_64 8.4.20-1.el6_5 ol6_latest 201 k<br /><br />Transaction Summary<br />===========================================================================================================================<br />Install 1 Package(s)<br />Upgrade 5 Package(s)<br /><br />Total download size: 9.7 M<br />Is this ok [y/N]: y<br />Downloading Packages:<br />http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/openssl-1.0.1e-16.el6_5.7.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"<br />Trying other mirror.<br />http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/openssl-devel-1.0.1e-16.el6_5.7.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"<br />Trying other mirror.<br />http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/postgresql-8.4.20-1.el6_5.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"<br />Trying other mirror.<br />http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/postgresql-devel-8.4.20-1.el6_5.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"<br />Trying other mirror.<br />http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/postgresql-libs-8.4.20-1.el6_5.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"<br />Trying other mirror.<br />http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/postgresql-server-8.4.20-1.el6_5.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"<br />Trying other mirror.<br /><br /><br />Error Downloading Packages:<br /> postgresql-devel-8.4.20-1.el6_5.x86_64: failure: postgresql-devel-8.4.20-1.el6_5.x86_64.rpm from ol6_latest: [Errno 256] No more mirrors to try.<br /> openssl-1.0.1e-16.el6_5.7.x86_64: failure: openssl-1.0.1e-16.el6_5.7.x86_64.rpm from ol6_latest: [Errno 256] No more mirrors to try.<br /> openssl-devel-1.0.1e-16.el6_5.7.x86_64: failure: openssl-devel-1.0.1e-16.el6_5.7.x86_64.rpm from ol6_latest: [Errno 256] No more mirrors to try.<br /> postgresql-server-8.4.20-1.el6_5.x86_64: failure: postgresql-server-8.4.20-1.el6_5.x86_64.rpm from ol6_latest: [Errno 256] No more mirrors to try.<br /> postgresql-libs-8.4.20-1.el6_5.x86_64: failure: postgresql-libs-8.4.20-1.el6_5.x86_64.rpm from ol6_latest: [Errno 256] No more mirrors to try.<br /> postgresql-8.4.20-1.el6_5.x86_64: failure: postgresql-8.4.20-1.el6_5.x86_64.rpm from ol6_latest: [Errno 256] No more mirrors to try.</blockquote>
<br /><br />
Después de revisar que la conectividad de la VM a internet andaba bien, y que el public-yum tenía esos archivos, la solución pasó por actualizar el repositorio yum local, ya que por lo visto Oracle cambió los path de los archivos.<br />
<br />
Así que por traje la última versión del repositorio:<br />
<br />
<blockquote>
[root@bigdatalite ~]# cd /etc/yum.repos.d<br />[root@bigdatalite yum.repos.d]# ls -lrt<br />total 12<br />-rw-r--r--. 1 root root 1056 Nov 4 2012 epel-testing.repo<br />-rw-r--r--. 1 root root 957 Nov 4 2012 epel.repo<br />-rw-r--r--. 1 root root 1953 May 2 2014 public-yum-ol6.repo<br /><br />[root@bigdatalite yum.repos.d]# mv public-yum-ol6.repo public-yum-ol6.repo-old<br />[root@bigdatalite yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo<br />--2015-09-03 20:38:02-- http://public-yum.oracle.com/public-yum-ol6.repo<br />Resolving public-yum.oracle.com... 200.40.28.24, 200.40.28.25<br />Connecting to public-yum.oracle.com|200.40.28.24|:80... connected.<br />HTTP request sent, awaiting response... 200 OK<br />Length: 5284 (5.2K) [text/plain]<br />Saving to: “public-yum-ol6.repo”<br /><br />100%[=================================================================================>] 5,284 --.-K/s in 0.004s <br /><br />2015-09-03 20:38:02 (1.30 MB/s) - “public-yum-ol6.repo” saved [5284/5284]<br /><br />[root@bigdatalite yum.repos.d]# ls -lrt<br />total 20<br />-rw-r--r--. 1 root root 1056 Nov 4 2012 epel-testing.repo<br />-rw-r--r--. 1 root root 957 Nov 4 2012 epel.repo<br />-rw-r--r--. 1 root root 1953 May 2 2014 public-yum-ol6.repo-old<br />-rw-r--r--. 1 root root 5284 Jul 28 16:16 public-yum-ol6.repo</blockquote>
<br />
<br />
Pero siguió fallando la instalación con el mismo error después de esto.<br />
<br />
Solo después de refrescar el repositorio se resolvió el problema:<br />
<br />
<blockquote>
[root@bigdatalite yum.repos.d]# yum clean all<br />Loaded plugins: refresh-packagekit, security<br />Cleaning repos: epel ol6_UEK_latest ol6_latest<br />Cleaning up Everything<br />[root@bigdatalite yum.repos.d]# <br />[root@bigdatalite yum.repos.d]# yum repolist<br />Loaded plugins: refresh-packagekit, security<br />epel/metalink | 2.9 kB 00:00 <br />epel | 4.3 kB 00:00 ... <br />epel/primary_db | 5.7 MB 00:06 <br />ol6_UEK_latest | 1.2 kB 00:00 <br />ol6_UEK_latest/primary | 23 MB 00:06 <br />ol6_UEK_latest 491/491<br />ol6_latest | 1.4 kB 00:00 <br />ol6_latest/primary | 52 MB 00:12 <br />ol6_latest 32176/32176<br />repo id repo name status<br />epel Extra Packages for Enterprise Linux 6 - x86_64 11,764<br />ol6_UEK_latest Latest Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64) 491<br />ol6_latest Oracle Linux 6Server Latest (x86_64) 32,176<br />repolist: 44,431<br />[root@bigdatalite yum.repos.d]# yum install postgresql-server<br />Loaded plugins: refresh-packagekit, security<br />Setting up Install Process<br />Resolving Dependencies<br />--> Running transaction check<br />---> Package postgresql-server.x86_64 0:8.4.20-3.el6_6 will be installed<br />--> Processing Dependency: postgresql(x86-64) = 8.4.20-3.el6_6 for package: postgresql-server-8.4.20-3.el6_6.x86_64<br />--> Processing Dependency: postgresql-libs(x86-64) = 8.4.20-3.el6_6 for package: postgresql-server-8.4.20-3.el6_6.x86_64<br />--> Processing Dependency: libcrypto.so.10(libcrypto.so.10)(64bit) for package: postgresql-server-8.4.20-3.el6_6.x86_64<br />--> Processing Dependency: libssl.so.10(libssl.so.10)(64bit) for package: postgresql-server-8.4.20-3.el6_6.x86_64<br />--> Running transaction check<br />---> Package openssl.x86_64 0:1.0.0-27.el6_4.2 will be updated<br />--> Processing Dependency: openssl = 1.0.0-27.el6_4.2 for package: openssl-devel-1.0.0-27.el6_4.2.x86_64<br />---> Package openssl.x86_64 0:1.0.1e-42.el6 will be an update<br />---> Package postgresql.x86_64 0:8.4.13-1.el6_3 will be updated<br />--> Processing Dependency: postgresql(x86-64) = 8.4.13-1.el6_3 for package: postgresql-devel-8.4.13-1.el6_3.x86_64<br />---> Package postgresql.x86_64 0:8.4.20-3.el6_6 will be an update<br />---> Package postgresql-libs.x86_64 0:8.4.13-1.el6_3 will be updated<br />---> Package postgresql-libs.x86_64 0:8.4.20-3.el6_6 will be an update<br />--> Running transaction check<br />---> Package openssl-devel.x86_64 0:1.0.0-27.el6_4.2 will be updated<br />---> Package openssl-devel.x86_64 0:1.0.1e-42.el6 will be an update<br />---> Package postgresql-devel.x86_64 0:8.4.13-1.el6_3 will be updated<br />---> Package postgresql-devel.x86_64 0:8.4.20-3.el6_6 will be an update<br />--> Finished Dependency Resolution<br /><br />Dependencies Resolved<br /><br />===================================================================================================<br /> Package Arch Version Repository Size<br />===================================================================================================<br />Installing:<br /> postgresql-server x86_64 8.4.20-3.el6_6 ol6_latest 3.4 M<br />Updating for dependencies:<br /> openssl x86_64 1.0.1e-42.el6 ol6_latest 1.5 M<br /> openssl-devel x86_64 1.0.1e-42.el6 ol6_latest 1.2 M<br /> postgresql x86_64 8.4.20-3.el6_6 ol6_latest 2.6 M<br /> postgresql-devel x86_64 8.4.20-3.el6_6 ol6_latest 815 k<br /> postgresql-libs x86_64 8.4.20-3.el6_6 ol6_latest 201 k<br /><br />Transaction Summary<br />===================================================================================================<br />Install 1 Package(s)<br />Upgrade 5 Package(s) <br /> <br />Total download size: 9.7 M <br />Is this ok [y/N]: y <br />Downloading Packages: <br />(1/6): openssl-1.0.1e-42.el6.x86_64.rpm | 1.5 MB 00:07 <br />(2/6): openssl-devel-1.0.1e-42.el6.x86_64.rpm | 1.2 MB 00:02 <br />(3/6): postgresql-8.4.20-3.el6_6.x86_64.rpm | 2.6 MB 00:04 <br />(4/6): postgresql-devel-8.4.20-3.el6_6.x86_64.rpm | 815 kB 00:01 <br />(5/6): postgresql-libs-8.4.20-3.el6_6.x86_64.rpm | 201 kB 00:00 <br />(6/6): postgresql-server-8.4.20-3.el6_6.x86_64.rpm | 3.4 MB 00:02 <br />------------------------------------------------------------------------------------------------------<br />Total 420 kB/s | 9.7 MB 00:23 <br />Running rpm_check_debug<br />Running Transaction Test<br />Transaction Test Succeeded<br />Running Transaction<br />Warning: RPMDB altered outside of yum.<br />** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:<br />oxh-3.0.0-1.cdh5.0.0.x86_64 is a duplicate with oxh-3.0.0-1.cdh4.6.0.x86_64<br /> Updating : openssl-1.0.1e-42.el6.x86_64 1/11 <br /> Updating : postgresql-libs-8.4.20-3.el6_6.x86_64 2/11 <br /> Updating : postgresql-8.4.20-3.el6_6.x86_64 3/11 <br /> Updating : postgresql-devel-8.4.20-3.el6_6.x86_64 4/11 <br /> Installing : postgresql-server-8.4.20-3.el6_6.x86_64 5/11 <br /> Updating : openssl-devel-1.0.1e-42.el6.x86_64 6/11 <br /> Cleanup : openssl-devel-1.0.0-27.el6_4.2.x86_64 7/11 <br /> Cleanup : postgresql-devel-8.4.13-1.el6_3.x86_64 8/11 <br /> Cleanup : postgresql-8.4.13-1.el6_3.x86_64 9/11 <br /> Cleanup : postgresql-libs-8.4.13-1.el6_3.x86_64 10/11 <br /> Cleanup : openssl-1.0.0-27.el6_4.2.x86_64 11/11 <br /> Verifying : openssl-devel-1.0.1e-42.el6.x86_64 1/11 <br /> Verifying : postgresql-8.4.20-3.el6_6.x86_64 2/11 <br /> Verifying : postgresql-devel-8.4.20-3.el6_6.x86_64 3/11 <br /> Verifying : openssl-1.0.1e-42.el6.x86_64 4/11 <br /> Verifying : postgresql-libs-8.4.20-3.el6_6.x86_64 5/11 <br /> Verifying : postgresql-server-8.4.20-3.el6_6.x86_64 6/11 <br /> Verifying : postgresql-libs-8.4.13-1.el6_3.x86_64 7/11 <br /> Verifying : postgresql-devel-8.4.13-1.el6_3.x86_64 8/11 <br /> Verifying : openssl-1.0.0-27.el6_4.2.x86_64 9/11 <br /> Verifying : openssl-devel-1.0.0-27.el6_4.2.x86_64 10/11 <br /> Verifying : postgresql-8.4.13-1.el6_3.x86_64 11/11 <br /><br />Installed:<br /> postgresql-server.x86_64 0:8.4.20-3.el6_6 <br /><br />Dependency Updated:<br /> openssl.x86_64 0:1.0.1e-42.el6 openssl-devel.x86_64 0:1.0.1e-42.el6 postgresql.x86_64 0:8.4.20-3.el6_6 postgresql-devel.x86_64 0:8.4.20-3.el6_6<br /> postgresql-libs.x86_64 0:8.4.20-3.el6_6<br /><br />Complete!<br />[root@bigdatalite yum.repos.d]# </blockquote>
<br />
<br />
<br />
<br />
<br />Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-83348995196608475882014-07-18T11:04:00.001-03:002014-07-18T11:04:15.500-03:00Muchos eventos Oracle en el surBuenas, retomo después de una pausa forzada por varios cambios (nueva casa, trabajo y niños que arrancan liceo), con varios tips técnicos para compartir en breve, y para recordarles los eventos que se vienen en la región en breve.<br />
<br />
El Oracle Technology Network Tour Latin América (más conocido como OTN Tour) arranca el 2 de agosto en San Pablo, visita 12 países, y llega a Montevideo el 14 y 15 de Agosto. Todos los detalles de estos eventos <a href="http://www.oracle.com/technetwork/es/community/user-groups/otn-latinoamerica-tour-2014-2213115-esa.html">en el sitio de Oracle</a>.<br />
<br />
Estos eventos son realizados gracias al esfuerzo de los <a href="http://www.laouc.net/quienes-somos.html">grupos de usuarios de Latinoamérica</a>, con apoyo de OTN y sponsors locales para solventar los gastos, y no sería posible sin el trabajo honorario de mucha gente que dedicas muchas horas de su tiempo personal a que esto sea posible.<br />
<br />
Así que si trabajan con Oracle o les interesa aprender, tómense un día libre y acérquense. Van a aprender en un solo día muchísimo, y a diferencia del <a href="https://blogs.oracle.com/otn/entry/virtual_technology_summit_series">muy buen evento virtual que organizó OTN</a> hace un par de semanas, van a poder interactuar en persona con reconocidos expertos, conocerlos de cerca, además conocer a otros profesionales con inquietudes similares, y quedar en contacto con grandes personas.<br />
<br />
Como no puedo evitarlo, tengo que pedirles que si andan por Montevideo se arrimen a <a href="http://www.uyoug.org.uy/">nuestro evento</a>, y si tienen ganas de hablar de Bases de datos después, invito la cerveza.<br />
<br />
Un saludo.Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-91709692872231127142014-03-30T10:30:00.000-03:002014-04-01T17:32:56.289-03:00Consultas para ver atributos de tablas e índices particionadosEste post es para compartir un par de consultas que uso muy seguido y quiero dejar a mano en el blog, ya que no tengo un área de scripts.<br />
<br />
Si usamos habitualmente la línea de comando para administrar una base de datos, tenemos a mano muchos scripts SQL para distintas tareas. Para consultas simples no es tan necesario, como por ejemplo ver los índices de una tabla. Pero cuando trabajamos con tablas particionadas, lleva un poco más volver a escribir esa consulta que nos muestra todos los datos que nos interesa. Tener a mano el script SQL es útil para ahorrarnos escribirlo de nuevo cada vez.<br />
<br />
Actualmente hay muchas herramientas gráficas/web de administración que nos hace dejar de lado usar este tipo de scripts para consultar metadata de la base de datos. Usar scripts también puede ser un hábito adquirido con el tiempo (señal del paso del tiempo :)), aunque hay casos en que es necesario. Uno de ellos es cuando hay firewalls o medidas de seguridad que solo permiten acceso a la base de datos mediante una terminal. Aunque los firewalls se puedan esquivar usando <a href="http://www.linuxjournal.com/content/ssh-tunneling-poor-techies-vpn">túneles con ssh</a> para utilitarios cliente/servidor (como <a href="http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index-097090.html">SQL Developer</a> o <a href="http://www.mysql.com/products/workbench/">MySQL Workbench</a>), para utilitarios que publican un acceso web es más complicado (Grid Control), y ahí vuelven a tener sentido los scripts.<br />
<br />
Así que hecha la introducción, estos son un par de scripts útiles para ver información de una tabla particionada y sus índices. Cuando no hay particiones, estos datos se pueden sacar con una consulta simple sobre <a href="http://docs.oracle.com/cd/E11882_01/server.112/e40402/statviews_2117.htm#REFRN20286">DBA_TABLES</a> y <a href="http://docs.oracle.com/cd/E18283_01/server.112/e17110/statviews_1100.htm#i1577532">DBA_IND_COLUMNS</a> sin mucha complicación.<br />
<br />
Para ilustrarlo mejor, un ejemplo usando estas tablas:<br />
<pre><blockquote>
select table_name, num_rows
from dba_tables
where table_name like 'BIGTBL%';
TABLE_NAME NUM_ROWS
------------------------------ ----------
BIGTBL_PART_FACT 34718511
BIGTBL_PART_ID 41529989
BIGTBL 5931843
3 rows selected.
</blockquote>
</pre>
<br />
Así vemos por separado sus particiones:<br />
<pre><blockquote>
break on t.table_NAME on t.partitioning_type on t.partition_count on t.status
select t.table_NAME, t.partitioning_type tipo, t.partition_count particiones, t.status, c.COLUMN_NAME, c.COLUMN_POSITION
from DBA_PART_KEY_COLUMNS c, dbA_part_tables t
where t.table_name = c.name
and c.owner = t.owner
and t.table_name like 'BIGTBL%'
order by c.name, c.COLUMN_POSITION;
TABLE_NAME TIPO PARTICIONES STATUS COLUMN_NAME COLUMN_POSITION
------------------------------ --------- ----------- -------- -------------------- ---------------
BIGTBL_PART_FACT RANGE 50 VALID NRO_FACT 1
BIGTBL_PART_ID RANGE 50 VALID ID 1
2 rows selected.
</blockquote>
</pre>
<br />
Juntamos ambas consultas en una sola:<br />
<pre><blockquote>
col part_col for a30
select t.table_NAME, t.num_rows, p.partitioning_type particion, p.partition_count "#part", p.status,
c.COLUMN_NAME part_col, c.COLUMN_POSITION pos
from dbA_tables t, DBA_PART_KEY_COLUMNS c, dbA_part_tables p
where t.table_name = p.table_name(+) and t.owner=p.owner(+)
and t.table_name = c.name(+) and t.owner = c.owner(+)
and t.table_name like 'BIGTBL%'
order by t.table_name, c.COLUMN_POSITION;
TABLE_NAME NUM_ROWS PARTICION #part STATUS PART_COL POS
------------------------------ ---------- --------- ---------- -------- ------------------------------ ----------
BIGTBL_PART_FACT 34718511 RANGE 50 VALID NRO_FACT 1
BIGTBL_PART_ID 41529989 RANGE 50 VALID ID 1
BIGTBL 5931843
3 rows selected.
</blockquote>
</pre>
<br />
La misma idea aplicada a los índices nos lleva a esta consulta, para ver los índices, saber si están particionados y algún dato más:<br />
<pre><blockquote>
col index_name for a30
select c.index_name, uniqueness, i.partitioned, p.partitioning_type tipo, locality, c.column_name, column_position pos
from dba_ind_columns c, dba_indexes i, dba_part_indexes p
where i.index_name=c.index_name and c.index_owner=i.owner and c.table_name=i.table_name and c.table_owner=i.table_owner
and i.owner=p.owner(+) and i.index_name=p.index_name(+) and i.table_name=p.table_name(+)
and c.table_name='BIGTBL_PART_ID'
order by c.index_name, c.column_position;
INDEX_NAME UNIQUENES PAR TIPO LOCALI COLUMN_NAME POS
------------------------------ --------- --- --------- ------ -------------------- ----------
IDX_BIGTBL_PART_2 NONUNIQUE NO COD_DOC 1
IDX_BIGTBL_PART_2 NONUNIQUE NO COD_LOCAL 2
IDX_BIGTBL_PART_ID UNIQUE YES RANGE LOCAL NRO_FACT 1
3 rows selected.
</blockquote>
</pre>
<br />
Espero les sea útilNelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-72858994869706534512014-03-29T09:43:00.001-03:002014-03-29T09:43:21.600-03:00Preguntas y respuestas de la presentación sobre RAC<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Muchas gracias a todos los que me acompañaron en la <a href="http://databaseindex.blogspot.com/2014/03/presentacion-sobre-oracle-rac-este.html" rel="nofollow">presentación sobre Oracle RAC</a> hace unos días.</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Hubo varias preguntas al final, y algunos asistentes me pidieron que les enviara referencias. No tuve tiempo de tomar nota de quién hizo esas preguntas antes de que se cerrara la sesión, así que dejo acá las respuestas, que además sirven para ampliar el material usado en la presentación.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">
</span>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Transcribo las preguntas de memoria, así que espero que sean lo más parecido posible a la realidad. Y aprovecho a desarrollarlas un poco más.</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">¿Se necesita Oracle ASM con Oracle RAC 11g?</span></li>
</ul>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">ASM es la única alternativa si se usa la versión Standard Edition de Oracle.</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">En Enterprise Edition se permiten alternativas (documentadas en la matriz de certificación en el sitio de </span><a href="http://support.oracle.com/" style="font-family: Arial, Helvetica, sans-serif;">soporte</a><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">), aunque Oracle ASM es la recomendada </span><a href="http://docs.oracle.com/cd/E11882_01/install.112/e41961/storage.htm#CWLIN261" style="font-family: Arial, Helvetica, sans-serif;">para la base de datos</a><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> y los archivos </span><a href="http://docs.oracle.com/cd/E11882_01/rac.112/e41959/votocr.htm#CWADD92368" style="font-family: Arial, Helvetica, sans-serif;">OCR y voting disk</a><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> usados por clusterware. Este es justamente uno de los puntos fuertes a favor de usar RAC, contar con soporte de todos los componentes de la infraestructura por parte del mismo proveedor, lo que da cierta garantía sobre la integración de las partes y se minimiza el tiempo de resolución de incidentes.</span><br />
<div>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Un buen ejemplo de que siempre es necesario consultar la documentación es que HP Serviceguard Storage Management Suite no aparece soportado en 12.1 y sí lo estaba en 11.2 (junto a otros productos).</span><br />
<br />
<br />
<ul>
<li><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">¿Recomendaciones para hacer upgrade de RAC 10g a RAC 11g?</span></li>
</ul>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Este es un tema que tiene varios puntas. </span><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">La mejor recomendación podría ser <a href="http://docs.oracle.com/cd/E11882_01/install.112/e41961/procstop.htm#CWLIN417">estudiar la documentación</a>, y en particular el <a href="https://blogs.oracle.com/UPGRADE/">Blog de Upgrade de Oracle</a>, que tiene todo lo que nos puede interesar sobre upgrades. </span><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Este es el </span><a href="http://apex.oracle.com/pls/apex/f?p=202202:2:::::P2_SUCHWORT:migrate112" style="font-family: Arial, Helvetica, sans-serif;">link al workshop de Upgrade</a><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">. También</span><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"> el sitio de soporte tiene mucha información sobre el tema, y la más completa es "<i><b>Upgrade Advisor: Database from 10.2 to 11.2 (Doc ID 251.1)</b></i>" que incluye muchas referencas a todas las etapas de un proyecto de upgrade.</span><br />
<br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Si el upgrade incluye usar nuevo hardware, se puede realizar la instalación con tranquilidad sobre el hardware nuevo para luego evaluar estrategias para replicar datos sin afectar el sistema de producción. Más adelante se aclaró que el upgrade sería sobre el mismo hardware, lo que plantea desafíos adicionales:</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">- se debe validar que la versión del Sistema operativo (SO) permita realizar un upgrade a la nueva versión (hay años de diferencia entre las versiones, y si bien se certifican nuevas versiones de la base de datos con versiones viejas del SO, normalmente requiere parches en el SO que pueden no estar instalados). Si se requieren parches, se agrega complejidad al proceso y posiblemente una ventana adicional de indisponibilidad.</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">- al trabajar sobre los mismos servidores que soportan un sistema en producción, se debe buscar un procedimiento que minimice el impacto en la disponiblidad del sistema. Por ejemplo, dependiendo de la cantidad de servidores que tenga el cluster, se podría ir quitando de a un servidor y hacer la actualización mientras el resto sigue funcionando (método conocido como rolling upgrade). Un punto importante es que <a href="https://www.blogger.com/(http://docs.oracle.com/cd/E11882_01/server.112/e18951/asminst.htm#OSTMG02400">ASM permite rolling upgrades a partir de 11g</a>, por lo que se debe planificar un tiempo de indisponiblidad para realizar esta actualización desde 10g cuando se llegue al último servidor.</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Por culminar, algo obvio pero que no está de mas recordarlo: este tipo de trabajo requiere mucha validación previa, por lo que es imprescindible contar con un ambiente de prueba donde realizar el procedimiento de upgrade completo, y se puedan realizar ajustes y automatizar todo lo posible previo a su ejecución en producción.</span><br />
<br class="Apple-interchange-newline" />
<br />
<ul>
<li><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">¿Cómo identificar índices que no se usan?</span></li>
</ul>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Esta pregunta tiene que ver con la recomendación de evitar la generación de redo innecesario por tener muchos índices que no se usan.</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">La respuesta obvia podría ser habilitar la funcionalidad de <a href="http://docs.oracle.com/cd/B10501_01/server.920/a96521/indexes.htm#7023">monitoreo de índices</a>, disponible desde 9i. </span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Aunque esta solución es muy simple, no es la mejor porque puede detectar casos que no nos interesan, ya que no registra la frecuencia con que fueron usados. Por ejemplo, un proceso agendado que ejecute por la noche y no tenga impacto en el uso del sistema puede ser el único que use un índice.</span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">Otro aspecto importante para buscar oportunidades de reducir la generación de redo es eliminar índices redundantes, cosa que no tiene mucho que ver con esta detección índices usados.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;">En los <a href="http://forums.oracle.com/">foros de OTN</a> hay varias preguntas similares, y <a href="https://community.oracle.com/thread/2160267?tstart=0">esta es un buen ejemplo</a> con </span><span style="color: #222222;">varias respuestas que incluyen todos estos detalles.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color: #222222;">Otro enfoque para identificar el uso de índices junto a la frecuencia con que son usados es aprovechar los datos capturados por </span><span style="color: #222222;"><a href="http://docs.oracle.com/cd/E11882_01/server.112/e16638/autostat.htm#PFGRF02601">AWR</a>, si tenemos la versión Oracle Enterprise Edition y la licencia del <a href="http://docs.oracle.com/cd/E24628_01/license.121/e24474/ch2_db_mgmt.htm">Diagnostic Pack</a>. Esto es algo bastante comentado en la comunidad, y por ejemplo en este <a href="http://damir-vadas.blogspot.com/2010/11/how-to-see-index-usage-without-alter.html">muy completo post</a> se pueden ver scripts y ejemplos de como obtener esta información.</span></span><br />
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif;"><br /></span>
<br />
<ul>
<li><span style="color: #222222; font-family: Arial, Helvetica, sans-serif;">¿ASM puede saturar los discos?</span></li>
</ul>
<div style="color: #222222;">
<span style="font-family: Arial, Helvetica, sans-serif;">ASM es el intermediario para gestionar los discos, pero el acceso a los bloques en disco lo hace el proceso de usuario que lo necesita (y los procesos de la base para escribir). Entonces no hay overhead en el acceso a disco asociado al uso de ASM.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">El rendimiento de los discos va a ser el mismo que se pueda obtener por fuera de ASM, con acceso directo desde el sistema operativo (SO). Una buena nota de soporte que intenta aclarar esto es "<i><b>Comparing ASM to Filesystem in benchmarks (Doc ID 1153664.1)</b></i>".</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Cualquier problema en la configuración que los hace visibles al SO y que pueda impactar en su rendimiento se va a extender a cualquier programa que los use. Esto incluye la conectividad al storage y la redundancia (multipath). Un ejemplo análogo es el uso de raid, donde es posible ver configuraciones que no logran la mejor performance, y cualquier filesystem que utilice estos discos va a sufrir su impacto.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Otra interpretación de la pregunta puede ser apuntando a las tareas internas que ejecuta ASM para garantizar la redundancia configurada. Hay operaciones internas de <a href="http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmcon.htm#CJHGGECE">rebalanceo</a> cuando cambia la cantidad de discos disponibles en los disk groups. Cuando ésta ejecuta se agrega actividad sobre la que ya existe en los discos, y se puede controlar su impacto en la performance con el parámetro <a href="http://docs.oracle.com/cd/E18283_01/server.112/e17110/initparams012.htm">ASM_POWER_LIMIT</a>. El avance de estas operaciones se puede seguir en la vista <a href="http://docs.oracle.com/cd/E18283_01/server.112/e17110/dynviews_1031.htm">GV$ASM_OPERATION</a>. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Espero que les sea útil.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">Un saludo.</span></div>
</div>
Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-15582889159217431732014-03-10T16:29:00.000-03:002014-03-10T16:29:04.025-03:00Presentación sobre Oracle RAC este miércolesEl grupo de interés sobre <a href="http://www.oracleracsig.org/">Oracle Real Application Clusters (RACSIG)</a> desde hace años comparte valiosa información técnica en su sitio web, y organiza presentaciones que se pueden seguir en vivo por internet (webinar o webcast). Es una organización similar a un grupo de usuarios, pero no limitado a un país, sino de alcance global. <div>
<br /></div>
<div>
Fui invitado a dar una presentación en español, para inaugurar el contenido de habla hispana, y será este miércoles 12 de marzo a las 13:00 hs de Uruguay (GMT-3). Los detalles <a href="http://www.oracleracsig.org/pls/apex/f?p=105:200:1396652832030201">aquí.</a></div>
<div>
<div>
Para seguir la presentación en vivo, se deben registrar previamente en el sitio, que los llevará a este <a href="http://goo.gl/MBlTnL">link</a>.</div>
</div>
<div>
<br /></div>
<div>
Esta es una versión actualizada con funcionalidades de las últimas versiones (11g/12c) a la presentación que dí durante el OTN Tour 2011 en Montevideo, <i>Oracle RAC sin sorpresas</i>, donde se repasa lo que implica usar Oracle RAC, los desafíos y recomendaciones de cómo sacarle mejor provecho. </div>
<div>
Este enfoque introductorio intenta facilitar el camino a los técnicos que están evaluando o comenzado a utilizar Oracle RAC, tarea que tiene una larga curva de aprendizaje.</div>
<div>
<br /></div>
<div>
Los espero.</div>
<div>
<br /></div>
<div>
Un saludo.</div>
<div>
<div>
<br /></div>
</div>
Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-39616459831105443202014-02-26T15:52:00.000-02:002014-02-26T15:52:48.677-02:00Analizando sentencias con SQL Profile activo en OracleSi queremos analizar la performance de una sentencia SQL que tiene un <a href="http://docs.oracle.com/cd/E16655_01/server.121/e15858/tgsql_profiles.htm#TGSQL596">SQL profile</a> habilitado (Oracle 10g o posterior) sin afectar al resto de los usuarios del sistema, ¿cómo hacemos para ver el plan de ejecución original de la sentencia si no se usara el SQL profile?.<br />
Asumiendo que lo vamos a hacer un tiempo después de tener el SQL profile activo y por lo tanto no está presente en la SGA (V$SQL) ni en el repositorio de AWR.<br />
<div>
<div>
<br /></div>
<div>
No es necesario deshabilitar ni borrar el SQL profile existente, se puede cambiar el parámetro <span style="background-color: white; color: #222222; font-family: arial; font-size: x-small;"><a href="http://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams207.htm">SQLTUNE_CATEGORY</a> </span>a nivel de sesión para que no se use el SQL profile activo:</div>
<div>
<pre><blockquote>
SQL> <b>alter session set sqltune_category='OTRA';</b>
</blockquote>
</pre>
Los SQL profile se crean en una categoría (por defecto 'default'), y se usan si la categoría de la sesión (este parámetro) coincide con la del SQL profile creado. Para ver el plan de ejecución original de la sentencia sin usar el SQL profile activo, alcanza con asignar un string cualquiera a la categoría de la sesión actual.</div>
<div>
<br />
A continuación vemos un ejemplo completo de este comportamiento, incluyendo la creación de un SQL profile sobre una sentencia para forzar el uso de un índice, y luego cambiar este parámetro para ver el plan original, usando Oracle Enterprise Edition 11.2.0.2.<br />
<br />
Uso el script <i>coe_xfr_sql_profile.sql</i> provisto por Oracle en el utilitario SQLT (ver nota de soporte 215187.1) para crear un SQL profile a partir de los hints de una sentencia previamente ejecutada. Esta es la forma más simple de crear un SQL profile para ilustrar con un ejemplo reproducible el cambio de parámetro, aunque el caso queda un tanto artificial. Hay mucha documentación sobre las formas de <a href="http://docs.oracle.com/cd/E11882_01/server.112/e16638/sql_tune.htm#PFGRF02605">crear SQL Profiles</a>, pero no es el foco de este post.<br />
De todas formas, este procedimiento es muy útil para troubleshooting de performance, por lo que es interesante tenerlo presente, aunque en este caso solo sea para ilustrar.<br />
<br />
Primero creo una tabla, un índice, y ejecuto una consulta que lo usa:<br />
<pre><blockquote>
oracle@oraculo:~> <b>sqlplus / as sysdba</b>
SQL*Plus: Release 11.2.0.2.0 Production on Mié Feb 26 14:55:15 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters and Automatic Storage Management options
14:56:08 SQL> <b>alter session set current_schema=PRU;</b>
Session altered.
14:56:46 SQL> <b>create table pp(n number, c varchar2(100));</b>
Table created.
14:57:03 SQL> <b>insert into pp select rownum, object_id from dba_objects where rownum < 100;</b>
99 rows created.
14:57:33 SQL> <b>create index pp_idx on pp(n);</b>
Index created.
14:57:52 SQL> <b>select * from pp where n=1;</b>
N C
---------- ---------------------------------------------------------------------------------
1 28
14:59:17 SQL> <b>select * from table(dbms_xplan.display_cursor);</b>
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------
SQL_ID 86svufrd72xqg, child number 0
-------------------------------------
select * from pp where n=1
Plan hash value: 2830885032
--------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 1 (100)| |
| 1 | TABLE ACCESS BY INDEX ROWID| PP | 1 | 65 | 1 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | PP_IDX | 1 | | 1 (0)| 00:00:01 |
--------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("N"=1)
Note
-----
- dynamic sampling used for this statement (level=2)
23 rows selected.
</blockquote>
</pre>
Ya tenemos nuestra tabla PP con un índice sobre la columna N, y la consulta que lo usa.<br />
Ahora creamos otra consulta que hace un full scan sobre la tabla, y es a la que luego vamos a asignarle un SQL profile para que use el índice:
<br />
<pre><blockquote>
14:59:22 SQL> <b>select /*+ full(pp)*/ * from pp where n=1;</b>
N C
---------- -----------------------------------------------------------------------------------
1 28
14:59:37 SQL> <b>select * from table(dbms_xplan.display_cursor);</b>
PLAN_TABLE_OUTPUT
----------------------------------------------------------------------------------------------
SQL_ID btpjqgv0u0stb, child number 0
-------------------------------------
select /*+ full(pp)*/ * from pp where n=1
Plan hash value: 2338859486
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 3 (100)| |
|* 1 | TABLE ACCESS FULL| PP | 1 | 65 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("N"=1)
Note
-----
- dynamic sampling used for this statement (level=2)
22 rows selected.
15:02:10 SQL> <b>col sql_text for a45</b>
15:02:10 SQL> <b>select sql_id, plan_hash_value, executions, sql_text
from v$sql
where sql_id in ('btpjqgv0u0stb','86svufrd72xqg');</b>
SQL_ID PLAN_HASH_VALUE EXECUTIONS SQL_TEXT
------------- --------------- ---------- ---------------------------------------------
btpjqgv0u0stb 2338859486 1 select /*+ full(pp)*/ * from pp where n=1
86svufrd72xqg 2830885032 1 select * from pp where n=1
</blockquote>
</pre>
Vemos los SQL_ID de ambas consultas, junto con el plan de ejecución usado.<br />
Ahora usamos el script <span style="font-family: monospace; white-space: pre;">coe_xfr_sql_profile.sql</span> para crear un SQL profile a la consulta lenta (<span style="font-family: monospace; white-space: pre;">btpjqgv0u0stb</span>) y que use el plan de la otra (<span style="font-family: monospace; white-space: pre;">2830885032</span>). Estos son los parámetros que se le deben ingresar al script:
<br />
<pre><blockquote>
SQL> <b>sta coe_xfr_sql_profile.sql</b>
Parameter 1:
SQL_ID (required)
Enter value for 1: <b>btpjqgv0u0stb</b>
PLAN_HASH_VALUE AVG_ET_SECS
--------------- -----------
2338859486 ,004
Parameter 2:
PLAN_HASH_VALUE (required)
Enter value for 2: <b>2830885032</b>
Values passed to coe_xfr_sql_profile:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SQL_ID : "btpjqgv0u0stb"
PLAN_HASH_VALUE: "2830885032"
SQL>BEGIN
2 IF :sql_text IS NULL THEN
3 RAISE_APPLICATION_ERROR(-20100, 'SQL_TEXT for SQL_ID &&sql_id. was not found in memory (gv$sqltext_with_newlines) or AWR (dba_hist_sqltext).');
4 END IF;
5 END;
6 /
SQL>SET TERM OFF;
SQL>BEGIN
2 IF :other_xml IS NULL THEN
3 RAISE_APPLICATION_ERROR(-20101, 'PLAN for SQL_ID &&sql_id. and PHV &&plan_hash_value. was not found in memory (gv$sql_plan) or AWR (dba_hist_sql_plan).');
4 END IF;
5 END;
6 /
SQL>SET TERM OFF;
Execute coe_xfr_sql_profile_btpjqgv0u0stb_2830885032.sql
on TARGET system in order to create a custom SQL Profile
with plan 2830885032 linked to adjusted sql_text.
COE_XFR_SQL_PROFILE completed.
</blockquote>
</pre>
Vemos que se ejecutó de forma exitosa, así que nos generó un script que crea el SQL profile.<br />
Lo ejecutamos:
<br />
<pre><blockquote>
SQL> <b>sta coe_xfr_sql_profile_btpjqgv0u0stb_2830885032.sql</b>
SQL> REM
SQL> REM $Header: 215187.1 coe_xfr_sql_profile_btpjqgv0u0stb_2830885032.sql 11.4.4.4 2014/02/26 carlos.sierra $
SQL> REM
SQL> REM Copyright (c) 2000-2012, Oracle Corporation. All rights reserved.
SQL> REM
SQL> REM AUTHOR
SQL> REM carlos.sierra@oracle.com
SQL> REM
SQL> REM SCRIPT
SQL> REM coe_xfr_sql_profile_btpjqgv0u0stb_2830885032.sql
SQL> REM
SQL> REM DESCRIPTION
SQL> REM This script is generated by coe_xfr_sql_profile.sql
SQL> REM It contains the SQL*Plus commands to create a custom
SQL> REM SQL Profile for SQL_ID btpjqgv0u0stb based on plan hash
SQL> REM value 2830885032.
SQL> REM The custom SQL Profile to be created by this script
SQL> REM will affect plans for SQL commands with signature
SQL> REM matching the one for SQL Text below.
SQL> REM Review SQL Text and adjust accordingly.
SQL> REM
SQL> REM PARAMETERS
SQL> REM None.
SQL> REM
SQL> REM EXAMPLE
SQL> REM SQL> START coe_xfr_sql_profile_btpjqgv0u0stb_2830885032.sql;
SQL> REM
SQL> REM NOTES
SQL> REM 1. Should be run as SYSTEM or SYSDBA.
SQL> REM 2. User must have CREATE ANY SQL PROFILE privilege.
SQL> REM 3. SOURCE and TARGET systems can be the same or similar.
SQL> REM 4. To drop this custom SQL Profile after it has been created:
SQL> REM EXEC DBMS_SQLTUNE.DROP_SQL_PROFILE('coe_btpjqgv0u0stb_2830885032');
SQL> REM 5. Be aware that using DBMS_SQLTUNE requires a license
SQL> REM for the Oracle Tuning Pack.
SQL> REM 6. If you modified a SQL putting Hints in order to produce a desired
SQL> REM Plan, you can remove the artifical Hints from SQL Text pieces below.
SQL> REM By doing so you can create a custom SQL Profile for the original
SQL> REM SQL but with the Plan captured from the modified SQL (with Hints).
SQL> REM
SQL> WHENEVER SQLERROR EXIT SQL.SQLCODE;
SQL> REM
SQL> VAR signature NUMBER;
SQL> VAR signaturef NUMBER;
SQL> REM
SQL> DECLARE
2 sql_txt CLOB;
3 h SYS.SQLPROF_ATTR;
4 PROCEDURE wa (p_line IN VARCHAR2) IS
5 BEGIN
6 DBMS_LOB.WRITEAPPEND(sql_txt, LENGTH(p_line), p_line);
7 END wa;
8 BEGIN
9 DBMS_LOB.CREATETEMPORARY(sql_txt, TRUE);
10 DBMS_LOB.OPEN(sql_txt, DBMS_LOB.LOB_READWRITE);
11 -- SQL Text pieces below do not have to be of same length.
12 -- So if you edit SQL Text (i.e. removing temporary Hints),
13 -- there is no need to edit or re-align unmodified pieces.
14 wa(q'[select /*+ full(pp)*/ * from pp where n=1]');
15 DBMS_LOB.CLOSE(sql_txt);
16 h := SYS.SQLPROF_ATTR(
17 q'[BEGIN_OUTLINE_DATA]',
18 q'[IGNORE_OPTIM_EMBEDDED_HINTS]',
19 q'[OPTIMIZER_FEATURES_ENABLE('11.2.0.2')]',
20 q'[DB_VERSION('11.2.0.2')]',
21 q'[OPT_PARAM('optimizer_index_cost_adj' 1)]',
22 q'[OPT_PARAM('optimizer_index_caching' 100)]',
23 q'[ALL_ROWS]',
24 q'[OUTLINE_LEAF(@"SEL$1")]',
25 q'[INDEX_RS_ASC(@"SEL$1" "PP"@"SEL$1" ("PP"."N"))]',
26 q'[END_OUTLINE_DATA]');
27 :signature := DBMS_SQLTUNE.SQLTEXT_TO_SIGNATURE(sql_txt);
28 :signaturef := DBMS_SQLTUNE.SQLTEXT_TO_SIGNATURE(sql_txt, TRUE);
29 DBMS_SQLTUNE.IMPORT_SQL_PROFILE (
30 sql_text => sql_txt,
31 profile => h,
32 name => 'coe_btpjqgv0u0stb_2830885032',
33 description => 'coe btpjqgv0u0stb 2830885032 '||:signature||' '||:signaturef||'',
34 category => 'DEFAULT',
35 validate => TRUE,
36 replace => TRUE,
37 force_match => FALSE /* TRUE:FORCE (match even when different literals in SQL). FALSE:EXACT (similar to CURSOR_SHARING) */ );
38 DBMS_LOB.FREETEMPORARY(sql_txt);
39 END;
40 /
PL/SQL procedure successfully completed.
SQL> WHENEVER SQLERROR CONTINUE
SQL> SET ECHO OFF;
SIGNATURE
---------------------
613978514929328923
SIGNATUREF
---------------------
16370312570377067161
... manual custom SQL Profile has been created
COE_XFR_SQL_PROFILE_btpjqgv0u0stb_2830885032 completed
</blockquote>
</pre>
El SQL profile se creó, así que validamos si la consulta que antes hacía un acceso full sobre la tabla ahora toma el índice:<br />
<pre><blockquote>
15:14:08 SQL> <b>select /*+ full(pp)*/ * from pp where n=1;</b>
N C
---------- ---------------------------------------------------------------------
1 28
15:14:09 SQL> <b>select * from table(dbms_xplan.display_cursor);</b>
PLAN_TABLE_OUTPUT
---------------------------------------------------------------------------------------------
SQL_ID btpjqgv0u0stb, child number 1
-------------------------------------
select /*+ full(pp)*/ * from pp where n=1
Plan hash value: 2830885032
--------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 1 (100)| |
| 1 | TABLE ACCESS BY INDEX ROWID| PP | 1 | 65 | 1 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | PP_IDX | 1 | | 1 (0)| 00:00:01 |
--------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("N"=1)
Note
-----
- SQL profile coe_btpjqgv0u0stb_2830885032 used for this statement
23 rows selected.
15:14:50 SQL> <b>select category, status</b>
15:15:04 2 <b>from dba_sql_profiles</b>
15:15:09 3 <b>where name='coe_btpjqgv0u0stb_2830885032';</b>
CATEGORY STATUS
------------------------------ --------
DEFAULT ENABLED
</blockquote>
</pre>
Perfecto, el SQL profile está haciendo lo que esperamos y está activo.<br />
Recién ahora estamos en la situación que me interesaba mostrar: ¿cómo hacemos para ver el plan de ejecución original de esta sentencia?. Uso el string <i>OTRA</i>, pero podría ser cualquier string distinto de <i>DEFAULT</i>:<br />
<pre><blockquote>
15:15:50 SQL> <b>alter session set sqltune_category='OTRA';</b>
Session altered.
15:16:02 SQL> <b>select /*+ full(pp)*/ * from pp where n=1;</b>
N C
---------- ---------------------------------------------------------------------------------
1 28
15:16:12 SQL> <b>select * from table(dbms_xplan.display_cursor);
</b>
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------------------
SQL_ID btpjqgv0u0stb, child number 2
-------------------------------------
select /*+ full(pp)*/ * from pp where n=1
Plan hash value: 2338859486
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 3 (100)| |
|* 1 | TABLE ACCESS FULL| PP | 1 | 65 | 3 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("N"=1)
Note
-----
- dynamic sampling used for this statement (level=2)
22 rows selected.
</blockquote>
</pre>
Vemos que al ejecutar la sentencia se vuelve a comportar como antes, sin usar el SQL profile.
<br />
<br />
Espero les sea útil.<br />
<br /></div>
</div>
Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-48924379469037825782014-02-17T20:17:00.000-02:002014-02-18T12:43:02.314-02:00Oracle RAC 12c sobre Oracle VM y VirtualBox usando TemplatesOTN publicó hace unos días un hands-on lab <a href="http://www.oracle.com/technetwork/systems/hands-on-labs/deploy-rac-ovm-cluster-2101019.html"><i>How to Deploy a Four-Node Oracle RAC 12c Cluster in Minutes Using Oracle VM Templates</i></a>, basado en una sesión del Oracle Open World 2013. <br />
Es un artículo muy bueno, con todos los detalles para hacer la configuración e instalación, usando un equipo con 16gb de RAM para configurar 4 nodos virtuales con Oracle RAC 12c.<br /><br />
Pero sobre el final (y después de unas 3 hs de trabajo si se siguen las instrucciones) aclara: el objetivo del lab no es dejar corriendo el cluster porque no dan los recursos del servidor para hacerlo. Citando el texto original:<br />
<pre>"Note: The goal of this lab is to show how to create a four-node cluster using Oracle VM with Flex Cluster
and Oracle Flex ASM, not to actually run a four-node cluster. Because of the limited resources we have on the
x86 machine, the build for this four-node cluster will not finish. By comparison, a similar deployment on a
bare-metal/Oracle VM environment with adequate resources would take around 30 to 40 minutes."</pre>
<div>
<br /></div>
<div>
Ya no parece tan interesante.<br />
Pero con mínimos cambios se puede dejar corriendo un cluster de dos nodos. Ahora es más atractivo, aunque utiliza mucho hardware, pero es una buena alternativa por varios motivos:</div>
<div>
<ul>
<li>el tiempo que lleva de deploy es menor a otras alternativas.</li>
<li>para familiarizarse con el uso de Oracle VM, templates de OVM, y Oracle RAC sin tener que instalar OVM en un servidor de pruebas.</li>
</ul>
</div>
<div>
<br /></div>
<div>
Antes de contarles detalles sobre mi experiencia, un poco de background sobre las opciones para hacer deploys "rápidos" de máquinas virtuales con Oracle:</div>
<div>
<ul>
<li>Oracle RAC está soportado en producción sobre varias <a href="http://www.oracle.com/technetwork/database/virtualizationmatrix-172995.html">tecnologías de virtualización</a>, entre ellas Oracle VM (OVM), pero no VirtualBox. OVM Server se debe instalar en el equipo que se use para virutalizar, lo que lo deja fuera notebooks o instalaciones de test que tienen otros propósitos y no hay nadie que se haga cargo de su administración (es más complejo administrar un equipo que usa OVM Server para correr virtuales que uno que usa Linux + VirtualBox)</li>
</ul>
<ul>
<li>Oracle tiene imágenes de máquinas virtuales OVM preinstaladas con todo lo necesario (VM Templates) para distintos propósitos, entre ellos la base de datos con la opción de RAC, para <a href="http://www.oracle.com/technetwork/server-storage/vm/rac-092962.html">11g</a> y <a href="http://www.oracle.com/technetwork/server-storage/vm/database-templates-12c-11gr2-1972804.html">12c</a>. No hay templates para VirtualBox.</li>
</ul>
<ul>
<li>Hay forma de convertir las imágenes de OVM a Virtualbox, pero lleva un poco de trabajo. Si andan con tiempo, este es un muy buen artículo de cómo hacerlo, usando templates de 11.2: <a href="http://www.pythian.com/blog/1-hour-virtualbox-rac-cluster/">Build an 11gR2 RAC Cluster in VirtualBox in 1 Hour Using OVM Templates</a>. No probé usarlo con los nuevos templates de 12.1.</li>
</ul>
<ul>
<li>Siempre se puede crear desde cero las máquinas virtuales, instalar el sistema operativo, configurar storage, instalar Grid, Oracle y luego configurar todo. También hay guías muy buenas al respecto (como esta de <a href="http://www.oracle-base.com/articles/12c/oracle-db-12cr1-rac-installation-on-oracle-linux-6-using-virtualbox.php">Tim Hall - RAC 12c + OEL6 + virtualbox</a>), pero es una tarea que lleva bastante más tiempo que solamente seguir la guía del lab.</li>
</ul>
</div>
<div>
<br /></div>
<div>
Así que comparto mi experiencia usando un pc con AMD FX(tm)-8120 Eight-Core Processor de 1.4Ghz, 32Gb de RAM y openSUSE 12.3 x64</div>
<div>
<br />
<br />
<b>Primer intento</b><br />
<br /></div>
<div>
Siguiendo la guía al pie de la letra, el último paso que levanta las 4 VM de RAC falla con los siguientes mensajes, después de 4:45hs de haber comenzado el primer paso (sin contar el tiempo que lleva descargar los archivos que se necesitan).</div>
<div>
<pre><blockquote>
tail -f /u01/racovm/buildcluster.log
ERROR (node:rac2): Failed to run rootcrs.pl, status: 25
See log at: /u01/app/12.1.0/grid/cfgtoollogs/crsconfig/rootcrs_rac2_2014-02-15_11-32-40AM.log
2014-02-15 12:26:28:[girootcrslocal:Time :rac2] Completed with errors in 3230 seconds (0h:53m:50s), status: 25
INFO (node:rac0): All girootcrslocal operations completed on all (4) node(s) at: 12:27:22
2014-02-15 12:28:24:[girootcrs:Time :rac0] Completed with errors in 5497 seconds (1h:31m:37s), status: 3
2014-02-15 12:29:19:[creategrid:Time :rac0] Completed with errors in 5786 seconds (1h:36m:26s), status: 3
2014-02-15 12:29:43:[buildcluster:Time :rac0] Completed with errors in 6160 seconds (1h:42m:40s), status: 3
</blockquote>
</pre>
</div>
<div>
<br />
<b>Segundo intento</b><br />
<br /></div>
<div>
Antes de descartar el uso de las 4 VM probé cambiar la configuración en VirtualBox del OVM server para que use 6 CPU en vez de las 2 que trae configuradas por defecto.<br />
Usando la consola web de OVM Manager detuve las 4 VM, las borré y luego paré en VirtualBox OVM Server, cambié la configuración de CPUs, lo inicié y repetí los pasos desde el punto 11 (<a href="http://www.oracle.com/technetwork/systems/hands-on-labs/deploy-rac-ovm-cluster-2101019.html#11">Clone Four Virtual Machines from the Template</a>).</div>
<div>
<div>
<br /></div>
<div>
El resultado al levantar las VM fue el mismo: error. Aunque esta vez el servidor quedó bastante más cargado y casi no respondía</div>
</div>
<pre><blockquote>
tail -f /u01/racovm/buildcluster.log
...
ERROR (node:rac1): Failed to run rootcrs.pl, status: 25
See log at: /u01/app/12.1.0/grid/cfgtoollogs/crsconfig/rootcrs_rac1_2014-02-15_03-10-06PM.log
2014-02-15 16:17:24:[girootcrslocal:Time :rac1] Completed with errors in 4039 seconds (1h:07m:19s), status: 25
....
INFO (node:rac0): Waiting for all girootcrslocal operations to complete on all nodes (At 16:42:22, elapsed: 1h:28m:47s,
1 node(s) remaining, all background pid(s): 26984)...
</blockquote></pre>
<div>
<br /></div>
<div>
Y esta es la carga del nodo0:</div>
<pre><blockquote>
[root@rac0 ~]# uptime
18:32:08 up 4:11, 1 user, load average: 38.79, 36.94, 35.97
</blockquote></pre>
<div>
<br /></div>
</div>
<div>
<br /></div>
<div>
<b>Intento final con dos nodos</b><br />
<br /></div>
<div>
Ahora sí para levantar un RAC con 2 nodos solamente, borré otra vez las 4 VM creadas usando la consola web de OVM Manager, y repetí los pasos desde el punto 11 (<a href="http://www.oracle.com/technetwork/systems/hands-on-labs/deploy-rac-ovm-cluster-2101019.html#11">Clone Four Virtual Machines from the Template</a>).</div>
<div>
<br /></div>
En el paso donde se indica crear el archivo netconfig12cRAC<b>4</b>node.ini, creé uno de nombre <i>netconfig12cRAC<b>2</b>node.ini</i> y dejé la configuración de dos nodos solamente (rac0 y rac1).
El archivo <i>params12c.ini</i> no fue necesario crearlo nuevamente ni modificarlo.</div>
<div>
El comando final (<i>./deploycluster.py</i>) usa el archivo de parámetros de 2 nodos, y esta vez el resultado es exitoso:</div>
<div>
<br /></div>
<pre><blockquote>
[root@ovm-mgr deploycluster]# ./deploycluster.py -u admin -M rac.? -N utils/netconfig12cRAC2node.ini -P utils/params12c.ini
Oracle DB/RAC OneCommand (v2.0.3) for Oracle VM - deploy cluster - (c) 2011-2013 Oracle Corporation
(com: 28700:v2.0.2, lib: 180072:v2.0.3, var: 1500:v2.0.3) - v2.4.3 - ovm-mgr.oow.com (x86_64)
Invoked as root at Sun Feb 16 05:35:41 2014 (size: 45500, mtime: Tue Jul 30 16:55:37 2013)
Using: ./deploycluster.py -u admin -M rac.? -N utils/netconfig12cRAC2node.ini -P utils/params12c.ini
INFO: Login password to Oracle VM Manager not supplied on command line or environment (DEPLOYCLUSTER_MGR_PASSWORD), prompting...
Password:
INFO: Attempting to connect to Oracle VM Manager...
INFO: Oracle VM Client (3.2.4.524) protocol (1.9) CONNECTED (tcp) to
Oracle VM Manager (3.2.4.524) protocol (1.9) IP (192.168.56.3) UUID (0004fb0000010000285d60b0071f42ae)
INFO: Inspecting /SoftOracle/deploycluster/utils/netconfig12cRAC2node.ini for number of nodes defined....
INFO: Detected 2 nodes in: /SoftOracle/deploycluster/utils/netconfig12cRAC2node.ini
INFO: Located a total of (2) VMs;
2 VMs with a simple name of: ['rac.0', 'rac.1']
INFO: Detected (2) Hub nodes and (0) Leaf nodes in the Flex Cluster
INFO: Detected a RAC deployment...
INFO: Starting all (2) VMs...
INFO: VM with a simple name of "rac.0" (Hub node) is in a Stopped state, attempting to start it....OK.
INFO: VM with a simple name of "rac.1" (Hub node) is in a Stopped state, attempting to start it....OK.
INFO: Verifying that all (2) VMs are in Running state and pass prerequisite checks...
INFO: Detected Flex ASM enabled with a dedicated network adapter (eth2), all VMs will require a minimum of (3) Vnics...
..
INFO: Skipped checking memory of VMs due to DEPLOYCLUSTER_SKIP_VM_MEMORY_CHECK=yes
INFO: Detected that all (2) Hub node VMs specified on command line have (1) common shared disk between them (ASM_MIN_DISKS=1)
INFO: The (2) VMs passed basic sanity checks and in Running state, sending cluster details as follows:
netconfig.ini (Network setup): /SoftOracle/deploycluster/utils/netconfig12cRAC2node.ini
params.ini (Overall build options): /SoftOracle/deploycluster/utils/params12c.ini
buildcluster: yes
INFO: Starting to send configuration details to all (2) VM(s).....
INFO: Sending to VM with a simple name of "rac.0" (Hub node).................
INFO: Sending to VM with a simple name of "rac.1" (Hub node)......
INFO: Configuration details sent to (2) VMs...
Check log (default location /u01/racovm/buildcluster.log) on build VM (rac.0)...
INFO: deploycluster.py completed successfully at 05:36:49 in 67.7 seconds (0h:01m:07s)
Logfile at: /SoftOracle/deploycluster/deploycluster7.log
</blockquote></pre>
<div>
<br /></div>
<div>
<br /></div>
<div>
Y este es el log de la configuración exitosa de las VM:</div>
<pre><blockquote>
tail -f /u01/racovm/buildcluster.log
...
INFO (node:rac0): Running on: rac0 as oracle: export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1;
/u01/app/oracle/product/12.1.0/dbhome_1/bin/srvctl status database -d ORCL
Instance ORCL1 is running on node rac0
Instance ORCL2 is running on node rac1
INFO (node:rac0): Running on: rac0 as root: /u01/app/12.1.0/grid/bin/crsctl status resource -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE rac0 STABLE
ONLINE ONLINE rac1 STABLE
ora.DATA.dg
ONLINE ONLINE rac0 STABLE
ONLINE ONLINE rac1 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE rac0 STABLE
ONLINE ONLINE rac1 STABLE
ora.net1.network
ONLINE ONLINE rac0 STABLE
ONLINE ONLINE rac1 STABLE
ora.ons
ONLINE ONLINE rac0 STABLE
ONLINE ONLINE rac1 STABLE
ora.proxy_advm
ONLINE ONLINE rac0 STABLE
ONLINE ONLINE rac1 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac0 STABLE
ora.asm
1 ONLINE ONLINE rac0 STABLE
2 ONLINE ONLINE rac1 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 OFFLINE OFFLINE STABLE
ora.gns
1 ONLINE ONLINE rac0 STABLE
ora.gns.vip
1 ONLINE ONLINE rac0 STABLE
ora.oc4j
1 OFFLINE OFFLINE STABLE
ora.orcl.db
1 ONLINE ONLINE rac0 Open,STABLE
2 ONLINE ONLINE rac1 Open,STABLE
ora.rac0.vip
1 ONLINE ONLINE rac0 STABLE
ora.rac1.vip
1 ONLINE ONLINE rac1 STABLE
ora.scan1.vip
1 ONLINE ONLINE rac0 STABLE
--------------------------------------------------------------------------------
INFO (node:rac0): For an explanation on resources in OFFLINE state, see Note:1068835.1
2014-02-16 11:16:07:[clusterstate:Time :rac0] Completed successfully in 164 seconds (0h:02m:44s)
2014-02-16 11:16:13:[buildcluster:Done :rac0] Building 12c RAC Cluster
2014-02-16 11:16:16:[buildcluster:Time :rac0] Completed successfully in 9501 seconds (2h:38m:21s)
</blockquote></pre>
<div>
<br /></div>
</div>
<div>
<br /></div>
<div>
Finalmente, para validar que realmente está funcionando me conecto a una de las instancias del RAC:</div>
<pre><blockquote>
server:/archivos/oracle # ssh oracle@192.168.56.10
oracle@192.168.56.10's password:
[oracle@rac0 ~]$ echo $ORACLE_SID
ORCL1
[oracle@rac0 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Sun Feb 16 11:54:26 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> set lines 180 pages 180
SQL> col host_name for a10
SQL> select inst_id, version, instance_name, host_name, status
2 from gv$instance;
INST_ID VERSION INSTANCE_NAME HOST_NAME STATUS
---------- ----------------- ---------------- ---------- ------------
1 12.1.0.1.0 ORCL1 rac0 OPEN
2 12.1.0.1.0 ORCL2 rac1 OPEN
</blockquote></pre>
<div>
<br /></div>
<div>
Espero les sea útil.
<br /></div>Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-47666239931252139222014-01-26T19:03:00.000-02:002014-01-26T19:03:28.329-02:00Oracle SQL Developer 4.0 en OpenSuse y usando PostgreSQL!Ayer estuve probando la nueva versión del utilitario <a href="http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html" target="_blank">Oracle SQL Developer</a> que se liberó en diciembre (4.0.0.13), y entre muchas cosas nuevas (ver las <a href="https://www.blogger.com/%3Ca%20href=%22http://www.thatjeffsmith.com/archive/2013/12/oracle-sql-developer-v4-is-live-top-10-reasons-to-upgrade-today/%22%3E" target="_blank">10 razones para usarlo</a>, en inglés), encontré que se puede configurar una conexión a una base PostgreSQL, algo que me interesaba desde hace tiempo.<br />
<br />
Si bien PostgreSQL no está dentro de las <a href="https://www.blogger.com/%3Ca%20href=%22http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/sqldev-faq-2079922.html#11">" target="_blank">bases de terceros soportadas</a>, ahora funciona, aunque algunas operaciones dan error (como por ejemplo ver los índices de una tabla), y no tiene las mismas funcionalidades que el utilitario <a href="http://www.postgresql.org/docs/9.2/static/app-psql.html">nativo de PostgreSQL psql</a>.<br />
<br />
Pero es una buena señal, y con el tiempo se puede convertir en la herramienta necesaria para cualquier DBA que administra varios motores. En mi caso uso habitualmente Oracle, MySQL y PostgreSQL, y ocasionalmente SQL Server, todas administrables desde SQL Developer. Esperemos que en breve se tenga la funcionalidad completa sobre bases PostgreSQL.<br />
<br />
Para quienes les interese probarlo, les dejo el detalle de como instalarlo y hacerlo funcionar en OpenSuse 12.3 x64, conectando a una base PostgreSQL 9.2.4 que corre local (instalado del repositorio "openSUSE BuildService - Database").<br />
<br />
<br />
<b>1) Descargar software</b><br />
<ul>
<li>SQL Developer RPM para linux: <a href="http://download.oracle.com/otn/java/sqldeveloper/sqldeveloper-4.0.0.13.80-1.noarch.rpm">sqldeveloper-4.0.0.13.80-1.noarch.rpm</a></li>
<li>Java JDK 7: <a href="http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.rpm">jdk-7u51-linux-x64.rpm</a></li>
<li>driver JDBC 4.1 para Postgres 9.3: <a href="http://jdbc.postgresql.org/download/postgresql-9.3-1100.jdbc41.jar">postgresql-9.3-1100.jdbc41.jar</a></li>
</ul>
<br />
<br />
<b>2) Instalar</b><br />
<br />Dejé los archivos anteriores en el directorio <i>/local/soft/oracle</i>, y desde ahí lo instalé con root:<br />
<br />
<code>
oraculo:/local/soft/oracle # <b>rpm -Uvh sqldeveloper-4.0.0.13.80-1.noarch.rpm</b><br />
Preparing... ################################# [100%]<br />
Updating / installing...<br />
1:sqldeveloper-4.0.0.13.80-1 ################################# [ 50%]<br />
Cleaning up / removing...<br />
2:sqldeveloper-3.2.20.09.87-1 ################################# [100%]<br />
</code>
<br />
<br />
Si se trata de usar SQL Developer sin instalar la JDK 1.7, da este error:<br />
<br />
<code>
ncalero@oraculo:> <b>sqldeveloper </b><br />
<br />
Oracle SQL Developer<br />
Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.<br />
</code>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkTsqyrcI4B2LBX3S_HPtBCGvxlRAKCusW4NCwq8FgHMUH_srLKM7oDEigA3j2LvxIKbZwjqo1sXoF-5xzDogDFVtfv-yBsckA1rcKpB9Olb0B_GaDOmqBPAKnNFGeYAk2w3lKl-zS1z8/s1600/sqldev-error-java.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkTsqyrcI4B2LBX3S_HPtBCGvxlRAKCusW4NCwq8FgHMUH_srLKM7oDEigA3j2LvxIKbZwjqo1sXoF-5xzDogDFVtfv-yBsckA1rcKpB9Olb0B_GaDOmqBPAKnNFGeYAk2w3lKl-zS1z8/s1600/sqldev-error-java.png" height="207" width="400" /></a></div>
<br />
<br />
Esto es porque OpenSuse incluye OpenJDK 1.7, que trae solo JRE (openjdk-1.7.0.6-8.28.3.x86_64):<br />
<br />
<code>
oraculo:~ # <b>rpm -qa | grep -i jdk</b><br />
java-1_7_0-openjdk-1.7.0.6-8.28.3.x86_64<br />
<br />
oraculo:~ # <b>rpm -ql java-1_7_0-openjdk-1.7.0.6-8.28.3.x86_64</b><br />
/usr/lib64/jvm-exports/java-1.7.0-openjdk<br />
/usr/lib64/jvm-exports/java-1.7.0-openjdk-1.7.0<br />
...<br />
/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre<br />
...<br />
<br />
oraculo:~ # <b>/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/bin/java -version</b><br />
java version "1.7.0_45"<br />
OpenJDK Runtime Environment (IcedTea 2.4.3) (suse-8.28.3-x86_64)<br />
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)<br />
</code>
<br />
<br />
Así que se debe instalar la JDK 1.7:<br />
<br />
<code>
oraculo:/local/soft/oracle #<b> rpm -Uvh jdk-7u51-linux-x64.rpm</b><br />
Preparing... ################################# [100%]<br />
Updating / installing...<br />
1:jdk-2000:1.7.0_51-fcs ################################# [100%]<br />
Unpacking JAR files...<br />
rt.jar...<br />
jsse.jar...<br />
charsets.jar...<br />
tools.jar...<br />
localedata.jar...<br />
jfxrt.jar...<br />
</code>
<br />
<br />
Podemos validar donde quedó instalado:<br />
<br />
<code>
oraculo:/local/soft/oracle # <b>rpm -ql jdk-2000:1.7.0_51-fcs</b><br />
/etc<br />
/etc/.java<br />
/etc/.java/.systemPrefs<br />
...<br />
/usr/java/jdk1.7.0_51/bin<br />
...<br />
<br />
oraculo:/local/soft/oracle # <b>/usr/java/jdk1.7.0_51/bin/java -version</b><br />
java version "1.7.0_51"<br />
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)<br />
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)<br />
</code>
<br />
<br />
<b>3) Configurar JDK en SQL Developer</b><br />
<br />
Antes de ejecutar SQL Developer se debe modificar su configuración para que use el JDK recién instalado, agregando el path correcto en el archivo de configuración <i>sqldeveloper.conf</i> en la variable <i>SetJavaHome</i>. Lo modifiqué con un editor de texto (<i>vi</i>), dejando comentada la configuración original (../../jdk):<br />
<br />
<code>
oraculo: # <b>grep SetJavaHome /opt/sqldeveloper/sqldeveloper/bin/sqldeveloper.conf</b><br />
<br />
#SetJavaHome ../../jdk<br />
SetJavaHome /usr/java/jdk1.7.0_51<br />
</code>
<br />
<br />
<b>4) Agregar conexión a PostgreSQL</b><br />
<br />
Ahora que está resuelta la instalación, abrimos SQL Developer:<br />
<br />
<code>
ncalero@oraculo:~> <b>sqldeveloper </b><br />
<br />
Oracle SQL Developer<br />
Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.<br />
</code>
<br />
<br />
Nos muestra la pantalla de inicio. En mi caso tenía una versión anterior (3.2) por lo que me migró algunas conexiones:<br />
<br />
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhABfp4eJZlLt7JpsGdeNnkgS1Ghsy8WH8QCi76xvuqc_9i4qUGhuUOCff_z2d5Lhc2O4FmbnZygwhun6Ssm274RCt3SZQtqp0AbiajrKinxnLrzG460RQm4F34-7w8I5XdHfypJfOcuZg/s1600/sqldev-ok.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhABfp4eJZlLt7JpsGdeNnkgS1Ghsy8WH8QCi76xvuqc_9i4qUGhuUOCff_z2d5Lhc2O4FmbnZygwhun6Ssm274RCt3SZQtqp0AbiajrKinxnLrzG460RQm4F34-7w8I5XdHfypJfOcuZg/s1600/sqldev-ok.png" height="386" width="640" /></a></div>
<br /></div>
<br />
Ahora vamos a la configuración para agregar el driver de PostgreSQL. Esto se hace presionando <i>Tools</i> en el menú superior, y ahí eligiendo <i>Preferences:</i><br />
<br />
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTE2IO1ydc7LgGEcvYt0nPyILRQfTf9xvpJx0QnT8F6_6jXXuGRN2YLGe_95USysl5enG6CZb0l3jXBpzRohQzA0gdwbKbSPv_rUSttJoQaGPMZ-yYzntfQkTXhV8yDwk2tbSIh8qWhik/s1600/sqldev-pref.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTE2IO1ydc7LgGEcvYt0nPyILRQfTf9xvpJx0QnT8F6_6jXXuGRN2YLGe_95USysl5enG6CZb0l3jXBpzRohQzA0gdwbKbSPv_rUSttJoQaGPMZ-yYzntfQkTXhV8yDwk2tbSIh8qWhik/s1600/sqldev-pref.png" height="269" width="400" /></a></div>
<br /></div>
<br />
Ahora hay que elegir <i>Database</i>, y allí <i>Third Party JDBC Drivers,</i> donde se muestran los drivers ya configurados (en mi caso MySQL y SQL Server):<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi4CD-pgXCBPaAsCwZILMThbTXl_7lgbLpwKWxWXPiGTpncSa6FBC413WSfxoH59AkedzAreuOuPalIdDuWMkAH0_G2zgLXcY87XrCEgIyXWxB3TM8WgbH-AjE69c_Fvr20kfDHlkgG_c/s1600/sqldev-config.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi4CD-pgXCBPaAsCwZILMThbTXl_7lgbLpwKWxWXPiGTpncSa6FBC413WSfxoH59AkedzAreuOuPalIdDuWMkAH0_G2zgLXcY87XrCEgIyXWxB3TM8WgbH-AjE69c_Fvr20kfDHlkgG_c/s1600/sqldev-config.png" height="297" width="400" /></a></div>
<br />
<br />
<div>
Con el botón <i>"Add Entry ..."</i> se debe elegir el archivo que bajamos antes, ubicado en /local/soft/oracle/postgresql-9.3-1100.jdbc41.jar.</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirtnRO6PqwBzcOqfOg6g4eNiRcyj9tD-9MWGhXvE61_xl0IPtecCKU51iGk1tr-5DR8t_RRMXpFze7bTt7-J6lF086GFfsWtCR1O55F6jKifhOkOtRyFVbOGWbzqX341GKmgemIyIKa3Q/s1600/sqldev-config-add-pg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirtnRO6PqwBzcOqfOg6g4eNiRcyj9tD-9MWGhXvE61_xl0IPtecCKU51iGk1tr-5DR8t_RRMXpFze7bTt7-J6lF086GFfsWtCR1O55F6jKifhOkOtRyFVbOGWbzqX341GKmgemIyIKa3Q/s1600/sqldev-config-add-pg.png" height="311" width="400" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
Una vez elegido, presionamos el botón <i>Select</i> en este diálogo, y <i>OK</i> en el anterior para confirmar el cambio.<br />
<br />
Para probar su funcionamiento creamos una nueva conexión. En este ejemplo usando el botón con el símbolo de más en el menú "Connections" de la izquierda:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpj0au9L__sKRPJpxpWfHxQFzIJ_HuWPFPt7ut2JkJ7acitES-im_1GKe9QkMuUchowOgQsLR0FK_Ki1xOiS149Fm8up4TevSqJmd8IOkCD79sYOaskxM_hJrycf7bDIVyAyJqmHZr1VQ/s1600/sqldev-add-connection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpj0au9L__sKRPJpxpWfHxQFzIJ_HuWPFPt7ut2JkJ7acitES-im_1GKe9QkMuUchowOgQsLR0FK_Ki1xOiS149Fm8up4TevSqJmd8IOkCD79sYOaskxM_hJrycf7bDIVyAyJqmHZr1VQ/s1600/sqldev-add-connection.png" height="142" width="400" /></a></div>
<br />
<br />
Se abre el diáologo para ingresar los datos de la conexión, donde aparece una nueva pestaña "PostgreSQL":</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2aS7OXTPiF0OEu8NriNMGkdv1eKn7SptokS7U2mK_kVCIXAgoa5D5T0nrICPKOwzjV8K3Fc8L6wMNC7cQD5iwXOGEr0btM7839T91fKB6Gb3xsZGBuXzX7IP7TMHObVH69hOXPSAAnrE/s1600/sqldev-add-pg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2aS7OXTPiF0OEu8NriNMGkdv1eKn7SptokS7U2mK_kVCIXAgoa5D5T0nrICPKOwzjV8K3Fc8L6wMNC7cQD5iwXOGEr0btM7839T91fKB6Gb3xsZGBuXzX7IP7TMHObVH69hOXPSAAnrE/s1600/sqldev-add-pg.png" height="208" width="400" /></a></div>
<br /></div>
<div>
<br /></div>
<div>
En este ejemplo me voy a conectar a una base en el mismo equipo donde corre SQL Developer.<br />
Si la base estuviera en otro servidor hay que revisar que se tenga permiso de acceso, tanto a nivel de IP (archivo pg_hba.conf) como en el usuario que se conecta a la base de datos.<br />
<br />
Una vez que se ingresan los datos (hostname, port, username, password), se puede validar que la conexión funciona presionando el botón "<i>Choose Database</i>" para que nos muestre las bases a las que podemos conectarnos, y debemos elegir una de ellas para esta conexión:</div>
<div>
<br /></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmdMytJTkfy1rjk6E8l2wrIOgnaQD2OfWW9-yJoMiiupzVK_hyphenhyphenA-IuQfItogV_wgN4b1vcTG4bv0saYbsO1WFIXL0oV7heLudnSCg1cLCkOgCHLLdaIPFRX3uHL5NyROGOtX9O1sBZPS8/s1600/sqldev-pg-add-ok.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmdMytJTkfy1rjk6E8l2wrIOgnaQD2OfWW9-yJoMiiupzVK_hyphenhyphenA-IuQfItogV_wgN4b1vcTG4bv0saYbsO1WFIXL0oV7heLudnSCg1cLCkOgCHLLdaIPFRX3uHL5NyROGOtX9O1sBZPS8/s1600/sqldev-pg-add-ok.png" height="207" width="400" /></a></div>
<br /></div>
<div>
Luego de elegida una base, podemos probar que la conexión funciona con el botón "Test" (aunque al funcionar la carga del combo de bases anteriores ya tenemos la pista de que va a funcionar). El resultado de este test se muestra en la parte inferior izquierda de esta ventana, donde dice <i>Status:, </i>como se ve en la siguiente captura marcado en rojo.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5CBFXB5kvURVwdkB7SDelAxvcZj1FuFzqbImvIshuQ3p6ymQHJDCUyRcn0CW1wwNTl83eiSF7GD-qpVWcLIRQFdJ_OGNTwO_WDgFQQX-J9tLJUOpdmIZgqJtWlvbWjwh6lsNZ8ByGSKw/s1600/sqldev-pg-ok-test.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5CBFXB5kvURVwdkB7SDelAxvcZj1FuFzqbImvIshuQ3p6ymQHJDCUyRcn0CW1wwNTl83eiSF7GD-qpVWcLIRQFdJ_OGNTwO_WDgFQQX-J9tLJUOpdmIZgqJtWlvbWjwh6lsNZ8ByGSKw/s1600/sqldev-pg-ok-test.png" height="207" width="400" /></a></div>
<br /></div>
<div>
Al presionar Connect abrimos la conexión y podemos navegar en los objetos de la base tal como lo hacemos en Oracle, y ejecutar sentencias SQL.</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9_4oobr0WaGt9J4eEl17Zgdjtod2LabQqmXImBDmlIPpuSW9UI8oUr_BpoFqZFo3h9Q726bGh7rPZb-KhUu7ogj9DTtQTz7pWJvpXt-iB13pgr7qzp2fE3RvxhFAplqfqHmFAEuF7Ehc/s1600/sqldev-pg-uso.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9_4oobr0WaGt9J4eEl17Zgdjtod2LabQqmXImBDmlIPpuSW9UI8oUr_BpoFqZFo3h9Q726bGh7rPZb-KhUu7ogj9DTtQTz7pWJvpXt-iB13pgr7qzp2fE3RvxhFAplqfqHmFAEuF7Ehc/s1600/sqldev-pg-uso.png" height="392" width="640" /></a></div>
<br /></div>
<div>
Espero les sea útil.</div>
<div>
<br /></div>Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-79851715996495710972013-12-31T13:47:00.000-02:002013-12-31T13:47:45.313-02:00Particiones, datos y optimizaciónTenemos una tabla particionada y una consulta que anda lento porque la condición de where no incluye la columna de partición y usa columnas que no están indexadas.<br />
<br />
¿Podemos hacer algo más que dar la recomendación obvia de crear un nuevo índice global?<br />
<br />
Seguro!, por lo menos hacer estas dos revisiones rápidas.<br />
<br />
Lo primero es ver si se usa la columna de particionamento en la condición del where. <br />
Si se usa, la consulta solo leerá datos de esa partición (el optimizador aplica <a href="http://docs.oracle.com/cd/E11882_01/server.112/e25523/part_avail.htm#CACGFIGJ" target="_blank">partition pruning</a>), por lo tanto un nuevo índice podría ser útil siempre que las particiones tengan un volumen de datos que lo justifique (muchas particiones con pocos registros no se van a beneficiar de un nuevo índice).<br />
<br />
Si no se usa la columna de particionamento en el where, todavía queda algo más a analizar: ¿el criterio de búsqueda tiene alguna correlación con el criterio de particionamiento? Esto es una relación funcional sobre los datos y que no podemos inferir a partir del texto de la consulta. <br />
<br />
Podemos analizar los datos buscando este vínculo, y si se llega a confirmar podríamos hacer que la consulta sea más eficiente (recorra menos registros) modificandola, agregando una simple condición <i>columna_partición=valor</i>.<br />
<br />
¿Cómo podemos hacer este análisis? Con la ayuda de la función <b>DBMS_MVIEW.PMARKER</b>, que dado un registro (<i>rowid</i>) retorna el nombre de la partición donde está almacenado.<br />
<br />
Todo esto se puede ver mejor con un ejemplo. Usé Oracle 11.2.0.2 Enterprise Edition<br />
<br />
<br />
Tenemos la tabla <i>bigtbl_part</i> particionada por rangos de la columna <i>tipo</i>, y un índice global:<br />
<br />
<blockquote>
12:40:43 PRU@ent11g> create table bigtbl_part (id, estado, tipo, clase, dato)<br />partition by range(tipo) (<br /> partition p0 values less than (1),<br /> partition p1 values less than (2),<br /> partition p2 values less than (3),<br /> partition p3 values less than (4),<br /> partition p4 values less than (5)<br />) as<br />select rownum id,<br /> floor(dbms_random.value(1,20)) estado,<br /> mod(rownum,5) tipo,<br /> mod(rownum,10) clase,<br /> 'relleno' dato<br />from all_objects, all_objects<br /><br />Table created.<br /><br />Elapsed: 00:00:53.14<br /><br />12:41:37 PRU@ent11g> create index idx1 on bigtbl_part(id) local;<br /><br />Index created.<br /><br />Elapsed: 00:00:15.90<br /><br />12:42:20 PRU@ent11g> execute dbms_stats.gather_table_stats(user,'bigtbl_part')<br /><br />PL/SQL procedure successfully completed.<br /><br />Elapsed: 00:00:02.99<br />
</blockquote><br />
<br />
<br />Vemos cómo quedaron generados los datos. Nos vamos a enfocar en las clases y tipos:<br />
<br />
<blockquote>
12:42:40 PRU@ent11g>select count(*), clase from bigtbl_part group by clase order by clase;<br /><br /> COUNT(*) CLASE<br />---------- ----------<br /> 100000 0<br /> 100000 1<br /> 100000 2<br /> 100000 3<br /> 100000 4<br /> 100000 5<br /> 100000 6<br /> 100000 7<br /> 100000 8<br /> 100000 9<br /><br />10 rows selected.<br />
</blockquote><br />
<br />
Los valores distintos de CLASE por cada partición (columna TIPO):<br />
<br />
<blockquote>
12:46:29 PRU@ent11g> select count(distinct clase), tipo<br />from bigtbl_part <br />group by tipo<br />order by tipo;<br /><br />COUNT(DISTINCTCLASE) TIPO<br />-------------------- ----------<br /> 2 0<br /> 2 1<br /> 2 2<br /> 2 3<br /> 2 4<br />
</blockquote><br /><br />
Y cómo quedaron distribuidos los datos en cada partición:<br />
<br />
<blockquote>
12:47:40 PRU@ent11g> col partition_name for a10<br />12:47:41 PRU@ent11g> select partition_name, num_rows, high_value<br />from user_TAB_PARTITIONS<br />where table_name='BIGTBL_PART';<br /><br />PARTITION_ NUM_ROWS HIGH_VALUE<br />---------- ---------- --------------------------------------------------------------------------------<br />P0 200000 1<br />P1 200000 2<br />P2 200000 3<br />P3 200000 4<br />P4 200000 5<br />
</blockquote><br /><br />
Esta es la consulta que nos interesa mejorar:<br />
<br />
<blockquote>
SELECT count(*)<br /> FROM bigtbl_part <br /> WHERE clase = :clase and estado = :estado;<br />
</blockquote><br /><br />
Para fijar ideas usamos una combinación de valores cualquiera: buscamos registros de clase 3 y estado 15:<br />
<br />
<blockquote>
12:49:52 PRU@ent11g> var clase number;<br />12:49:52 PRU@ent11g> var estado number;<br /><br />12:49:52 PRU@ent11g> exec :clase := 3;<br /><br />PL/SQL procedure successfully completed.<br /><br />12:49:52 PRU@ent11g> exec :estado := 15;<br /><br />PL/SQL procedure successfully completed.<br /><br />12:49:53 PRU@ent11g> set autotrace on explain<br /><br />SELECT count(*)<br />FROM bigtbl_part <br />WHERE clase = :clase and estado = :estado;<br /><br /> COUNT(*)<br />----------<br /> 5265<br /><br />Execution Plan<br />----------------------------------------------------------<br />Plan hash value: 1165574620<br /><br />----------------------------------------------------------------------------------------------------<br />| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |<br />----------------------------------------------------------------------------------------------------<br />| 0 | SELECT STATEMENT | | 1 | 6 | 1047 (2)| 00:00:13 | | |<br />| 1 | SORT AGGREGATE | | 1 | 6 | | | | |<br />| 2 | PARTITION RANGE ALL| | 5263 | 31578 | 1047 (2)| 00:00:13 | 1 | 5 |<br />|* 3 | TABLE ACCESS FULL | BIGTBL_PART | 5263 | 31578 | 1047 (2)| 00:00:13 | 1 | 5 |<br />----------------------------------------------------------------------------------------------------<br /><br />Predicate Information (identified by operation id):<br />---------------------------------------------------<br /><br /> 3 - filter("ESTADO"=TO_NUMBER(:ESTADO) AND "CLASE"=TO_NUMBER(:CLASE))<br />
</blockquote><br /><br />
Vemos que para resolverla el optimizador tuvo que recorrer todas las particiones de la tabla, y cada una sin usar índice.<br />
<br />
Podemos tener facilmente una idea de la cantidad máxima de registros que se necesitan analizar para responder esta consulta (peor caso):<br />
<br />
<blockquote>
12:53:04 PRU@ent11g> <br />select count(*), min(count(*)), max(count(*))<br />from BIGTBL_part<br />group by clase, estado;<br /><br /> COUNT(*) MIN(COUNT(*)) MAX(COUNT(*))<br />---------- ------------- -------------<br /> 190 5071 5500<br />
</blockquote><br /><br />
Pero si queremos además saber en qué particiones están estos datos, no alcanza con ver la cantidad de registros que tiene cada partición (columna num_rows de DBA_TAB_PARTITIONS), ya que no estamos buscando dentro de una sola partición. <br />
Tenemos que agregar a la consulta original el uso de la función dbms_mview.pmarker, y así ver si hay afinidad de los datos buscados (de la condición de agrupación) con las particiones. <br />
<br />
Esta es una primera versión simple de la consulta, donde podemos ver los distintos valores de CLASES almacenados en cada partición:<br />
<br />
<blockquote>
12:54:12 PRU@ent11g> <br />select count(*) registros<br /> ,dbms_mview.pmarker(rowid) data_object_id<br /> ,count(distinct clase) clase_x_tipo<br />FROM bigtbl_part<br />group by dbms_mview.pmarker(rowid);<br /><br /> REGISTROS DATA_OBJECT_ID CLASE_X_TIPO<br />---------- -------------- ------------<br /> 200000 75537 2<br /> 200000 75539 2<br /> 200000 75540 2<br /> 200000 75538 2<br /> 200000 75536 2<br /><br />Elapsed: 00:00:05.93<br /> </blockquote>
<br />
<br />
Agregando la condición original, podemos ver en qué particiones están los datos obtenidos:<br />
<br />
<blockquote>
12:56:51 PRU@ent11g><br />select count(*) registros<br /> ,dbms_mview.pmarker(rowid) data_object_id<br />FROM bigtbl_part<br />WHERE clase = :clase and estado = :estado<br />12:56:51 5 group by dbms_mview.pmarker(rowid);<br /><br /> REGISTROS DATA_OBJECT_ID<br />---------- --------------<br /> 5265 75539<br />
</blockquote><br /><br />
Los 5265 registros que retorna la consulta se obtienen de la partición 75539.<br />
Podemos ver el nombre de la partición consultando USER_OBJECTS:<br />
<br />
<blockquote>
12:58:17 PRU@ent11g> <br />select subobject_name<br />from user_objects<br />WHERE data_object_id=75539;<br /><br />SUBOBJECT_NAME<br />------------------------------------------------------------------------------------------<br />P3<br />
</blockquote><br /><br />
En resumen, aunque los datos se obtienen todos de la misma partición, la consulta recorre todas las particiones porque no conoce la relación entre los datos (clase y tipo).<br />
<br />
En este ejemplo los datos se generaron de esta forma para ilustrar el caso donde se puede mejorar la consulta con la ayuda de los programadores de la aplicación, quienes pueden agregar una condición más al where sobre la columna TIPO con el valor correspondiente (ya que la relación entre los valores de estas columnas pueden ser conocidos), y así mejorar la peformance de la misma. <br />
La consulta modificada quedaría así:<br />
<br />
<blockquote>
12:59:28 PRU@ent11g><br />SELECT count(*)<br />FROM bigtbl_part <br />WHERE clase = :clase and estado = :estado and tipo = :tipo;<br /><br />Plan hash value: 4104149755<br /><br />-------------------------------------------------------------------------------------------------------<br />| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop |<br />-------------------------------------------------------------------------------------------------------<br />| 0 | SELECT STATEMENT | | 1 | 9 | 211 (2)| 00:00:03 | | |<br />| 1 | SORT AGGREGATE | | 1 | 9 | | | | |<br />| 2 | PARTITION RANGE SINGLE| | 1053 | 9477 | 211 (2)| 00:00:03 | KEY | KEY |<br />|* 3 | TABLE ACCESS FULL | BIGTBL_PART | 1053 | 9477 | 211 (2)| 00:00:03 | KEY | KEY |<br />-------------------------------------------------------------------------------------------------------<br />
</blockquote><br />
Si bien se mantiene el acceso sin índice, ahora es sobre la partición y no sobre todas las particiones.<br />
Esto todavía puede mejorarse incluyendo un índice local por clase y estado si el volumen de las particiones lo amerita.<br />
Si no se hubiera podido modificar la consulta, la recomendación clásica habría sido un índice global por clase y estado.
<br />
<br />
Otro tema relacionado a mejorar la performance de consultas sobre tablas particionadas, es la utilidad de tener índices que incluyan la columna de partición (conocidos como prefixed local index). Una buena discusión sobre el tema se puede encontrar en <a href="https://community.oracle.com/message/9262880">este thread de los foros de OTN</a><br />
<br />
Espero les sea útil.<br />
<br />
Un saludo y feliz comienzo de año!Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0tag:blogger.com,1999:blog-5644241337794479690.post-24227240932626867042013-11-13T08:23:00.000-02:002013-11-13T08:23:06.424-02:00Alta disponibilidad en bases de datosSobre este tema se habla mucho, hay mucha bibliografía, y se dedica mucho esfuerzo ($$) para lograrlo.<br />
<br />
Cada instalación tiene sus particularidades y cada bases de datos ofrece distintas funcionalidades, por lo que implementar y automatizar la respuesta y recuperación ante fallas es una tarea no tan trivial.<br />
<br />
Para esta automatización Oracle provee <a href="http://www.oracle.com/technetwork/database/clusterware/overview/index-090666.html" target="_blank">Clusterware</a>, que nació como parte de la solución de cluster para base de datos <a href="http://www.oracle.com/technetwork/products/clustering/overview/index.html" target="_blank">Oracle RAC</a>. Soporta además <a href="http://docs.oracle.com/cd/E11882_01/rac.112/e16794/crschp.htm#CWADD91277" target="_blank">configurar cualquier recurso</a> gestionable con scripts, lo que por ejemplo permite configurar una base MySQL como un recurso de Oracle Clusterware.<br />
En la versión 11.2 (año 2009) se ofreció como producto independiente con la licencia de Oracle Enterprise Linux, y desde este año con la versión 12.1 se ofrece de forma gratuita, con soporte oficial teniendo cualquier otro producto de Oracle.<br />
<br />
Este mismo concepto está desde hace mucho tiempo en la comunidad open source, siendo la solución más antigua y popular <a href="http://www.linux-ha.org/" target="_blank">Heartbeat</a>. A evolucionado desde su origen en 1999, y a partir del 2003 se generó el proyecto <a href="http://clusterlabs.org/" target="_blank">Pacemaker</a> que tomó la implementación de una solución completa de gestión de recursos en cluster, además de monitoreo. Pacemaker es muy popular por estar disponible en muchas plataformas, además de ser gratuito y robusto.<br />
<br />
Yo lo vengo usando desde el 2007 con Postgres y MySQL, y sigue siendo una buena alternativa para instalaciones que no tienen disponible licencias de Oracle. El pasado 15 y 16 de Octubre se realizó en Buenos Aires la conferencia "<a href="http://www.mysqlnosqlcloud.com/" target="_blank">MySQL / NoSQL & Cloud</a>", y fui aceptado para presentar sobre cómo implementar alta disponibilidad en bases de datos con Pacemaker. Está dirigida a gente que no lo ha usado, y cuento todos los detalles con ejemplos usando máquinas virtuales. Dejo acá la presentación y los <a href="https://drive.google.com/file/d/0Bz59RWNgfxkhTWRPb29RY0xoc0U/edit?usp=sharing" target="_blank">scripts usados</a>.<br />
<br />
Nelson Calerohttp://www.blogger.com/profile/10345454509727872481noreply@blogger.com0