[ 2017-07-31 ]

Cloud DBA - La metamorfosis

En este "Oracle White Paper" de Julio 2017:  The Rise of the Renaissance DatabaseAdministrator se hace un insteresante análisis de la transformación que está ocurriendo con el rol del DBA en las organizaciones, en el contexto de la acelerada evolución de la tecnología Cloud y la incorporación de soluciones DBaaS.

Aqui un breve extacto:


Clouds and DBA Tasks


For years, the roles and responsibilities of DBAs were well defined and contained within the confines of the data center or IT department. DBAs were the ultimate caretakers for their corporate databases, making sure everything was running smoothly, managing the loading and extraction of data, setting access rights and data security, and ensuring that everything was backed up. 

As cloud computing is accelerating the growth of data and the ability to move organizations into the digital race, it is also shifting DBAs’ roles and responsibilities. Cloud services – both from databases connected to the cloud, as well as databases run within clouds -- make the role of DBA more important than ever. Cloud services may help automate the management, installation, troubleshooting, performance, patching, backing up and security of data, but DBAs are needed to ensure that data environments continue to run efficiently and line up with business requirements.

A survey of members of the Independent Oracle Users Group, conducted by Unisphere research, a division of Information Today, documents the relentless growth of data – as well as its increasing importance to the business – demonstrates the increasing value of DBAs as they engage new avenues of the business. A majority, 62%, report their company’s data volume has grown more than 10% annually, and 74% state their companies’ requirements for secure, well-governed data environments that meet compliance mandates is growing as well. Many organizations are turning to data to help make better business decisions, engage with customers, and increase speed to market. 


Cloud frees up valuable DBA time and resources to provide this value to the business. Cloud-born services can help DBAs in a number of ways, handling much of the lower-level or infrastructure maintenance concerns, including the provisioning of disk space, increasing high availability, providing failover, integrating data, and enhancing security. An additional IOUG-Unisphere survey finds growing interest in Database as a Service (DBaaS) as a viable approach to serving enterprises’ needs for greater agility and faster time to market with cloud computing. DBaaS is taking off, with adoption expected to triple between 2016 and 2018. There will be a significant amount of enterprise data shifting to the cloud over that same time period as well, as enterprises rethink data management in the cloud.


Seventy-three percent of managers and professionals expect to be using DBaaS within their enterprises by that time, versus 27% at the present time. 





[ 2017-07-29 ]

Creación de un Listener utilizando NETCA en modo texto

(Artículo original en portugués de Franky Weber Faust)

En el siguiente post voy a mostrar como crear un Listener con NETCA en modo texto usando un response file.



Antes de crear una base de datos, hay ocaciones en que resulta conveniente crear primero un Listener. 
Un ejemplo de esto, es si vamos a configurar el Enterprise Manager, ya que requiere que el listener  esté creado previamente y en ejecución.

[ 2017-07-27 ]

Primer artículo en OTN Portugués

El día de ayer fué publicado en el sitio de OTN Portugués  http://www.oracle.com/technetwork/pt/articles/index.html el primer articulo con mi nombre. Es el primero de una serie de 3, donde se trata la creación y configuración de un Oracle Database Cloud Service - Virtual Image.

Espero sean muchos más ...

Aqui el link al artículo:

Oracle Cloud: Passo a passo para criar e configurar um Oracle Database Cloud Service - Virtual Image (Parte I)





[ 2017-07-25 ]

Novedades Oracle Database Cloud Service - Julio 2017

July 2017

FeatureDescription
Hybrid Disaster Recovery (DR)
You can create a Hybrid DR deployment that includes a primary database on your on-premises system and a standby database in the cloud. Previously you could create a DR configuration with a standby database in the cloud by performing a number of manual steps. Now you can easily create the Hybrid DR deployment through the Database Cloud Service console. For information, see "Creating a Hybrid DR Deployment" in Using Oracle Database Cloud Service.
Mandatory “sync-up” patch available for Release 12.2 Oracle RAC databases
Several enhancements and bug fixes have been made to Oracle Database Release 12.2 since its release on Oracle Cloud in November 2016. However, these improvements have not yet been gathered into a PSU.
Database Cloud Service is making available a “sync-up” patch that includes these many improvements and prepares your database deployment for patching when the first PSU becomes available for Release 12.2.
You must apply this patch to 12.2 database deployments that use Database Cloud Servicerelease 17.2.1 or earlier, and host one of the following database types:
  • Database Clustering with RAC
  • Database Clustering with RAC and Data Guard Standby

[ 2017-07-23 ]

Transformando vistas en tablas con el parámetro views_as_tables de Datapump en Oracle 12c

Datapump en 12c, incorpora un nuevo parámetro "VIEWS_AS_TABLES". Con este parámetro, podemos exportar una vista desde una base de datos origen e importarla como tabla en una base destino. 

Veamos como funciona esto:

Creamos primero una vista:

SQL> create view dba_view( emp_number) as select emp from dbatool;
View created.

Verificamos:

SQL> select owner,object_name,object_type from dba_objects where object_name='DBA_VIEW';
 
              OWNER OBJECT_NAM             OBJECT_TYPE
 ------------------ ---------- -----------------------
               SYS    DBA_VIEW                    VIEW

Realizamos un export de la vista, como tabla, utilizando el parámetro: views_as_tables

[oracle@localhost ~]$ expdp dumpfile=view.dmp logfile=view.log directory=DUMP views_as_tables=DBA_VIEW

Export: Release 12.1.0.2.0 - Production on Sat Aug 22 07:07:54 2015

Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.

Username: sys/oracle@ORCL as sysdba

Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TABLE_01": sys/********@ORCL AS SYSDBA dumpfile=view.dmp logfile=view.log directory=DUMP views_as_tables=DBA_VIEW
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/VIEWS_AS_TABLES/TABLE
. . exported "SYS"."DBA_VIEW" 5.117 KB 8 rows
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TABLE_01 is:
/home/oracle/DUMP/view.dmp
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at Sat Aug 22 07:08:17 2015 elapsed 0 00:00:11

[ 2017-07-20 ]

Lock automático de cuentas con INACTIVE_ACCOUNT_TIME

En Oracle  Release 12.2 podemos usar el parámetro INACTIVE_ACCOUNT_TIME en un profile, para bloquear automáticamente una cuenta de usuario con la cual no se ha iniciado sesión en los últimos "n "días. Número especificado por el parámetro. 

1-  Por default está seteado en UNLIMITED
2-  La configuración  mínima es de 15 dias y la máxima de 24855

col RESOURCE_NAME for a43
col limit for a23
set lines 299
SQL> select RESOURCE_NAME,limit from dba_profiles where profile='DEFAULT';

RESOURCE_NAME                               LIMIT
------------------------------------------- -----------------------
COMPOSITE_LIMIT                             UNLIMITED
SESSIONS_PER_USER                           UNLIMITED
CPU_PER_SESSION                             UNLIMITED
CPU_PER_CALL                                UNLIMITED
LOGICAL_READS_PER_SESSION                   UNLIMITED
LOGICAL_READS_PER_CALL                      UNLIMITED
IDLE_TIME                                   UNLIMITED
CONNECT_TIME                                UNLIMITED
PRIVATE_SGA                                 UNLIMITED
FAILED_LOGIN_ATTEMPTS                       10
PASSWORD_LIFE_TIME                          180
PASSWORD_REUSE_TIME                         UNLIMITED
PASSWORD_REUSE_MAX                          UNLIMITED
PASSWORD_VERIFY_FUNCTION                    NULL
PASSWORD_LOCK_TIME                          1
PASSWORD_GRACE_TIME                         7
INACTIVE_ACCOUNT_TIME                       UNLIMITED ----------- > This is the resource_name introduced in oracle 12.2.

17 rows selected.

col RESOURCE_NAME for a43
col limit for a23
set lines 299
SQL> select RESOURCE_NAME,limit from dba_profiles where profile='DEFAULT';

RESOURCE_NAME                               LIMIT
------------------------------------------- -----------------------
COMPOSITE_LIMIT                             UNLIMITED
SESSIONS_PER_USER                           UNLIMITED
CPU_PER_SESSION                             UNLIMITED
CPU_PER_CALL                                UNLIMITED
LOGICAL_READS_PER_SESSION                   UNLIMITED
LOGICAL_READS_PER_CALL                      UNLIMITED
IDLE_TIME                                   UNLIMITED
CONNECT_TIME                                UNLIMITED
PRIVATE_SGA                                 UNLIMITED
FAILED_LOGIN_ATTEMPTS                       10
PASSWORD_LIFE_TIME                          180
PASSWORD_REUSE_TIME                         UNLIMITED
PASSWORD_REUSE_MAX                          UNLIMITED
PASSWORD_VERIFY_FUNCTION                    NULL
PASSWORD_LOCK_TIME                          1
PASSWORD_GRACE_TIME                         7
INACTIVE_ACCOUNT_TIME                       UNLIMITED ----------- > This is the resource_name introduced in oracle 12.2.

17 rows selected.

[ 2017-07-19 ]

Oracle Critical Patch Update - July 2017

July 18, 2017

Oracle Critical Patch Update for July 2017

The Critical Patch Update for July 2017 was released on July 18th, 2017.
Oracle strongly recommends applying the patches as soon as possible.

If you are new to this process, please review Oracle's Security Fixing Policies and the Critical Patch Update Advisory. After reviewing these resources, if you are unable to determine if you require a software update, or how to apply it, please contact Oracle Support.

The Critical Patch Update Advisory is the starting point for relevant information. It includes the list of products affected, pointers to obtain the patches, a summary of the security vulnerabilities for each product suite, and links to other important documents. Supported products that are not listed in the "Affected Products and Components" section of the advisory do not require new patches to be applied.

Also, it is essential to review the Critical Patch Update supporting documentation referenced in the Advisory before applying patches, as this is where you can find important pertinent information.

[ 2017-07-17 ]

Recuperando Bases On-Premises en Oracle Cloud, utilizando RMAN con backups almacenados en Oracle Storage Cloud

En artículos anteriores vimos cómo diseñar una solución de disaster recovery para una base de datos Oracle On-Premises, creando una base de datos standby en Oracle Cloud. Es probable que en algunos casos, tal vez no necesitemos tener activa una base de datos standby, pero sí por el contrario, resulte útil recrear eventualmente nuestra base de datos local en la nube.Utilizando para ello backups almacenados en “Oracle Cloud Storage”.
En este artículo les mostraremos como realizar el backup de una base local con RMAN, almacenándolo en “Oracle Cloud Storage”. Y como luego realizar un restore/recover de ese backup en la nube.
Antes de poder realizar el resguardo de nuestra base en “Oracle Cloud Storage”, necesitamos descargar e instalar el módulo “Oracle Database Cloud Backup Module”, el cual nos permitirá utilizar RMAN en nuestra base on-premise apuntando a “Oracle Database Backup Service” como destino de backup.
Abrimos el siguiente enlace, aceptamos la licencia y descargamos“Oracle Database Cloud Backup Module”(opc_installer.zip).
Creamos dos carpetas en nuestro servidor local, una para almacenar el wallet y otra para el archivo lib, extraemos el archivo zip y lo instalamos:
[oracle@server01 ~]$ mkdir/home/oracle/wallet 
[oracle@server01 ~]$ mkdir/home/oracle/lib

[oracle@server01tmp]$ java -jar opc_install.jar -serviceName Storage 
-identityDomainyourIdentityDomain -opcIDYourOpcId -opcPassYourOpcPassword 
-walletDir /home/oracle/wallet -libDir /home/oracle/lib

Oracle Database Cloud Backup Module Install Tool, build 2016-10-07

Oracle Database Cloud Backup Module credentials are valid.

Oracle Database Cloud Backup Module wallet created in directory 
/home/oracle/wallet.

Oracle Database Cloud Backup Module initialization file /u03/oracle/
product/11.2.4/db_1/dbs/opcPROD.ora created.

Downloading Oracle Database Cloud Backup Module Software Library 
from file opc_linux64.zip.

Downloaded 26528348 bytes in 12 seconds. Transfer rate was 2210695 
bytes/second.

Download complete.

[ 2017-07-14 ]

Oracle Cloud: Utilizando “dbaascli” para aplicar parches a una base de datos en la nube

En el siguiente artículo vamos a mostrar la manera de aplicar un patch de tipo PSU en una base de datos en Oracle Database Cloud Service utilizando la herramienta de línea de comando “dbaascli”. En nuestro ejemplo aplicaremos el último PSU para Oracle Database 11.2.0.4 disponible, el cual desde algún tiempo estábamos esperando y justo durante el desarrollo de este artículo fue liberado.
01
Comenzamos entonces con nuestra tarea. Primero nos conectamos a Oracle Cloud y nos posicionarnos en la página “home” de nuestra base de datos, una vez allí comprobamos si existen nuevas actualizaciones. Como podemos ver en la imagen, en el área“Administration”, tenemos el aviso de la existencia de un nuevo parche disponible (“1 Patches available”). Hacemos click en él para ver los detalles:

[ 2017-07-12 ]

Quien está generando tanto redo?

Comparto aqui una consulta que puede sacarnos de un apuro cuando alguna FRA "explota" por la continua generación de "redo" y no sabemos bien el origen de esas transacciones.
La consulta muestra los "top" generadores de redo.
Espero les resulte útil.

set linesize 150
set pages 9999

column sid format 9999
column serial# format 99999
column name format a20
column username format a15
column logon format a20
column idle format a10
column value format 9G999G999G999
column program format a50

select sid, serial#, username, program, name, value, logon, idle
from ( select sess.sid, sess.serial#, sess.username, program, statn.name, sesst.value,
              to_char(sess.logon_time, 'DD/MM/YYYY HH24:MI:SS') logon,
              floor(sess.last_call_et/3600)||':'|| floor(mod(sess.last_call_et,3600)/60)||':'|| mod(mod(sess.last_call_et,3600),60) idle,
              row_number() over
                ( partition by statn.name
                  order by sesst.value desc
                 ) rn
       from v$session sess, v$sesstat sesst, v$statname statn
       where sess.sid = sesst.sid
             and sesst.statistic# = statn.statistic#
             and statn.name in
                ('redo blocks written', 'redo size', 'redo wastage')
             and sesst.value > 0
     )
where rn <= 5
order by name, value desc;

[ 2017-07-10 ]

Backup "On Demand" en Oracle Database Cloud

Para realizar un backup "On Demand" de un despliegue de base de datos Oracle Cloud, podemos utilizar dos métodos diferentes:
  • Usar el utilitario bkup_api 
  • Usar la Consola de Database Cloud Service
Para hacer el backup con bkup_api debemos seguir  estos pasos:

1 Conectarnos a la VM donde está desplegada la base a tomar backup.

2 Deshabilitar el cron con la ejecución automática de backups (crontab)

3 Ejecutar el backup de forma manual:

# /var/opt/oracle/bkup_api/bkup_api bkup_start

4 Podemos verificar  el avance del backup corriendo:

# /var/opt/oracle/bkup_api/bkup_api bkup_status

5 Habilitar nuevamente los backups automáticos (crontab)

[ 2017-07-08 ]

OTN Tour 2017 Argentina en marcha


Nuevamente los Grupos de Usuarios de la región y el apoyo de LAOUC organizamos el Oracle Technology Network Tour de Latinoamérica.
Este año abarca 10 países y es el evento en el que los máximos exponentes y expertos en tecnologías Oracle recorren el mundo llevando su conocimiento a todas las latitudes.
Los Grupos de Usuarios de América Latina somos pioneros en la realización de esta iniciativa que se ha replicado en todo el mundo.
El esperado encuentro será los días 2 y 3 de agosto en la Universidad CAECE y habrá presentaciones para diversas áreas de interés: Base de Datos, Middleware, Java, MySQL, Virtualización, Linux, BPM, BI y Aplicacioness
Speakers confirmados:


Inscripción al evento Aqui

Agenda dia 1 (2/8/17)
Agenda dia 2 (3/8/17)


[ 2017-07-04 ]

Optimizer with Oracle Database 12c Release 2 (White Paper)


Nuevo Oracle White Paper
Optimizer with Oracle Database 12c Release 2
 
Introduction
The Oracle Optimizer is one of the most fascinating components of the Oracle Database, since it is essential to the processing of every SQL statement. The optimizer determines the most efficient execution plan for each SQL statement based on the structure of the given query, the available statistical information about the underlying objects, and all the relevant optimizer and execution features. This paper introduces all of the new optimizer and statistics related features in Oracle Database 12c Release 2 and provides simple, reproducible examples to make it easier to get acquainted with them, especially when migrating from previous versions. It also outlines how existing functionality has been enhanced to improve both performance and manageability.

Some Oracle Optimizer features have been broken out of this paper and covered in their own.

Specifically, they are:
» Optimizer Statistics and Optimizer Statistics Advisor
» SQL Plan Management
» Approximate Query Processing

To get a complete picture of the Oracle Optimizer, it is recommended that you read this paper in conjunction with the relevant papers listed in the References section. See page 28 for details.