Presentación hecha en la JIAP2011 en Montevideo, Uruguay
Resumen:
La versión 11grR2 de la base de datos Oracle incluye nuevas funcionalidades y características mejoradas.
Se presenta una breve reseña y detalles técnicos de algunas de ellas, resaltando los beneficios que se obtienen al actualizar a esta nueva versión. y los puntos a considerar cuando nos proponemos esta migración.
24 HOP edición Español - El recetario de restore - Warner ChavesSpanishPASSVC
Como se restaura una base de datos que ha perdido un data file? Como se restaura la pErdida de un transaction log? Como eliminar corrupciOn en el menor tiempo posible?
En algUn momento, estos y otros escenarios destructivos atentarAn contra nuestras bases de datos. Y la expectativa como DBA es que reaccionemos de manera eficiente y confiada en solucionarlos.
Porque si somos los guardianes de estos datos, debemos conocer estas recetas.
Presentación hecha en la JIAP2011 en Montevideo, Uruguay
Resumen:
La versión 11grR2 de la base de datos Oracle incluye nuevas funcionalidades y características mejoradas.
Se presenta una breve reseña y detalles técnicos de algunas de ellas, resaltando los beneficios que se obtienen al actualizar a esta nueva versión. y los puntos a considerar cuando nos proponemos esta migración.
24 HOP edición Español - El recetario de restore - Warner ChavesSpanishPASSVC
Como se restaura una base de datos que ha perdido un data file? Como se restaura la pErdida de un transaction log? Como eliminar corrupciOn en el menor tiempo posible?
En algUn momento, estos y otros escenarios destructivos atentarAn contra nuestras bases de datos. Y la expectativa como DBA es que reaccionemos de manera eficiente y confiada en solucionarlos.
Porque si somos los guardianes de estos datos, debemos conocer estas recetas.
Este minitutorial tiene como objetivo captar todos los conceptos dictados en cada sesión en el curso de Base de Datos Avanzado II, así como brindar apoyo a los alumnos de la carrera técnica de Computación e Informática, que por algún motivo no hayan asistido a clases.
UNIDAD 6. Sistemas de archivos Oracle
Logro de la Unidad de Aprendizaje
Al término de la unidad, el alumno implementa una distribución y configuración adecuada de los sistemas de archivos de Oracle.
Temario
6.1. Tema 6: Sistemas de archivos Oracle
6.1.1. Archivos de Control
6.1.2. Mantenimiento de los Archivos Redo logs
6.1.3. Gestión de tablespaces y datafiles
Todo lo que se necesita saber para usar Pacemaker como solución de alta disponibilidad en bases de datos.
Presentación dada en la conferencia MySQL NoSQL & Cloud Latin America en Buenos Aires el 15/10/2013.
Database automation guide - Oracle Community Tour LATAM 2023Nelson Calero
The tasks of the DBA role are in permanent evolution. There are new and changed functionalities in database versions, cloud services, integrations, and new tools. Automation has been always a big portion of the DBA work, and is constantly challenging our processes. This presentation explore these automation changes using examples from experience of supporting hundreds of Oracle installations of varying size and complexity, including the process of choosing the right tool for the task, implementation, and subsequent maintenance, mainly using Ansible.
Terraform is a popular tool to handle your infrastructure as code. It is really simple to use, and there are plenty of examples and tutorials. What about when you need to use it for several months daily? In this session, I share my learnings after using it for almost a year to maintain databases in the cloud (OCI and AWS), highlighting the concepts and issues you need to get familiar with to speed up the learning curve, become more productive, and avoid common mistakes.
Más contenido relacionado
Similar a OOW LatinAmerica 2011 - RMAN sin misterios
Este minitutorial tiene como objetivo captar todos los conceptos dictados en cada sesión en el curso de Base de Datos Avanzado II, así como brindar apoyo a los alumnos de la carrera técnica de Computación e Informática, que por algún motivo no hayan asistido a clases.
UNIDAD 6. Sistemas de archivos Oracle
Logro de la Unidad de Aprendizaje
Al término de la unidad, el alumno implementa una distribución y configuración adecuada de los sistemas de archivos de Oracle.
Temario
6.1. Tema 6: Sistemas de archivos Oracle
6.1.1. Archivos de Control
6.1.2. Mantenimiento de los Archivos Redo logs
6.1.3. Gestión de tablespaces y datafiles
Todo lo que se necesita saber para usar Pacemaker como solución de alta disponibilidad en bases de datos.
Presentación dada en la conferencia MySQL NoSQL & Cloud Latin America en Buenos Aires el 15/10/2013.
Database automation guide - Oracle Community Tour LATAM 2023Nelson Calero
The tasks of the DBA role are in permanent evolution. There are new and changed functionalities in database versions, cloud services, integrations, and new tools. Automation has been always a big portion of the DBA work, and is constantly challenging our processes. This presentation explore these automation changes using examples from experience of supporting hundreds of Oracle installations of varying size and complexity, including the process of choosing the right tool for the task, implementation, and subsequent maintenance, mainly using Ansible.
Terraform is a popular tool to handle your infrastructure as code. It is really simple to use, and there are plenty of examples and tutorials. What about when you need to use it for several months daily? In this session, I share my learnings after using it for almost a year to maintain databases in the cloud (OCI and AWS), highlighting the concepts and issues you need to get familiar with to speed up the learning curve, become more productive, and avoid common mistakes.
With the recent apparition of Kubernetes operators for Oracle, you have now the possibility to easily deploy and handle an Oracle database on a Kubernetes cluster.
Why you could want this? How do you do it? Which features those operators provide? Is it portable between the native Kubernetes cloud services offered by OCI, GCP, and AWS, and on-premises deployments?.
In this session, we will explore the basics of Kubernetes, the implications of running an Oracle database on it, and test the Google ElCarro and Oracle operators for Kubernetes in GCP, AWS, and OCI.
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Nelson Calero
Each new version of the Oracle database includes improvements in the upgrade and patching utilities, forcing us to update our procedures to incorporate these changes.
The Fleet Provisioning & Patching (FPP, formerly RHP) utility, together with the change in its licensing announced at OOW 2019 that makes it free in RAC, now makes it possible to centrally manage the software life cycle.
This presentation shows examples of how to use FPP and different configuration options.
Presentation delivered at Oracle Open World 2019 (San Francisco, California)
Abstract: This session walks through everything you need to know to move your databases to Oracle Cloud, based on the speakers’ own experience in doing it, focused on Oracle Exadata cloud services. The speakers review the configuration required, common problems they had to resolve in the process of having several TB databases running in Oracle Cloud, and operational tasks after they were running there.
Automate your oracle cloud infrastructure operations v2.0 - OOW19Nelson Calero
Updated version for Oracle Open World 2019 of the same presentation done at Collaborate 2019
Abstract:
Oracle Cloud provides APIs and command-line utilities for handling your infrastructure in the cloud without using the web console. In addition, there are orchestration tools such as Terraform for building, changing, and versioning your infrastructure, enabling automation and configuration management. This session introduces Oracle Cloud Infrastructure services and APIs through examples from a DBA perspective: looking to minimize manual interventions when creating instances and containers, deploying a cluster with the Terraform Kubernetes installer, and backing up your databases. This presentation is an updated version of last year’s, including Oracle Cloud Infrastructure new-generation services and tools.
Automate the operation of your Oracle Cloud infrastructure v2.0Nelson Calero
Presentation delivered in Collaborate 19 conference in April 2019 in San Antonio
Abstract: The Oracle Cloud provides APIs and command line utilities to handle your infrastructure in the cloud without using the web console. In addition, there are orchestration tools such as Terraform to build, change and version your infrastructure, allowing automation and configuration management.
This session introduces to OCI services and APIs through examples from a DBA perspective, looking to minimize manual interventions when creating instances and containers, deploying a cluster using the project terraform-kubernetes-installer, and backing up your databases.
This is an updated version of a similar session a did last year, now focused on OCI new generation services and tools.
SSL certificates in the Oracle Database without surprisesNelson Calero
Presentation delivered on UKOUG conference in December 2019.
Abstract: Nowadays database installations are required to use secure connections to communicate with clients, from connecting to the database listener to interact with external services (for example to send emails from the database).
Also since a couple of years ago, it has been required to use stronger protocols like TLS 1.2 (SHA2 algorithm), which requires extra configuration in older database releases.
This presentation shows how SSL certificates work from a DBA perspective, which tools are available and examples of configuring and troubleshooting their usage from the Oracle database. It also explores the implications and how to implement TLS 1.2 and common errors found in real life usage.
Practical guide to Oracle Virtual environmentsNelson Calero
Virtualization and containers are the technologies that enable isolation of environments running on the same hardware, and can be used in some of the cloud offerings as well as in your local hardware.
This session will introduce you to Vagrant, Ansible, and Docker with examples, showing step by step guides to automatically create and provision virtual Oracle environments using different solutions (no need to code, just to configure existing code).
Automate your Oracle Cloud Infrastructure operationNelson Calero
The Oracle Cloud provides APIs and CLI utilities to handle your infrastructure in the cloud without using the web console. In addition, there are orchestration tools such as Terraform to build, change and version your infrastructure.
This presentation introduces to the topic through examples, minimizing manual interventions: creating instances and containers, using the REST api and opc tool, deploying a cluster using the project terraform-kubernetes-installer, and backing up your databases.
This is an overview of the cloud offering from key players, focused on Oracle Cloud (also Google and AWS), including costs, changes in architecture and operations, and the new role of the DBA with the outline of the migration procedure, backups and DR in this new world.
Redefining tables online without surprisesNelson Calero
The Oracle database includes several features to allow moving data online, ie: without preventing users to access it when it is being moved (DML operation are not blocked).
One of those features is to change a table definition, using the package DBMS_REDEFINITION.
While moving a table is an online operation since version 12.2, redefinition is still needed for some changes. Also is needed in older versions.
In this session best practices will be shown based on experience of using it with big tablespaces, with examples covering all the steps needed to use DBMS_REDEFINITION under different scenarios, including the problems you can find, how to resolve them and how this process is different in version 11.2 and 12.
Protect Sensitive Data: Implementing Fine-Grained Access Control in OracleNelson Calero
Using Oracle Enterprise Edition we can restrict the access to data from different users implementing security at row-level.
This presentation will walk through the implementation of a virtual private database evaluating different aspects of its usage, reviewing the changes introduced on different Oracle versions from its original 8i implementation to 12c.
First delivered on Kscope16 conference in Chicago, including scripts to illustrate each of the alternatives.
On version 12c Oracle introduced new features to allow Adaptive optimizations: Adaptive Plans and Adaptive Statistics. After a quick presentation of concepts, this session will explore the interaction of these features with other performance management techniques using examples, like SPM and SQL profiles. Attendees will get an updated picture of tools available to troubleshoot performance issues, and how to get the most of these new features.
My Experience Using Oracle SQL Plan Baselines 11g/12cNelson Calero
This presentation shows how to use the Oracle database functionality SQL Plan Baselines, with examples from real life usage on production (mostly 11gR2) and how to troubleshoot it.
SQL Plan Baselines is a feature introduced on 11g to manage SQL execution plans to prevent performance regressions. The concepts will be presented, along with examples, and some edge cases.
Presentación dada en el primer Webcast en español del Oracle RACSIG - http://oracleracsig.org/
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, Oracle RAC sin sorpresas, donde se repasa lo que implica usar Oracle RAC, los desafíos y recomendaciones de cómo sacarle mejor provecho.
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.
AROUG BIDAY 2013 - Automatizar procesos de ETL con PL/SQLNelson Calero
Presentación dada en BI DAY 2013 organizado por el grupo de usuarios Oracle de Argentina (AROUG) el 12 de junio de 2013.
Difusión del evento: http://aroug.org/2013/05/bi-day-reserva-tu-lugar/
MariaDB y FOSS en infraestructura de salud y estándaresNelson Calero
Introducción a estándares en sistemas de salud, ejemplo de una institución y planes con tecnología FOSS.
Presentación dada en la primer "MySQL / NoSQL & Cloud Latin American Conference" en Buenos Aires, Argentina el 27 de junio de 2012.
Inteligencia Artificial y Ciberseguridad.pdfEmilio Casbas
Recopilación de los puntos más interesantes de diversas presentaciones, desde los visionarios conceptos de Alan Turing, pasando por la paradoja de Hans Moravec y la descripcion de Singularidad de Max Tegmark, hasta los innovadores avances de ChatGPT, y de cómo la IA está transformando la seguridad digital y protegiendo nuestras vidas.
(PROYECTO) Límites entre el Arte, los Medios de Comunicación y la Informáticavazquezgarciajesusma
En este proyecto de investigación nos adentraremos en el fascinante mundo de la intersección entre el arte y los medios de comunicación en el campo de la informática.
La rápida evolución de la tecnología ha llevado a una fusión cada vez más estrecha entre el arte y los medios digitales, generando nuevas formas de expresión y comunicación.
Continuando con el desarrollo de nuestro proyecto haremos uso del método inductivo porque organizamos nuestra investigación a la particular a lo general. El diseño metodológico del trabajo es no experimental y transversal ya que no existe manipulación deliberada de las variables ni de la situación, si no que se observa los fundamental y como se dan en su contestó natural para después analizarlos.
El diseño es transversal porque los datos se recolectan en un solo momento y su propósito es describir variables y analizar su interrelación, solo se desea saber la incidencia y el valor de uno o más variables, el diseño será descriptivo porque se requiere establecer relación entre dos o más de estás.
Mediante una encuesta recopilamos la información de este proyecto los alumnos tengan conocimiento de la evolución del arte y los medios de comunicación en la información y su importancia para la institución.
Actualmente, y debido al desarrollo tecnológico de campos como la informática y la electrónica, la mayoría de las bases de datos están en formato digital, siendo este un componente electrónico, por tanto se ha desarrollado y se ofrece un amplio rango de soluciones al problema del almacenamiento de datos.
En este documento analizamos ciertos conceptos relacionados con la ficha 1 y 2. Y concluimos, dando el porque es importante desarrollar nuestras habilidades de pensamiento.
Sara Sofia Bedoya Montezuma.
9-1.
3Redu: Responsabilidad, Resiliencia y Respetocdraco
¡Hola! Somos 3Redu, conformados por Juan Camilo y Cristian. Entendemos las dificultades que enfrentan muchos estudiantes al tratar de comprender conceptos matemáticos. Nuestro objetivo es brindar una solución inclusiva y accesible para todos.
1. RMAN sin misterios
Ing. Nelson Calero, OCP
nelson.calero@logos.com.uy
1/53
2. Organización independiente sin fines de lucro, creada por
profesionales en Dic/2009.
Ámbito donde se promueve el intercambio de conocimiento
entre usuarios de tecnología Oracle, en áreas de aplicaciones
y tecnología (BD) .
Organizar eventos técnicos en el país en forma periódica.
Acercar referentes internacionales a eventos locales.
250 afiliados (agosto 2011)
http://www.uyoug.org.uy
4. Sobre mí: http://www.linkedin.com/in/ncalero
●
Desde 1994 trabajando con herramientas Oracle y Linux
●
Desde 2001 DBA Oracle y MySQL
●
Instructor de Oracle University 2011 en cursos oficiales
●
Co-fundador y Presidente del Grupo de usuarios Oracle
del Uruguay (UYOUG)
●
Latin America Chair del Oracle RAC SIG
6. ¿ Qué es RMAN ?
• utilitario de Oracle para manejar backup/recovery y su
historia
• interfaz CLI y GUI
• existe desde Oracle 8 – 1997
• instalado junto con la base, en $ORACLE_HOME/bin
• es pro*C ejecutando PL/SQL
• bugs documentados, en distintas versiones:
– menos de 1283, más de 170.
• Known RMAN Performance Problems [ID 247611.1]
- 32 bugs, corregidos todos en 11g (algunos antes)
6/53
8. ¿Hoy veremos mejores
prácticas de backup &
recovery?
Algunas, las que usan RMAN
Además, es necesario usar más
tecnología que RMAN:
• datapump
• flashback
• secure backup
8/53
9. Respaldando con rman
Diferencias entre respaldo RMAN y
manual (user-managed) :
– rman fija las reglas, pero es flexible
– rman necesita menos instrumentación
– rman provee más funcionalidades
– rman requiere entrenamiento
9/53
10. Respaldando sin rman
• consistente (frío):
cp path/* dest-bkp
• inconsistente (caliente) :
alter tablespace nnn begin backup;
cp path/datafile.dbf destbkp
alter tablespace nnn end backup;
10/53
11. Respaldando con rman
• consistente (frío):
rman target /
startup mount;
backup database plus archivelog;
• inconsistente (caliente) :
rman target /
backup database plus archivelog;
11/53
12. Respaldando con rman
Si usamos XE:
$ORACLE_HOME/config/scripts/
• backup.sh
• restore.sh
12/53
13. ¿Realmente es tan fácil?
oracle@oraculo:~/app/oracle/product/10.2.0/server/config/scripts> ./backup.sh
Warning: Log archiving (ARCHIVELOG mode) is currently disabled. If
you restore the database from this backup, any transactions that take
place between this backup and the next backup will be lost. It is
recommended that you enable ARCHIVELOG mode before proceeding so
that all transactions can be recovered upon restore. See the section
'Enabling ARCHIVELOG Mode...' in the online help for instructions.
Backup with log archiving disabled will shut down and restart the
database. Are you sure [Y/N]?
Prueba con OpenSuse 11.3 x32 y XE 10.2
13/53
14. ¿Realmente es tan fácil?
oracle@oraculo:~/app/oracle/product/10.2.0/server/config/scripts> ./backup.sh
Warning: Log archiving (ARCHIVELOG mode) is currently disabled. If
you restore the database from this backup, any transactions that take
place between this backup and the next backup will be lost. It is
recommended that you enable ARCHIVELOG mode before proceeding so
that all transactions can be recovered upon restore. See the section
'Enabling ARCHIVELOG Mode...' in the online help for instructions.
Backup with log archiving disabled will shut down and restart the
database. Are you sure [Y/N]? y
Backup in progress...
==================== ERROR =========================
Backup of the database failed
==================== ERROR =========================
RMAN error: See log for details.
Log file is at /usr/lib/oracle/xe/oxe_backup_current.log.
Press ENTER key to exit
14/53
15. ¿Realmente es tan fácil?
oracle@oraculo:~/app/oracle/product/10.2.0/server/config/scripts> ./backup.sh
Warning: Log archiving (ARCHIVELOG mode) is currently disabled. If
you restore the database from this backup, any transactions that take
place between this backup and the next backup will be lost. It is
recommended that you enable ARCHIVELOG mode before proceeding so
that all transactions can be recovered upon restore. See the section
'Enabling ARCHIVELOG Mode...' in the online help for instructions.
Backup with log archiving disabled will shut down and restart the
database. Are you sure [Y/N]? y
Backup in progress...
Backup of the database succeeded.
Log file is at /usr/lib/oracle/xe/oxe_backup_current.log.
Press ENTER key to exit
No reproducible en XE 11.2
15/53
16. Manual vs RMAN
• ¿Cuánto ocupa el respaldo generado por RMAN?
oracle@oraculo:~> du -hs oradata/XE
1.5G .oradata/XE
oracle@oraculo:~> ls -lrt
/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_06_03/
total 1176688
-rw-r----- 1 oracle dba 1203748864 2010-06-03 00:57
o1_mf_nnndf_TAG20100603T005534_60g9xpkz_.bkp
16/53
17. Manual vs RMAN
• ¿Cuánto ocupa el respaldo generado por RMAN?
=> RMAN no respalda temp, redo logs, ni bloques libres !
01:41:16 XE>select sum(bytes)/1024/1024 mb
from dba_free_space;
MB
----------
135.8125
1.5G datafiles
1.1G rman
17/53
18. Manual vs RMAN
Puede ocupar menos si es comprimido
Dos formas para hacerlo:
– Backup as compressed backupset ...
– CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED
BACKUPSET;
-rw-r----- 1 oracle dba 1203986432 2010-06-03 01:31
o1_mf_nnndf_TAG20100603T013020_60gcywnl_.bkp
-rw-r----- 1 oracle dba 235642880 2010-06-03 01:38
o1_mf_nnndf_TAG20100603T013720_60gdd066_.bkp
Pasó de 1.1G a 200M (a costo de usar más CPU)
18/53
19. Manual vs RMAN
Cuidado con XE : backup.sh no genera respaldo comprimido.
rman target /
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET;
exit;
./backup.sh
rman target /
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;
exit
./backup.sh
ls -lrt
/usr/lib/oracle/xe/app/oracle/flash_recovery_area/XE/backupset/2010_06_03/
-rw-r----- 1 oracle dba 1203748864 2010-06-03 00:57
o1_mf_nnndf_TAG20100603T005534_60g9xpkz_.bkp
-rw-r----- 1 oracle dba 1203986432 2010-06-03 01:31
o1_mf_nnndf_TAG20100603T013020_60gcywnl_.bkp
19/53
20. Manual vs RMAN
Extracto de backup.sh:
echo "Backup in progress..."
rman target / >> $rman_backup << EOF
set echo on;
shutdown immediate;
startup mount;
configure retention policy to redundancy 2;
configure controlfile autobackup format for device type disk clear;
configure controlfile autobackup on;
sql "create pfile=''$rman_spfile2init'' from spfile";
backup as backupset device type disk database;
configure controlfile autobackup off;
alter database open;
delete noprompt obsolete;
EOF
20/53
21. Manual vs RMAN
Para que comprima, backup.sh debe modificarse:
echo "Backup in progress..."
rman target / >> $rman_backup << EOF
set echo on;
shutdown immediate;
startup mount;
configure retention policy to redundancy 2;
configure controlfile autobackup format for device type disk clear;
configure controlfile autobackup on;
sql "create pfile=''$rman_spfile2init'' from spfile";
backup as compressed backupset device type disk database;
configure controlfile autobackup off;
alter database open;
delete noprompt obsolete;
EOF
21/53
22. ¿Compresión con XE?
•
No es tan necesario porque el máximo de
datos manejados es 11gb.
•
backup.sh usa redundancia 2.
Cambiarlo de acuerdo a nuestra
política.
22/53
23. Archivos usados y generados
• ¿Qué generó?
• List backup;
• ¿Qué archivos respalda?
• datafiles (e image copies)
• controlfiles (e image copies)
• archivelog
• spfile
• Por lo tanto, no respalda:
• redo logs, tempfiles (no son necesarios para recovery)
• archivos de tablas externas o bfiles
• binarios de la instalación
• archivos configuración de red
23/53
27. ¿Hay que seguir sin usar RMAN?
• NO.
• Mientras, plan de empezar a corto plazo
• ¿Por qué?
– Solución uniforme: interfaz idéntica en
distintos sistemas operativos
– Usa menos recursos y genera archivos más
chicos.
– Funcionalidades no disponibles de forma
manual:
27/53
28. Hay que usar RMAN
• Respaldos incrementales : respaldos más chicos,
recuperación más rápida (sólo almacena los cambios)
• Block media recovery: repara datafile sin ponerlo offline
• Unused block compression: no copia bloques libres
• Compresión (bzip2 y zlib)
• Encriptación
• Repositorio de respaldos (catálogo)
• Detecta corrupción lógica y física
• Backup optimization: no copia archivos existentes
idénticos en destino
28/53
29. Mejoras en 11.1
• Data Recovery Advisor
• Mejor integración con DG: configuración y catálogo
• Mejorado el uso de backups congelados (BACKUP .. KEEP): no necesitan archived logs posteriores
• Uso de archived logs de otros destinos cuando no existen en la FRA y se necesitan respaldar
• Mejoras a política de borrado de archivelogs: con standby no se borran de FRA si no fueron transferidos.
• Clonación de base ACTIVA (sin usar respaldos)
• Virtual private catalogs
• Respaldo en paralelo de archivos grandes, usando nuevo parámetro SECTION SIZE
• Undo optimization: no se respaldan segmentos de transacciones que ya comitearon
• Block Media Recovery Performance Improvements, usando flashback logs si están disponibles
• Mejorada detección de bloques corruptos, incluyendo nuevas opciones al comando VALIDATE: BLOCK y
DATABASE.
• Compresión más rápida con la incorporación del algoritmo ZLIB además del BZIP2 existente.
• Block change tracking soportado en standby física
• Soporte a variables de sustitución en scripts almacenados
• Soporte para tablespaces transportables readonly
• Detección de escrituras perdidas mejorado, usando parámetro DB_LOST_WRITE_PROTECT y dataguard
• Parámetro DB_ULTRA_SAFE
• Recovery más rápido usando algoritmo de paralelismo mejorado y optimizado para multi-procesadores
29/53
30. Mejoras en 11.2
• Oracle Secure Backup (OSB) Cloud Module
• Mejoras al comando DUPLICATE Database:
– sin conexión a la base origen, opcionalmente al catálogo
– si hay tablespaces excluidos, valida que no incluya objetos de sys
• Mejoras a Tablespace Point-in-Time Recovery (TSPITR): puede recuperar
tablespace borrados, y repetir la operación
• Automatic Block Repair usando standby física
• Nueva opción del comando SET NEWNAME: variables de sustitución (%b)
• Nueva opción SKIP UNNECESSARY DATAFILES al comando CONVERT
DATABASE
• Mejoras en algoritmos de compresión con niveles HIGH, MEDIUM, LOW
(Advanced Compression Option)
• Nuevo opción INCARNATION en los comandos BACKUP, RESTORE, y LIST
• Nueva opción TO DESTINATION del comando BACKUP, usada ademaś por la
funcionalidad de optimización
30/53
31. Hay que usar RMAN
• Usarlo implica:
– practicar recovery
– tener presente que archivos no son
transportables entre plataformas
• ej : Respaldo tomado en x32 no se
puede restaurar en x86_64.
– bugs (cada vez menos)
31/53
32. Pasos para empezar a usarlo
• definir política
– nivel de servicio aceptable
– retención
– destino
– nombres
– paralelismo
– tamaños máximos de archivos
– uso de encriptación
32/53
33. Primeros pasos
• crear script de configuración
– recovery puede ser en otro equipo
• implementar scripts completos
– Respaldar
– Borrar obsoletos
– Listar catalogo (documentación)
– Detectar errores
• validar que respaldos sean útiles
33/53
34. Escenarios de recovery
* 2 básicos:
completo y de tablespace
* 12 avanzados:
Recovering After the Loss of Datafiles: Scenarios
Recovering Through an Added Datafile with a Backup Control File: Scenario
Re-Creating Datafiles When Backups Are Unavailable: Scenario
Recovering Through RESETLOGS with Created Control File: Scenario
Recovering NOLOGGING Tables and Indexes: Scenario
Recovering Read-Only Tablespaces with a Backup Control File: Scenario
Recovering Transportable Tablespaces: Scenario
Recovering After the Loss of Online Redo Log Files: Scenarios
Recovering After the Loss of Archived Redo Log Files: Scenario
Recovering from a Dropped Table: Scenario
Performing Media Recovery in a Distributed Environment: Scenario
34/53
35. Ejemplos de recovery
* recuperar un respaldo completo
RMAN> STARTUP MOUNT;
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
RMAN> ALTER DATABASE OPEN;
* recuperar solo un tablespace
RMAN> SQL 'ALTER TABLESPACE mytbs OFFLINE IMMEDIATE';
RMAN> RESTORE TABLESPACE mytbs;
RMAN> RECOVER TABLESPACE mytbs;
RMAN> SQL 'ALTER TABLESPACE mytbs ONLINE';
35/53
36. Primeros pasos
• validar que respaldos sean útiles
– cintas sin errores
– integridad de datos
• física: backup validate database ...
• lógica + física:
– backup blocks all check logical validate database;
– select * from V$DATABASE_BLOCK_CORRUPTION;
– por defecto, backup valida checksum de
bloques al escribir en destino (física)
36/53
37. Sólo en enterprise
1. allocate parallel disk channels
2. block change tracking
37/53
38. Cuando hay errores
• Manuales : http://otn.oracle.com
• Soporte : http://support.oracle.com
• Debugear
rman target / log rman.log trace rman.trc
run{
allocate channel t1 type sbt………trace=2;
allocate channel t2 type sbt………trace=2;
allocate channel t3 type sbt………trace=2;
debug on;
restore database;
debug off;
}
38/53
39. Cuando hay errores
• Media manager (MML) es de terceros
• Genera sbtio.log
• Simular uso y comparar:
run {
allocate channel t1 type sbt parms
'SBT_LIBRARY=oracle.disksbt,ENV=(BACK
UP_DIR=d:temp)' trace=2;
backup database;
}
39/53
40. Optimizar backups
- usar async IO (configuración en S.O.)
- paralelismo adecuado (channels) a cantidad de
cintas usadas por controladora
- revisar desempeño de MML
- se puede afinar conociendo la arquitectura de
procesos RMAN:
RMAN Backup Performance [ID 360443.1]
40/53
41. Optimizar recovery
• Scripts se ejecutan serial.
• Esto no es performante:
run {
allocate channel t1 type sbt....;
allocate channel t2 type sbt....;
allocate channel t3 type sbt....;
restore datafile 2;
restore datafile 3;
restore datafile 5;
restore datafile 7;
restore datafile 11;
}
41/53
42. Optimizar recovery
• Esto sí:
run {
allocate channel t1 type sbt....;
allocate channel t2 type sbt....;
allocate channel t3 type sbt....;
restore datafile 2,3,5,7,11;
}
42/53
43. ¿Tiempo para ejemplos?
• Clonación clásica
• Clonación online (> 11.1)
• Clonación RAC
• Data Recovery Advisor
43/53
44. Clonación clásica
• configurar ambiente de base destino
– db_file_name_convert y log_file_name_convert
• reinicar base destino en modo nomount
• obtener SCN a restaurar. Varias formas. Una posible:
select next_change#
from v$archived_log
where recid = (select max(recid) from v$archived_log
where backup_count>0);
• clonar (ejecutando en servidor destino)
rman catalog rman/clave@rman target sys/clave@origen
connect auxiliary /
run {
allocate auxiliary channel dupdb1 type disk;
set until scn $MAX_SCN;
duplicate target database to COPIA NOFILENAMECHECK;
}
• quitar archivelog en base clonada
44/53
45. Clonación online (> 11.1)
• Caso simple, usando mismos paths
en origen y destino :
rman nocatalog target sys/clave@origen
connect AUXILIARY sys/clave@copia
run {
DUPLICATE TARGET DATABASE TO 'COPIA'
FROM ACTIVE DATABASE;
}
exit;
45/53
46. Clonación RAC
• Notas 452868.1 y 461479.1
• Cambios a clonación single instance
– pfile base destino como single instance
– Se clona igual que single instance
– Cambiar parámetros pfile, agregar RAC
• control_files, cluster_database
– Reiniciar
– Configurar en todos los nuevos nodos
– Ajustes finales
• Tnsnames.ora
• Registrar en CRS
46/53
47. Data Recovery Advisor
• Caso : pérdida de datafile
rm /u01/app/oracle/oradata/test11/users01.dbf
oracle@test:/u01/app/oracle/oradata/test11> rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 3 14:07:35 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: TEST11 (DBID=3428713062)
RMAN> validate database;
Starting validate at 03-JUN-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=68 device type=DISK
RMAN-06169: could not read file header for datafile 4 error reason 5
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of validate command at 06/03/2010 14:07:50
RMAN-06056: could not access datafile 4
47/53
48. Data Recovery Advisor
RMAN> list failure; Mandatory Manual Actions
========================
List of Database Failures
========================= no manual actions available
Failure ID Priority Status Time Detected Summary
Optional Manual Actions
---------- -------- --------- ------------- -------
122 HIGH OPEN 03-JUN-10 One or more non-system =======================
datafiles are missing 1. If file /u01/app/oracle/oradata/test11/users01.dbf was
unintentionally renamed or moved, restore it
RMAN> advise failure all;
Automated Repair Options
List of Database Failures ========================
=========================
Option Repair Description
Failure ID Priority Status Time Detected Summary ------ ------------------
---------- -------- --------- ------------- ------- 1 Restore and recover datafile 4
122 HIGH OPEN 03-JUN-10 One or more non-system
datafiles are missing
Strategy: The repair includes complete media recovery
with no data loss
analyzing automatic repair options; this may take some time Repair script:
using channel ORA_DISK_1 /u01/app/oracle/diag/rdbms/test11/test11/hm/reco_2784
analyzing automatic repair options complete 754173.hm
48/53
49. Data Recovery Advisor
• El repair script tiene : Mandatory Manual Actions
========================
# restore and recover datafile
1. If file /u01/app/oracle/oradata/test11/users01.dbf
sql 'alter database datafile 4 offline'; was unintentionally renamed or moved, restore it
restore datafile 4; 2. If you have an export of tablespace USERS, then
recover datafile 4; drop and re-create the tablespace and import the
data.
sql 'alter database datafile 4 online';
3. Contact Oracle Support Services if the preceding
recommendations cannot be used, or if they do not
fix the failures selected for repair
• Esto es porque hay un respaldo
catalogado disponible. Si no Optional Manual Actions
hubiera : =======================
analyzing automatic repair options; this no manual actions available
may take some time
using channel ORA_DISK_1 Automated Repair Options
analyzing automatic repair options ========================
complete no automatic repair options available
49/53
50. Data Recovery Advisor
RMAN> repair failure; channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
Strategy: The repair includes complete media recovery with channel ORA_DISK_1: restoring datafile 00004 to
/u01/app/oracle/oradata/test11/users01.dbf
no data loss
channel ORA_DISK_1: reading from backup piece
Repair script: /u01/app/oracle/flash_recovery_area/TEST11/backupset/2010_06_03/o1_mf
/u01/app/oracle/diag/rdbms/test11/test11/hm/reco_3604648805.hm
_nnndf_TAG20100603T140513_60hr69ob_.bkp
channel ORA_DISK_1: piece
contents of repair script: handle=/u01/app/oracle/flash_recovery_area/TEST11/backupset/2010_06_0
3/o1_mf_nnndf_TAG20100603T140513_60hr69ob_.bkp
# restore and recover datafile
tag=TAG20100603T140513
sql 'alter database datafile 4 offline'; channel ORA_DISK_1: restored backup piece 1
restore datafile 4; channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
recover datafile 4; Finished restore at 03-JUN-10
sql 'alter database datafile 4 online';
Starting recover at 03-JUN-10
Do you really want to execute the above repair (enter YES or using channel ORA_DISK_1
NO)? yes
executing repair script starting media recovery
media recovery complete, elapsed time: 00:00:00
sql statement: alter database datafile 4 offline
Finished recover at 03-JUN-10
Starting restore at 03-JUN-10 sql statement: alter database datafile 4 online
using channel ORA_DISK_1 repair failure complete
50/53
51. ¿Siguientes pasos?
• Ejercitar escenarios separando roles
de DBA's
• Usar Enterprise Manager
• Data Recovery Advisor
51/53