Hot (Snap)Shots! Der Master aller Datenbanken. DB Clonen, nicht kleckern...



Similar documents
Oracle Cloud Storage and File system

Top 10 Things You Always Wanted to Know About Automatic Storage Management But Were Afraid to Ask

<Insert Picture Here> Oracle Cloud Storage. Morana Kobal Butković Principal Sales Consultant Oracle Hrvatska

CommVault Simpana 7.0 Software Suite. und ORACLE Momentaufnahme. Robert Romanski Channel SE

Use RMAN to relocate a 10TB RAC database with minimum downtime. Tao Zuo tao_zuo@npd.com NPD Inc. 9/2011

An Oracle White Paper July Oracle ACFS

<Insert Picture Here> Managing Storage in Private Clouds with Oracle Cloud File System OOW 2011 presentation

ORACLE CORE DBA ONLINE TRAINING

Safe Harbor Statement

TECHNICAL REPORT. Nimble Storage Oracle Backup and Recovery Guide

Microsoft Nano Server «Tuva» Rinon Belegu

Oracle 11g: RAC and Grid Infrastructure Administration Accelerated R2

Ultimate Guide to Oracle Storage

Update to V10. Automic Support: Best Practices Josef Scharl. Please ask your questions here Event code 6262

RMAN BACKUP & RECOVERY. Recovery Manager. Veeratteshwaran Sridhar

Exadata for Oracle DBAs. Longtime Oracle DBA

Highly Available NFS over Oracle ASM Cluster File System (ACFS)

BrightStor ARCserve Backup

SAP with Oracle Real Application Clusters 11g Release 2 and Oracle Automatic Storage Management 11g Release 2

ASM and for 3rd Party Snapshot Solutions - for Offhost. Duane Smith Nitin Vengurlekar RACPACK

IBRIX Fusion 3.1 Release Notes

High Availability Databases based on Oracle 10g RAC on Linux

Oracle Database Cross Platform Migration Lucy Feng, DBAK

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue

Servermigrationen zu Hyper-V / Azure mit Double-Take Move

ORACLE DATABASE HIGH AVAILABILITY STRATEGY, ARCHITECTURE AND SOLUTIONS

What s New with Oracle Database 12c on Windows On-Premises and in the Cloud

AnyWeb AG

Oracle Database Backups and Disaster Autodesk

Using RMAN to restore a database to another server in an ASM environment

Innova&ve IT Solu&ons. Oracle ACFS / Cloud File System. Unleash your Business- criacal ApplicaAons. Ma#hias Pölzinger Senior Consultant

Oracle Database 12c Recovery Manager New Features

Oracle Database 12c. Peter Schmidt Systemberater Oracle Deutschland BV & CO KG

Key Factors For a Successful ODA Deployment

The safer, easier way to help you pass any IT exams. Exam : 1Z Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP.

Oracle Database Public Cloud Services

Oracle Snap Management Utility for Oracle Database v1.2.0 User Guide

How to Migrate your Database to Oracle Exadata. Noam Cohen, Oracle DB Consultant, E&M Computing

HOW TO. RMAN Restore for Standby 10gR2

Best Practices White Paper Using Oracle Database 11g R2 Automatic Storage Management with FUJITSU Storage (Windows version)

Oracle Storage Options

MapGuide Open Source Repository Management Back up, restore, and recover your resource repository.

SPICE auf der Überholspur. Vergleich von ISO (TR) und Automotive SPICE

Using HP StoreOnce Backup systems for Oracle database backups

Backing Up Oracle Databases with Handy Backup

SnapManager for Oracle 2.2. Anand Ranganathan Product & Partner Engineer (PPE)

Database Virtualization Technologies

Enterprise User Security

Oracle Backup and Recovery Best Practices Dell Compellent Storage Center. Dell Compellent Technical Best Practices

Upgrading Your Skills to MCSA Windows Server 2012 MOC 20417

How to Best Configure, Size, and Monitor the Oracle Database Fast Recovery Area

Advanced Oracle DBA Course Details

12. User-managed and RMAN-based backups.

An Oracle White Paper June Enterprise Manager Cloud Control 12c Disaster Recovery with Storage Replication

How to Backup XenServer VM with VirtualIQ

Oracle 12c Multitenant and Encryption in Real Life. Christian Pfundtner

Brauche neues Power Supply

1Copyright 2013, Oracle and/or its affiliates. All rights reserved.

Disaster Recovery of Oracle Database Standard Edition (SE) and Standard Edition One (SE1) on Dell EqualLogic PS Series iscsi Storage Systems

Why Not Oracle Standard Edition? A Dbvisit White Paper By Anton Els

Symantec Backup Exec 2014 Icon List

Die Versant-DB ist ein wesentlicher Bestandteil von CADISON.

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

Use of DB2 purescale with SAP Applications

EMC MIGRATION OF AN ORACLE DATA WAREHOUSE

Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery

Lessons Learned while Pushing the Limits of SecureFile LOBs. by Jacco H. Landlust. zondag 3 maart 13

Exchange Synchronization AX 2012

QAS DEBUG - User und Computer

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu

Hardware and Software Engineered to Work Together

Oracle MulBtenant Customer Success Stories

Oracle Data Recovery Advisor

Reference Architecture for HP Data Protector and Oracle 11gR2 RAC on Linux

Oracle Database 11g R1 & R2: New Features for Administrators

Designing and Implementing a Server Infrastructure MOC 20413

An Oracle White Paper May, Deploying a Highly Available Enterprise Manager 12c Cloud Control

EMC Replication Manager Integration with Oracle Database Server

EMC ViPR Controller. Service Catalog Reference Guide. Version 2.3 XXX-XXX-XXX 01

estos uacsta Server for SIP Phones

OCP: Oracle Database 12c Administrator Certified Professional Study Guide. Exam 1Z0-063

Why and How You Should Be Using Policy-Managed RAC Databases

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups

How you configure Iscsi target using starwind free Nas software & configure Iscsi initiator on Oracle Linux 6.4

Oracle Database 10g: Administration Workshop II Release 2

11. Oracle Recovery Manager Overview and Configuration.

Backup and Recovery Solutions for Exadata. Ľubomír Vaňo Principal Sales Consultant

VMware Mirage Centralized Desktop Management with local Execution

SOUG-SIG Data Replication With Oracle GoldenGate Looking Behind The Scenes Robert Bialek Principal Consultant Partner

Oracle DBA Course Contents

Oracle Database Cloud Service Lösungen und Strategien. Paul Wehner, Senior Director Sales Consulting, Oracle Frankfurt

Oracle TDE Tablespace Encryption

Oracle Recovery Manager 10g. An Oracle White Paper November 2003

Oracle vs. SQL Server. Simon Pane & Steve Recsky First4 Database Partners Inc. September 20, 2012

About the Author About the Technical Contributors About the Technical Reviewers Acknowledgments. How to Use This Book

Open Systems SnapVault (OSSV) Best Practices Guide

Transcription:

Hot (Snap)Shots! Der Master aller Datenbanken. DB Clonen, nicht kleckern... Sebastian Solbach BU Datenbank, ORACLE Deutschland B.V. Co. KG Month 11, 2015

Agenda 1 2 3 4 Klonen von Datenbanken 12c ASM Cluster Filesystem Pluggable Databases auf ACFS & ACFS Snapshots Snapshot von 12c noncdb und 11.2.0.4 Datenbanken 3

Warum Datenbank Cloning? Test Backup & Recovery Test Upgrade auf ein neues Datenbank-Release Test Applikationen & Datenbank Performance Anlegen von Standby Datenbanken Reporting Gold Image Cloning... und vieles mehr... 4

Agenda 1 2 3 4 Klonen von Datenbanken 12c ASM Cluster Filesystem Pluggable Databases auf ACFS & ACFS Snapshots Snapshot von 12c noncdb und 11.2.0.4 Datenbanken 5

ASM Cluster Filesystem ACFS Generelles modernes, POSIX kompatibles Filesystem Basiert auf ASM Dynamic Volumes (ADVM) Extent basierend & Journaling NFS / CIFS Export möglich (mit 12c HA NFS) Integriert in die 12c Grid Infrastruktur Oracle Cluster Oracle Restart (Vorsicht: Kein Automount) 6

ASM Überblick Oracle Database Operating System Oracle Database ASM File System Logical Volume Manager Operating System Server Server

ASM Überblick Datendateien Redolog Controlfile Oracle Datenbank (oracle Executable) SPFile Passwordfile

ASM Überblick Compatibility Level

ASM Dynamic Volumes Neuer Filetyp in ASM (wie eine Datendatei): ASMVOL Verwaltet mit ASMCMD, ASMCA, Enterprise Manager Dynamisch ladbarer Kerneltreiber Erzeugen eines Device Files Linux: /dev/asm/acfsdata-207 Windows: \\.\acfsfra-345 Volume Betriebssystem 10

ACFS/ASM/AOKS auf Exadata 11

Automatic Storage Management Administrator's Guide Features Enabled By Disk Group Compatibility Attribute Settings COMPATIBLE.ASM > 12.1 Replication Status of Diskgroup Managing a shared password file in a disk group + COMPATIBLE.RDBMS > 12.1 Greater than 2 TB Oracle ASM disks without Oracle Exadata storage + COMPATIBLE.ADVM > 12.1.0.2 Storing database data files and redo logs in Oracle ACFS file systems Support for 1023 snapshots Accelerator volume for Oracle ACFS file system 12

ASM Dynamic Volume Redundancy: Default = ASM Diskgroup Redundancy Stripe Columns Stripe Width 12c geänderter Default: Datenbanken 1M = Allocation Unit 13

ASM Dynamic Volume ASMCMD> volinfo --all Diskgroup Name: DATA Volume Name: ACFSDATA Volume Device: /dev/asm/acfsdata-207 State: ENABLED Size (MB): 16384 Resize Unit (MB): 64 Redundancy: UNPROT Stripe Columns: 8 Stripe Width (K): 1024 Usage: ACFS Mountpath: /u01/app/oracle/oradata 14

Create ASM Cluster Filesystem Type: Local Node Cluster Datenbank braucht Cluster Filesystem 15

ASM Cluster Filesystem im Cluster $ crsctl stat res -t -init -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Cluster Resources --------------------------------------------------------------------------------... ora.drivers.acfs 1 ONLINE ONLINE bumucsvm1 STABLE 16

ASM Cluster Filesystem im Cluster $ crsctl stat res -t -------------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------------- ora.data.acfsdata.advm ONLINE ONLINE bumucsvm1 Volume device /dev/asm/acfsdata-207 is online,stable ONLINE ONLINE bumucsvm2 STABLE ora.data.dg ONLINE ONLINE bumucsvm1 STABLE ONLINE ONLINE bumucsvm2 STABLE ora.data.acfsdata.acfs ONLINE ONLINE bumucsvm1 mounted on /u01/app/oracle/oradata,stable ONLINE ONLINE bumucsvm2 mounted on /u01/app/oracle/oradata,stable ora.proxy_advm ONLINE ONLINE bumucsvm1 STABLE ONLINE ONLINE bumucsvm2 STABLE --------------------------------------------------------------------------------------- 17

ASM Cluster Filesystem im Cluster # acfsutil info fs /u01/app/oracle/oradata /u01/app/oracle/oradata ACFS Version: 12.1.0.2.0 on-disk version: 42.0 flags: MountPoint,Available mount time: Thu May 21 18:52:34 2015 allocation unit: 4096 volumes: 1 total size: 17179869184 ( 16.00 GB ) total free: 11350839296 ( 10.57 GB ) file entry table allocation: 1097728 primary volume: /dev/asm/acfsdata-207 label: state: Available major, minor: 250, 105985 size: 17179869184 ( 16.00 GB ) free: 11350839296 ( 10.57 GB ) ADVM diskgroup DATA ADVM resize increment: 67108864 ADVM redundancy: unprotected ADVM stripe columns: 8 ADVM stripe width: 1048576 number of snapshots: 0 snapshot space usage: 0 ( 0.00 ) replication status: DISABLED 18

Agenda 1 2 3 4 Klonen von Datenbanken 12c ASM Cluster Filesystem Pluggable Databases auf ACFS & ACFS Snapshots Snapshot von 12c noncdb und 11.2.0.4 Datenbanken 19

Datenbanken: Warum auf ACFS? Schneller Clone (Read Only Time verringern) Read/Write Clone mit Orginal kann weitergearbeitet werden Platzsparend Kostengünstig (Snapshot braucht nur Enterprise Edition) Annähernd gleiche Performance wie ASM Filesystem! 20

ACFS Lizenzierung Oracle ACFS Features Oracle Database Files Non-Oracle Database Files ACFS features other than those listed below FREE FREE Snapshots Oracle DB EE required FREE Encryption Not Available FREE Security Not Available FREE Replication Not Available FREE Auditing Not Available FREE 21

12.1.0.2 Pluggable Datenbanken Cloning Einfaches Cloning von 12c Pluggable Datenbanken (PDBs) PDB in Read Only Status setzen SQL> alter pluggable database spdb open read only; PDB Clone anlegen SQL> create pluggable database s2pdb from spdb; PDB Snapshot Clone anlegen SQL> create pluggable database s2pdb from spdb snapshot copy; 22

ASM Cluster Filesystem im Cluster # acfsutil info fs /u01/app/oracle/oradata /u01/app/oracle/oradata ACFS Version: 12.1.0.2.0 on-disk version: 43.0 flags: MountPoint,Available mount time: Thu May 21 18:52:34 2015 allocation unit: 4096 volumes: 1 total size: 17179869184 ( 16.00 GB ) total free: 11257479168 ( 10.48 GB ) file entry table allocation: 1097728 primary volume: /dev/asm/acfsdata-207 label: state: Available major, minor: 250, 105985 size: 17179869184 ( 16.00 GB ) free: 11257479168 ( 10.48 GB ) ADVM diskgroup DATA ADVM resize increment: 67108864 ADVM redundancy: unprotected ADVM stripe columns: 8 ADVM stripe width: 1048576 number of snapshots: 1 snapshot space usage: 28811264 ( 27.47 MB ) replication status: DISABLED 23

Snaptshot Clone Directory Structure ACFS Root (oradata) CDB_ROOT SPDB datafile NEW PDB datafile Symlink.ACFS/snaps NEW PDB/SCDB/SPDB/datafile 24

Snapshot Clone SQL> select * from v$pdbs; CON_ID GUID NAME OPEN_MODE RES ---------- -------------------------------- -------------------- ---------- --- OPEN_TIME CREATE_SCN TOTAL_SIZE BLOCK_SIZE RECOVERY SNAPSHOT_PARENT_CON_ID ---------- ---------- ---------- ---------- -------- ---------------------- 3 16A0C7F3EA950D21E05370F4A50A9346 SPDB READ ONLY NO 15-JUN-15 1476617 943718400 8192 ENABLED 0 4 18943D57D3410C0BE05371F4A50A5C6D S2PDB MOUNTED 15-JUN-15 4690778 0 8192 ENABLED 0 25

Snapshot Clone # ll drwxr-x--- 3 oracle oinstall 8192 May 22 01:20 16A0C7F3EA950D21E05370F4A50A9346 drwxr-x--- 3 oracle asmadmin 8192 Jun 15 21:14 18943D57D3410C0BE05371F4A50A5C6D # # ll 18943D57D3410C0BE05371F4A50A5C6D/datafile lrwxrwxrwx 1 oracle asmadmin 142 Jun 15 21:14 o1_mf_sysaux_bqy909kw_.dbf -> /u01/app/oracle/oradata/.acfs/snaps/18943d57d3410c0be05371f4a50a5c6d/scdb/16a0c 7F3EA950D21E05370F4A50A9346/datafile/o1_mf_sysaux_bowt1yln_.dbf lrwxrwxrwx 1 oracle asmadmin 142 Jun 15 21:14 o1_mf_system_bqy909gr_.dbf -> /u01/app/oracle/oradata/.acfs/snaps/18943d57d3410c0be05371f4a50a5c6d/scdb/16a0c 7F3EA950D21E05370F4A50A9346/datafile/o1_mf_system_bowt1yfj_.dbf -rw-r----- 1 oracle asmadmin 20979712 Jun 15 21:14 o1_mf_temp_bqy909ly_.dbf lrwxrwxrwx 1 oracle asmadmin 141 Jun 15 21:14 o1_mf_users_bqy909m4_.dbf -> /u01/app/oracle/oradata/.acfs/snaps/18943d57d3410c0be05371f4a50a5c6d/scdb/16a0c 7F3EA950D21E05370F4A50A9346/datafile/o1_mf_users_bowtbxb7_.dbf 26

ACFS Verzeichnis Hidden [root@bumucsvm1 oradata]# ll total 96 drwx------ 2 root root 65536 May 21 18:52 lost+found drwxr-x--- 2 oracle oinstall 8192 May 22 01:13 scdb drwxr-x--- 8 oracle oinstall 8192 Jun 15 21:14 SCDB # cd.acfs [root@bumucsvm1.acfs]# ll total 8 drwxrwx--- 6 root root 4096 May 21 18:52 repl drwxr-xr-x 3 root root 4096 Jun 15 21:14 snaps 27

ACFS Informationen SNAPShot # acfsutil snap info /u01/app/oracle/oradata snapshot name: 18943D57D3410C0BE05371F4A50A5C6D snapshot location: /u01/app/oracle/oradata/.acfs/snaps/18943d57d3410c0be05371f4a50a5c6d RO snapshot or RW snapshot: RW parent name: /u01/app/oracle/oradata snapshot creation time: Mon Jun 15 21:14:18 2015 number of snapshots: 1 snapshot space usage: 415596544 ( 396.34 MB ) 28

ASM Cluster File System V$Views V$ASM_FILESYSTEM V$ASM_ACFSVOLUMES V$ASM_ACFSSNAPSHOTS V$ASM_ACFS_SECURITY_INFO V$ASM_ACFS_ENCRYPTION_INFO

Entfernen der PDB Drop der PDB: SQL> drop pluggable database s2pdb including datafiles; Pluggable database dropped. Snapshot wird gelöscht: # acfsutil snap info /u01/app/oracle/oradata number of snapshots: 0 (active) 1 (delete pending) snapshot space usage: 1097728 ( 1.04 MB ) Problem: Wenn man sich im.acfs/snap Folder sich befindet... # acfsutil snap delete t 18943D57D3410C0BE05371F4A50A5C6D /u01/app/oracle/oradata 30

Best Practices Eigenes ACFS Filesystem für Datenbank oder PDB: Restriktion auf 1023 Snapshots Größe der Snapshots Verwaltung/Identifikation der Snapshots 31

Agenda 1 2 3 4 Klonen von Datenbanken 12c ASM Cluster Filesystem Pluggable Databases auf ACFS & ACFS Snapshots Snapshot von 12c noncdb und 11.2.0.4 Datenbanken 32

gdbclone Database Snapshot Management Script Perl Skript zum: Klonen von Datenbanken Von ASM nach ACFS Remote oder Lokal Erzeugen von DB-Snapshots (lokal) Löschen von DBs http://www.oracle.com/technetwork/indexes/samplecode/gdbclone-download- 2295388.html 33

gdbclone Remote zu Lokal (Clone) Lokal zu Lokal ASM/FS ASM ASM/FS ACFS ASM/FS ACFS ACFS SNAP SNAP SNAP 34

gdbclone #./gdbclone Usage: gdbclone clone -sdbname <source DB name> -sdbhost <source DB Host SCAN name> -sbckloc '<backup>' -tdbname <Target Database Name> -acfs <acfs mount point> [ -sdbport <Source DB SCAN Listener Port> ] [ -tdbport <Target DB SCAN Listener Port> ] [ -syspw <Source DB SYSDBA Password> ] [-racmod <db type> ] gdbclone snap -sdbname <source DB name> -tdbname <Target Database Name> [ -sdbport <Source DB SCAN Listener Port> ] [ -tdbport <Target DB SCAN Listener Port> ] [ -syspw <Source DB SYSDBA Password> ] [-racmod <db type> ] gdbclone listdb [ -tree ] [ -verbose ] gdbclone deldb -tdbname <database name> [ -force ] 35

DB Clone Database Type Source Target Single Instance Single Instance RACOne Node RACOne Node RAC RAC

RMAN Backup vs. Snapshot 70 Clone Creation Time and DB Size 60 59,23 50 47,23 40 38,35 30 20 10 0 6,17 2,23 2,15 2,2 2,43 5 Gb 25 Gb 35 Gb 45 Gb RMAN Snapshot 37

gdbclone Beispiel clone: Lokal Lokal von ASM auf ACFS ASM/FS ACFS #./gdbclone clone -sdbname ssdb -sdbhost bumucsvm1-scan -tdbname sclone -acfs /u01/app/oracle/oradata 2015-06-15 23:16:57: I Checking source host bumucsvm1-scan... 2015-06-15 23:16:57: I Getting host info... 2015-06-15 23:16:57: I Starting... 2015-06-15 23:16:57: I Validating environment... Enter the source ssdb SYSDBA password: 2015-06-15 23:17:02: I Checking SCAN listener bumucsvm1-scan:1521... 2015-06-16 23:32:29: I Successfully created clone "SCLONE" database 38

gdbclone Beispiel clone: Lokal Lokal von Backup auf ACFS Klone von Backup: Keine Auswirkung auf Produktion RMAN Backup kann auch auf NFS liegen RMAN Full Backup ACFS Hinweis: Bei 12.1 NFS Export mit insecure option #./gdbclone clone -sdbname SSDB -sbckloc /u01/app/oracle/fra/ssdb -tdbname SCLONE -acfs /u01/app/oracle/oradata 39

gdbclone Beispiel snap ACFS SNAP SNAP SNAP #./gdbclone snap -sdbname sclone -tdbname DOAGDB 40

gdbclone listdb #./gdbclone listdb DB Name DB Type DB Role Location/Parent -------- ----------- -------- ---------------- SNAP0 SINGLE Snapshot GOLD SNAP3 RACOneNode Snapshot SNAP1 SNAP4 SINGLE Snapshot SNAP3 SNAP2 RACOneNode Snapshot GOLD SNAP5 SINGLE Snapshot SNAP1 GOLD RAC Master /cloudfs SNAP1 SINGLE Snapshot SNAP0 #./gdbclone listdb -tree Parent Child ------ ----- GOLD SNAP1 SNAP0 SNAP3 SNAP4 SNAP2 SNAP5 41

gdbclone deldb Löscht Datenbank und Snapshot #./gdbclone deldb -tdbname DOAG You are going to drop the database DOAG, are you sure (Y/N)? y Connecting to database 47% complete Updating network configuration files 52% complete Deleting instance and datafiles 76% complete 100% complete Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/snap32.log" for further details. acfsutil snap delete: Snapshot operation is complete. ACFS snapshot SNAP3 on /cloudfs ACFS file system has been deleted. 42

gdbclone Hinweise / Tipps und Tricks Source Datenbank muss im Archivelog Modus sein gdbclone wird als Root ausgeführt Keine Sonderzeichen für den DBNamen verwenden Gegebenfalls DEBUG Funktion verwenden Funktioniert nur mit Administrator Managed DBs! Hidden Commands:./gDBClone listsnap -acfs <acfs_mount_point> [ -tree ]./gdbclone delsnap -snapname <snapshot name> -acfs <acfs_mount_point> 43

gdbclone Debug gdbclone mit debug Option erzeugt Output und Tracefile zur Fehleranalyse gdbclone log/trace file: /var/log/gdbclone/gdbclone.trc Falls die Debug Option verwendet wird, befinden sich unter /tmp/clone einige dynamische Dateien zum Debuggen 44

45