SlideShare a Scribd company logo
OCI – Database
Backups
Flashback – Oracle
Database no OCI
Indo além dos backups
Tércio Costa
TércioCosta
• Cloud Transf & Migration Assoc Manager
• Accenture Enkitec Group
• 12/08/2023
• Linktree:
3
ace.oracle.com
OracleCertifications • Oracle Cloud Data Management 2023 Certified Foundations Associate
• Oracle Base Database Services 2023 Certified Professional
• Oracle Database Cloud Administrator 2023 Certified Professional
• Oracle Cloud Infrastructure 2023 Certified Architect Associate
• Oracle Cloud Infrastructure 2023 Certified Foundations Associate
• Oracle Cloud Infrastructure 2022 Certified Foundations Associate
• Oracle Autonomous Database Cloud 2021 Certified Specialist
• Oracle Cloud Infrastructure Foundations 2021 Certified Associate
• Oracle Certified Expert, Oracle Database 12c: RAC and Grid Infrastructure
Administrator
• Oracle Certified Expert, Oracle Database 12c Maximum Availability
• Oracle Certified Expert, Oracle Database 12c: Data Guard Administrator
• Oracle Database Administration 2019 Certified Professional
• Oracle Cloud Infrastructure 2019 Certified Architect Associate
• Oracle Cloud Infrastructure Foundations 2020 Certified Associate
• Oracle Autonomous Database Cloud 2019 Certified Specialist
• Oracle Database 12c Administrator Certified Associate
• Oracle Database PL/SQL Developer Certified Professional
• Oracle Database SQL Certified Expert
4
ace.oracle.com
3 membership tiers
Connect: @oracleace
Facebook.com/OracleACEs
aceprogram_ww@oracle.com
500+ technical experts
helping peers globally
The Oracle ACE Program recognizes and
rewards community members for their technical and community
contributions to the Oracle community
Nominate
yourself or someone you know:
ace.oracle.com/nominate
For more details on Oracle ACE Program:
ace.oracle.com
Learn more & connect with the Oracle ACE Program
6
Program Details
Nomination
ACEs in Action Blog
Twitter
Facebook
Linkedin
Email
ace.oracle.com
ace.oracle.com/nominate
blogs.oracle.com/ace
@oracleace
The Oracle ACE Program
bit.ly/OracleACEs
ACEprogram_ww@oracle.com
Oracle Database
#
Backup no OCI
7
Native Backup no OCI
Automatic Backups to Object Storage
You can choose schedule and backup retention
Restore:
You can choose from:
– Lastest
– Timestamp
– SCN
Manual Backups
Will NOT be deleted after database is terminated
Backup and Restore Types
8
9
mv2bucket
(OCI) mv2bucket - Oracle
Managed Bucket Content
Manager (Doc ID 2723911.1)
10
Oracle Database
Backup Cloud Module
Oracle Database Backup
Service - FAQ (Doc ID
1640149.1)
Além dos backups
Flashback
11
Flashback Technology
• Perform queries that return past data
• Perform queries that return metadata that shows a detailed history of changes to the database
• Recover tables or rows to a previous point in time
• Automatically track and archive transactional data changes
• Roll back a transaction and its dependent transactions while the database remains online
12
13
How undo works?
Flashback Features
• Oracle Flashback Query
• Oracle Flashback Version Query
• Oracle Flashback Transaction Query
• Oracle Flashback Transaction
• DBMS_FLASHBACK Package
• Oracle Flashback Data Archive
• Oracle Flashback Table
• Oracle Flashback Drop
• Oracle Flashback Database
14
15
Flashback Query
SELECT AS OF
Requirements:
• FLASHBACK Privilege
Example:
SELECT *
FROM employees
AS OF TIMESTAMP
TO_TIMESTAMP('2004-04-04 09:30:00', 'YYYY-MM-
DD HH:MI:SS')
WHERE last_name = 'Chung';
16
Flashback Version Query
VERSIONS BETWEEN { SCN | TIMESTAMP } start
AND end
Pseudocolumns:
• VERSIONS_STARTSCN
• VERSIONS_STARTTIME
• VERSIONS_ENDSCN
• VERSIONS_ENDTIME
• VERSIONS_XID
• VERSIONS_OPERATION
Requirements:
• FLASHBACK Privilege
Example:
SELECT versions_startscn, versions_starttime,
versions_endscn, versions_endtime,
versions_xid, versions_operation,
last_name, salary
FROM employees
VERSIONS BETWEEN TIMESTAMP
TO_TIMESTAMP('2008-12-18 14:00:00', 'YYYY-
MM-DD HH24:MI:SS')
AND TO_TIMESTAMP('2008-12-18 17:00:00',
'YYYY-MM-DD HH24:MI:SS')
WHERE first_name = 'John';
17
Flashback Transaction Query
View:
FLASHBACK_TRANSACTION_QUERY
Requirements:
• SUPPLEMENTAL LOG DATA;
• SUPPLEMENTAL LOG DATA (PRIMARY KEY)
• SUPPLEMENTAL LOG DATA (FOREIGN KEY)
• SELECT ANY TRANSACTION Privilege OR
FLASHBACK AND READ OR SELECT
Example:
SELECT xid, operation, start_scn, commit_scn,
logon_user, undo_sql
FROM flashback_transaction_query
WHERE xid = HEXTORAW('000200030000002D');
18
DBMS_FLASHBACK
Package:
DBMS_FLASHBACK
Requirements:
• EXECUTE ON DBMS_FLASHBACK Privilege
Example:
Example(Procedures):
ENABLE_AT_TIME
ENABLE_AT_SYSTEM_CHANGE_NUMBER
19
Flashback Transaction
Package:
DBMS_FLASHBACK
Requirements:
• EXECUTE ON DBMS_FLASHBACK Privilege
• ALTER DATABASE ADD SUPPLEMENTAL LOG
DATA (PRIMARY KEY) COLUMNS;
• ALTER DATABASE ADD SUPPLEMENTAL LOG
DATA (FOREIGN KEY) COLUMNS;
Example:
Example(Procedures):
• TRANSACTION_BACKOUT
Views:
• DBA_FLASHBACK_TXN_STATE
• DBA_FLASHBACK_TXN_REPORT
20
Flashback Data Archive
Once the undo information is lost, the view of the past is lost also
Privileges:
• FLASHBACK ARCHIVE ADMINISTER
• CREATE FLASHBACK ARCHIVE
• ALTER FLASHBACK ARCHIVE
• DROP FLASHBACK ARCHIVE
• FLASHBACK ARCHIVE object
Package
• DBMS_FLASHBACK_ARCHIVE
Requirements:
• Name of the first tablespace of the Flashback
Data Archive
• Name of the Flashback Data Archive
• Quota (optional)
• Retention time
• Optimize
Views:
• DBA_FLASHBACK_ARCHIVE
• DBA_FLASHBACK_ARCHIVE_TS
• DBA_FLASHBACK_ARCHIVE_TABLES
21
Flashback Table
Privileges:
• FLASHBACK ANY TABLE OR FLASHBACK
OBJECT
• READ or SELECT, INSERT, DELETE,
and ALTER privileges on the table
Requirements:
• ROW MOVEMENT (rowids)
Example:
FLASHBACK TABLE hr.employees TO
TIMESTAMP TO_TIMESTAMP('2013-10-17 09:30:00',
'YYYY-MM-DD HH:MI:SS');
Can flashback to time, scn and restore point.
Flashback the entire table
22
Flashback Drop
Database parameter: recyclebin.
Do not use UNDO!
The table is only renamed on drop!
Privileges:
• DROP
• READ or SELECT and FLASHBACK
Requirements:
• ALTER SYSTEM SET RECYCLEBIN='on'
SCOPE=SPFILE;
Example:
RESTORE TABLE HR.EMPLOYEES TO BEFORE
DROP;
Views:
• RECYCLEBIN
• USER_RECYCLEBIN
• DBA_RECYCLEBIN
• (SHOW RECYCLEBIN)
Restore a dropped table
23
Flashback Database
Use Flashback logs
Offline operation
Privileges:
• SYSDBA, SYSBACKUP OR SYSDG
View:
• V$FLASHBACK_DATABASE_LOG
Requirements:
• FRA Configured (OMF)
• ARCHIVELOG
• ALTER DATABASE FLASHBACK ON;
Parameter:
• DB_FLASHBACK_RETENTION_TARGET
Flashback the entire database!
Flashback Features per Edition
24
SE2 EE EE-ES DBCS SE DBCS EE DBCS EE-HP DBCS EE-EP ExaCS/CC AT
Flashback Query Y Y Y Y Y Y Y Y Y
Flashback Version Query Y Y Y Y Y Y Y Y Y
Flashback Transaction Query N Y Y N Y Y Y Y Y
Flashback Transaction N Y Y N Y Y Y Y N
DBMS_FLASHBACK N Y Y N Y Y Y Y Y
Flashback Data Archive Y Y Y Y Y Y Y Y N
Flashback Table N Y Y N Y Y Y Y Y
Flashback Drop Y Y Y N Y Y Y Y Y
Flashback Database N Y Y N Y Y Y Y N
SE2: Standard Edition 2, EE: Enterprise Edition, EE-ES: Enterprise Edition on Engineered Systems, DBCS: Database Cloud Service, EE-HP: Enterprise Edition - High
Performance, EE-EP - Enterprise Edition - Extreme Performance, ExaCS: Database Exadata Cloud Service, CC: Cloud@Customer, AT: Autonomous
25
Best Pratices
• UNDO RETENTION
• UNDO TABLESPACE SIZE
• ADD SUPPLEMENTAL LOG DATA AT LEAST
• DOT NOT USE TRIGGERS FOR LOG. USE FLASHBACK DATA ARCHIVE!
• CREATE YOUR OWN INDICES ON FLASBACK DATA ARCHIVE BASE TABLES
• ENABLE RECYCLEBIN
• ENABLE FLASHBACK DATABASE
26
FLASHBACK <> DBPITR
• Media recovery
• Time
• Logical <> Physical
• Redo, Undo and Flashback logs <> backupsets and image copies
?
27
Thank You
Ad

More Related Content

Similar to Flashback in OCI (20)

2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...
2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...
2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...
Marcus Vinicius Miguel Pedro
 
DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)
Gustavo Rene Antunez
 
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
NomanKhalid56
 
AUSPC 2013 - Understanding the Five Layers of SharePoint Security
AUSPC 2013 - Understanding the Five Layers of SharePoint SecurityAUSPC 2013 - Understanding the Five Layers of SharePoint Security
AUSPC 2013 - Understanding the Five Layers of SharePoint Security
Michael Noel
 
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Lucas Jellema
 
Improving oracle12c security
Improving oracle12c securityImproving oracle12c security
Improving oracle12c security
Laurent Leturgez
 
Improve oracle 12c security
Improve oracle 12c securityImprove oracle 12c security
Improve oracle 12c security
Laurent Leturgez
 
RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)
Gustavo Rene Antunez
 
SOUG Day Oracle 21c New Security Features
SOUG Day Oracle 21c New Security FeaturesSOUG Day Oracle 21c New Security Features
SOUG Day Oracle 21c New Security Features
Stefan Oehrli
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
Kellyn Pot'Vin-Gorman
 
Oracle 12c Architecture
Oracle 12c ArchitectureOracle 12c Architecture
Oracle 12c Architecture
AmeerpetTrainingOnline
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?
Performance Tuning Corporation
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
Marcin Przepiórowski
 
ora_sothea
ora_sotheaora_sothea
ora_sothea
thysothea
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
Oracle-12c Online Training by Quontra Solutions
 Oracle-12c Online Training by Quontra Solutions Oracle-12c Online Training by Quontra Solutions
Oracle-12c Online Training by Quontra Solutions
Quontra Solutions
 
Oracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceOracle 12c New Features For Better Performance
Oracle 12c New Features For Better Performance
Zohar Elkayam
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
Alex Zaballa
 
Oracle administration classes in mumbai
Oracle administration classes in mumbaiOracle administration classes in mumbai
Oracle administration classes in mumbai
Vibrant Technologies & Computers
 
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1
Satishbabu Gunukula
 
2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...
2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...
2019 - GUOB Tech Day / Groundbreakers LAD Tour - Database Migration Methods t...
Marcus Vinicius Miguel Pedro
 
DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)DBA 101 : Calling all New Database Administrators (PPT)
DBA 101 : Calling all New Database Administrators (PPT)
Gustavo Rene Antunez
 
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
5675212318661411677_TRN4034_How_to_Migrate_to_Oracle_Autonomous_Database_Clou...
NomanKhalid56
 
AUSPC 2013 - Understanding the Five Layers of SharePoint Security
AUSPC 2013 - Understanding the Five Layers of SharePoint SecurityAUSPC 2013 - Understanding the Five Layers of SharePoint Security
AUSPC 2013 - Understanding the Five Layers of SharePoint Security
Michael Noel
 
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Triple C - Centralize, Cloudify and Consolidate Dozens of Oracle Databases (O...
Lucas Jellema
 
Improving oracle12c security
Improving oracle12c securityImproving oracle12c security
Improving oracle12c security
Laurent Leturgez
 
Improve oracle 12c security
Improve oracle 12c securityImprove oracle 12c security
Improve oracle 12c security
Laurent Leturgez
 
RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)
Gustavo Rene Antunez
 
SOUG Day Oracle 21c New Security Features
SOUG Day Oracle 21c New Security FeaturesSOUG Day Oracle 21c New Security Features
SOUG Day Oracle 21c New Security Features
Stefan Oehrli
 
Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?Database 12c is ready for you... Are you ready for 12c?
Database 12c is ready for you... Are you ready for 12c?
Performance Tuning Corporation
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
Marcin Przepiórowski
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
Oracle-12c Online Training by Quontra Solutions
 Oracle-12c Online Training by Quontra Solutions Oracle-12c Online Training by Quontra Solutions
Oracle-12c Online Training by Quontra Solutions
Quontra Solutions
 
Oracle 12c New Features For Better Performance
Oracle 12c New Features For Better PerformanceOracle 12c New Features For Better Performance
Oracle 12c New Features For Better Performance
Zohar Elkayam
 
What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1What’s New in Oracle Database 19c - Part 1
What’s New in Oracle Database 19c - Part 1
Satishbabu Gunukula
 

Recently uploaded (20)

Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Ad

Flashback in OCI

  • 2. Flashback – Oracle Database no OCI Indo além dos backups Tércio Costa
  • 3. TércioCosta • Cloud Transf & Migration Assoc Manager • Accenture Enkitec Group • 12/08/2023 • Linktree: 3 ace.oracle.com
  • 4. OracleCertifications • Oracle Cloud Data Management 2023 Certified Foundations Associate • Oracle Base Database Services 2023 Certified Professional • Oracle Database Cloud Administrator 2023 Certified Professional • Oracle Cloud Infrastructure 2023 Certified Architect Associate • Oracle Cloud Infrastructure 2023 Certified Foundations Associate • Oracle Cloud Infrastructure 2022 Certified Foundations Associate • Oracle Autonomous Database Cloud 2021 Certified Specialist • Oracle Cloud Infrastructure Foundations 2021 Certified Associate • Oracle Certified Expert, Oracle Database 12c: RAC and Grid Infrastructure Administrator • Oracle Certified Expert, Oracle Database 12c Maximum Availability • Oracle Certified Expert, Oracle Database 12c: Data Guard Administrator • Oracle Database Administration 2019 Certified Professional • Oracle Cloud Infrastructure 2019 Certified Architect Associate • Oracle Cloud Infrastructure Foundations 2020 Certified Associate • Oracle Autonomous Database Cloud 2019 Certified Specialist • Oracle Database 12c Administrator Certified Associate • Oracle Database PL/SQL Developer Certified Professional • Oracle Database SQL Certified Expert 4 ace.oracle.com
  • 5. 3 membership tiers Connect: @oracleace Facebook.com/OracleACEs [email protected] 500+ technical experts helping peers globally The Oracle ACE Program recognizes and rewards community members for their technical and community contributions to the Oracle community Nominate yourself or someone you know: ace.oracle.com/nominate For more details on Oracle ACE Program: ace.oracle.com
  • 6. Learn more & connect with the Oracle ACE Program 6 Program Details Nomination ACEs in Action Blog Twitter Facebook Linkedin Email ace.oracle.com ace.oracle.com/nominate blogs.oracle.com/ace @oracleace The Oracle ACE Program bit.ly/OracleACEs [email protected]
  • 8. Native Backup no OCI Automatic Backups to Object Storage You can choose schedule and backup retention Restore: You can choose from: – Lastest – Timestamp – SCN Manual Backups Will NOT be deleted after database is terminated Backup and Restore Types 8
  • 9. 9 mv2bucket (OCI) mv2bucket - Oracle Managed Bucket Content Manager (Doc ID 2723911.1)
  • 10. 10 Oracle Database Backup Cloud Module Oracle Database Backup Service - FAQ (Doc ID 1640149.1)
  • 12. Flashback Technology • Perform queries that return past data • Perform queries that return metadata that shows a detailed history of changes to the database • Recover tables or rows to a previous point in time • Automatically track and archive transactional data changes • Roll back a transaction and its dependent transactions while the database remains online 12
  • 14. Flashback Features • Oracle Flashback Query • Oracle Flashback Version Query • Oracle Flashback Transaction Query • Oracle Flashback Transaction • DBMS_FLASHBACK Package • Oracle Flashback Data Archive • Oracle Flashback Table • Oracle Flashback Drop • Oracle Flashback Database 14
  • 15. 15 Flashback Query SELECT AS OF Requirements: • FLASHBACK Privilege Example: SELECT * FROM employees AS OF TIMESTAMP TO_TIMESTAMP('2004-04-04 09:30:00', 'YYYY-MM- DD HH:MI:SS') WHERE last_name = 'Chung';
  • 16. 16 Flashback Version Query VERSIONS BETWEEN { SCN | TIMESTAMP } start AND end Pseudocolumns: • VERSIONS_STARTSCN • VERSIONS_STARTTIME • VERSIONS_ENDSCN • VERSIONS_ENDTIME • VERSIONS_XID • VERSIONS_OPERATION Requirements: • FLASHBACK Privilege Example: SELECT versions_startscn, versions_starttime, versions_endscn, versions_endtime, versions_xid, versions_operation, last_name, salary FROM employees VERSIONS BETWEEN TIMESTAMP TO_TIMESTAMP('2008-12-18 14:00:00', 'YYYY- MM-DD HH24:MI:SS') AND TO_TIMESTAMP('2008-12-18 17:00:00', 'YYYY-MM-DD HH24:MI:SS') WHERE first_name = 'John';
  • 17. 17 Flashback Transaction Query View: FLASHBACK_TRANSACTION_QUERY Requirements: • SUPPLEMENTAL LOG DATA; • SUPPLEMENTAL LOG DATA (PRIMARY KEY) • SUPPLEMENTAL LOG DATA (FOREIGN KEY) • SELECT ANY TRANSACTION Privilege OR FLASHBACK AND READ OR SELECT Example: SELECT xid, operation, start_scn, commit_scn, logon_user, undo_sql FROM flashback_transaction_query WHERE xid = HEXTORAW('000200030000002D');
  • 18. 18 DBMS_FLASHBACK Package: DBMS_FLASHBACK Requirements: • EXECUTE ON DBMS_FLASHBACK Privilege Example: Example(Procedures): ENABLE_AT_TIME ENABLE_AT_SYSTEM_CHANGE_NUMBER
  • 19. 19 Flashback Transaction Package: DBMS_FLASHBACK Requirements: • EXECUTE ON DBMS_FLASHBACK Privilege • ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS; • ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (FOREIGN KEY) COLUMNS; Example: Example(Procedures): • TRANSACTION_BACKOUT Views: • DBA_FLASHBACK_TXN_STATE • DBA_FLASHBACK_TXN_REPORT
  • 20. 20 Flashback Data Archive Once the undo information is lost, the view of the past is lost also Privileges: • FLASHBACK ARCHIVE ADMINISTER • CREATE FLASHBACK ARCHIVE • ALTER FLASHBACK ARCHIVE • DROP FLASHBACK ARCHIVE • FLASHBACK ARCHIVE object Package • DBMS_FLASHBACK_ARCHIVE Requirements: • Name of the first tablespace of the Flashback Data Archive • Name of the Flashback Data Archive • Quota (optional) • Retention time • Optimize Views: • DBA_FLASHBACK_ARCHIVE • DBA_FLASHBACK_ARCHIVE_TS • DBA_FLASHBACK_ARCHIVE_TABLES
  • 21. 21 Flashback Table Privileges: • FLASHBACK ANY TABLE OR FLASHBACK OBJECT • READ or SELECT, INSERT, DELETE, and ALTER privileges on the table Requirements: • ROW MOVEMENT (rowids) Example: FLASHBACK TABLE hr.employees TO TIMESTAMP TO_TIMESTAMP('2013-10-17 09:30:00', 'YYYY-MM-DD HH:MI:SS'); Can flashback to time, scn and restore point. Flashback the entire table
  • 22. 22 Flashback Drop Database parameter: recyclebin. Do not use UNDO! The table is only renamed on drop! Privileges: • DROP • READ or SELECT and FLASHBACK Requirements: • ALTER SYSTEM SET RECYCLEBIN='on' SCOPE=SPFILE; Example: RESTORE TABLE HR.EMPLOYEES TO BEFORE DROP; Views: • RECYCLEBIN • USER_RECYCLEBIN • DBA_RECYCLEBIN • (SHOW RECYCLEBIN) Restore a dropped table
  • 23. 23 Flashback Database Use Flashback logs Offline operation Privileges: • SYSDBA, SYSBACKUP OR SYSDG View: • V$FLASHBACK_DATABASE_LOG Requirements: • FRA Configured (OMF) • ARCHIVELOG • ALTER DATABASE FLASHBACK ON; Parameter: • DB_FLASHBACK_RETENTION_TARGET Flashback the entire database!
  • 24. Flashback Features per Edition 24 SE2 EE EE-ES DBCS SE DBCS EE DBCS EE-HP DBCS EE-EP ExaCS/CC AT Flashback Query Y Y Y Y Y Y Y Y Y Flashback Version Query Y Y Y Y Y Y Y Y Y Flashback Transaction Query N Y Y N Y Y Y Y Y Flashback Transaction N Y Y N Y Y Y Y N DBMS_FLASHBACK N Y Y N Y Y Y Y Y Flashback Data Archive Y Y Y Y Y Y Y Y N Flashback Table N Y Y N Y Y Y Y Y Flashback Drop Y Y Y N Y Y Y Y Y Flashback Database N Y Y N Y Y Y Y N SE2: Standard Edition 2, EE: Enterprise Edition, EE-ES: Enterprise Edition on Engineered Systems, DBCS: Database Cloud Service, EE-HP: Enterprise Edition - High Performance, EE-EP - Enterprise Edition - Extreme Performance, ExaCS: Database Exadata Cloud Service, CC: Cloud@Customer, AT: Autonomous
  • 25. 25 Best Pratices • UNDO RETENTION • UNDO TABLESPACE SIZE • ADD SUPPLEMENTAL LOG DATA AT LEAST • DOT NOT USE TRIGGERS FOR LOG. USE FLASHBACK DATA ARCHIVE! • CREATE YOUR OWN INDICES ON FLASBACK DATA ARCHIVE BASE TABLES • ENABLE RECYCLEBIN • ENABLE FLASHBACK DATABASE
  • 26. 26 FLASHBACK <> DBPITR • Media recovery • Time • Logical <> Physical • Redo, Undo and Flashback logs <> backupsets and image copies
  • 27. ? 27

Editor's Notes

  • #7: Slack channels- start with one for all and 3 level channels (ACE Program, Associate, Pro, ACED)
  • #10: Ensure the titles are not duplicated. Please check the set of best practices.
  • #11: Ensure the titles are not duplicated. Please check the set of best practices.
  • #14: Ensure the titles are not duplicated. Please check the set of best practices.
  • #16: Ensure the titles are not duplicated. Please check the set of best practices.
  • #17: Ensure the titles are not duplicated. Please check the set of best practices.
  • #18: Ensure the titles are not duplicated. Please check the set of best practices.
  • #19: Ensure the titles are not duplicated. Please check the set of best practices.
  • #20: Ensure the titles are not duplicated. Please check the set of best practices.
  • #21: Ensure the titles are not duplicated. Please check the set of best practices.
  • #22: Ensure the titles are not duplicated. Please check the set of best practices.
  • #23: Ensure the titles are not duplicated. Please check the set of best practices.
  • #24: Ensure the titles are not duplicated. Please check the set of best practices.
  • #26: Ensure the titles are not duplicated. Please check the set of best practices.
  • #27: Ensure the titles are not duplicated. Please check the set of best practices.