SlideShare a Scribd company logo
DataGuard with	RAC	and	Multi-tenant	experiences
&
Oracle	Analytics	Cloud	Service
Thursday	12th January,	2017
Thursday 14th September
SQL	&	PL/SQL	Development
Multi-Tenant	Dataguard
A	Bug’s	Tale…
Who	I	am
Simon	Holt
• DBA	for	25	years+,	started	with	version	6.0.36		
• OUG	Tech	SIG	chair	and	Meet-ups	co-organiser
• DBA	architect	at	ESB	Networks
Oracle	SuperCluster	at	ESB	Networks
Half	Rack	(with	extra	Storage	Cells)
• Two		T5-8	Compute	Nodes	with	4	x	16	Core	CPUs
• 1	TB	Memory	per	node
• 6	Exadata	High	Capacity	Storage	Cells,	288	Tb	raw
• High	Speed	InfiniBand	Network
• 3	x	36-port		InfiniBand switches
• 1	x	48-port	1-Gigabit		Ethernet		Switch
• ZS3	Storage	80	Tb	raw
• 4	x	LDOM	(2	for	DB	,	2	for	App)
ESB Networks Architecture
HA SPARC Superclusters with GeoCluster
Platinum Support Gateway
Oracle Secure Backup Media
Server
Oracle Secure Backup Admin
Server
tape library
InfiniBand
Network
Ethernet
OEM
Ethernet
Active Dataguard
ZFS Replication
OEM
Ethernet
Platinum Support Gateway
InfiniBand
Network
Oracle Secure Backup Media
Server
tape library
Oracle Secure Backup Admin
Server
Ethernet
Sparc Supercluster
• Two T5-8 Compute Nodes
• 4 x16 Core CPUs per Node
• 1 TB Memory per node
• 6 Exadata High Capacity Storage Cells, 288 Tb raw
• High Speed InfiniBand Network
Sparc Supercluster
• Two T5-8 Compute Nodes
• 4 x 16 Core CPUs per Node
• 1 TB Memory per node
• 6 Exadata High Capacity Storage Cells, 288 Tb raw
• High Speed InfiniBand Network
Geo-Cluster
Temporary	Tablespace	Tantrum
Oracle	Data	Guard	Concepts	and	Administration
10.3.1	Adding	a	Data	File	or	Creating	a	Tablespace
The	STANDBY_FILE_MANAGEMENT	database	initialization	parameter	controls	whether	the	addition	of	a	data	file	
to	the	primary	database	is	automatically	propagated	to	a	physical	standby	databases.
If	the	STANDBY_FILE_MANAGEMENT	database	parameter	on	the	physical	standby	database	is	set	to	AUTO,	any	
new	data	files	created	on	the	primary	database	are	automatically	created	on	the	physical	standby	database.
But..	This	does	not	apply	to	TEMPFILE	creation,	so	newly	created	tempfiles	will	not	exist	in	standby.
Adding	a	Temporary	Tablespace	to	Primary
On	CREATE	at	primary,	the	tablespace	meta-data	will	be	transported	in	redo,	file	creation	instruction	will	not	be.
At	Standby,		a	tablespace	operation	like	CREATE	or	DROP	results	in:
ORA-16000: database or pluggable database open for read-only access.
• But	the	meta-data	for	the	tablespace	is	already	there,	so	no	CREATE	necessary!	
• Would	need	to	add	tempfile	to	the	standby	tablespace	to	match	it	up	with	old	Primary.
Primary
CREATE TEMPORARY TABLESPACE temp_test TEMPFILE ‘+TEST_DATA’
SIZE 100M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
SELECT TABLESPACE_NAME FROM dba_tablespaces WHERE
tablespace_name = ‘TEMP_TEST’;
TABLESPACE_NAME
-----------------------------
TEMP_TEST
SELECT name, bytes FROM dba_temp_files WHERE
tablespace_name = ‘TEMP_TEST’;
NAME BYTES
-------------------------------- ---------------
+TEST_DATA/…/temp_test.269.943312435 1048576
Standby
SELECT TABLESPACE_NAME FROM dba_tablespaces WHERE
tablespace_name = ‘TEMP_TEST’;
TABLESPACE_NAME
-----------------------------
TEMP_TEST
SELECT name, bytes FROM dba_temp_files WHERE tablespace_name =
‘TEMP_TEST’;
no rows selected
Requires	an	ALTER	TABLESPACE	..	ADD	TEMPFILE	command.
The	Set-Up
Default	temporary	tablespaces	in	PDBs	were	under-sized,	unaligned	with	ASM	extents,	smallfile,	and	not	locally	managed.
To	rectify	this,	we	need	to	“shuffle”	the	default	temporary	tablespace	in	each	PDB:
Can’t	drop	a	default	temporary	tablespace,	so	do	the	usual	procedure	of
1. Create	a	temporary	temporary	tablespace	X
2. Change	the	database	default	temporary	tablespace	to	X	from	TEMP
3. Drop	TEMP	tablespace
4. Recreate	TEMP	tablespace	as	desired
5. Alter	database	default	temporary	tablespace	to	TEMP
6. Drop	temporary	temporary	tablespace	X
So	in	our	case,	run	the	following	in	each	PDB:
CREATE TEMPORARY TABLESPACE temp_shuffle TEMPFILE SIZE 10G;
ALTER DATABASE &1 DEFAULT TEMPORARY TABLESPACE temp_shuffle;
DROP TABLESPACE temp;
CREATE BIGFILE TEMPORARY TABLESPACE temp TEMPFILE SIZE 10G AUTOEXTEND ON NEXT 1G
MAXSIZE 128G EXTENT MANAGEMENT LOCAL UNIFORM SIZE 4M;
ALTER DATABASE &1 DEFAULT TEMPORARY TABLESPACE temp;
DROP TABLESPACE temp_shuffle;
The	Discovery
Standby	Dictionary	consistent	with	Primary	– all	TEMP	tablespaces	same	storage	characteristics.
Would	fully	expect	to	add	suitable	tempfiles	to	the	re-created	TEMP	tablespaces	at	the	standby,	when	it	becomes	new	
primary	after	a	switchover	happens.
However,	when	we	do	switchover…
DISASTER…!
Old	Standby	/	New	Primary	Database
• Fails	to	mount	CDB
• All	PDBs	returning	an	ORA-600 [kcffo_pdb_tempfiles: pdbid] error
• Both	RAC	instances	crash,	terminated	by	smon.
Old	Primary	/	New	Standby
• Completed	role	transition	without	error – now	in	“PHYSICAL	STANDBY”	role.
The	Data	Gathering
Sample	message	from	alert	log:
ORACLE Instance LIVENMS1 (pid = 37) - Error 600 encountered while recovering transaction (24, 10).
Errors in file /u01/app/oracle/diag/rdbms/dca_livenms/LIVENMS1/trace/LIVENMS1_smon_12686.trc:
ORA-00600: internal error code, arguments: [kcffo_pdb_tempfiles: pdbid], [204], [5], [], [], [], [], [], [], [], [], []
2017-01-31 16:43:40.108000 +00:00
Dumping diagnostic data in directory=[cdmp_20170131164340], requested by (instance=1, osid=4294979982 (SMON)), summary=[abnormal
process termination].
The	above	message	is	repeated	for	every	PDB.	Smon retries	a	few	times	then	the	instance	crashes	
Both	instances	do	this	independently.
Noted	it	appears	to	be	crashing	on	instance	recovery	by	SMON.
SMON	Trace	files	contain	a	series	of	ORA-600s	with	the	following	pattern:
ORA-00600: internal error code, arguments: [kcffo_pdb_tempfiles: pdbid], [204], [5], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [kcffo_pdb_tempfiles: pdbid], [204], [5], [], [], [], [], [], [], [], [], []
ORA-00600: internal error code, arguments: [krt_drop_oftf_01], [204], [2], [2], [12], [12], [3], [5], [], [], [], []
The	Investigation
Support	asked	us	to	re-create	the	tempfiles	for	the	PDB	temporary	tablespaces.
• Not	possible:	CDB	attempts	to	MOUNT	but	then	instance	crashes,	so	no	commands	possible
• PDBs	had	their	state	saved	at	open,	attempt	to	open	automatically	on	database	start,	and	fail	as	described.
• If	PDBs	had	not	been	set	to	open	automatically,	would	have	gotten	to	mount	state.		(But	would	still	have	hit	this	bug!)
Support	suggest	could	be	Bug 20686344 : ORA-00600 [KRT_DROP_OFTF_01] ON CONVERTING TO SNAPSHOT STANDBY IN CONTAINER DB
…	but	not	wholly	convinced…
Support	suggest	setting	hidden	parameter	_smu_debug_mode = 1024
• Will	stop	smon transaction	recovery,	and	hopefully	open	database
• Further	investigation	/	transaction	clearing	could	then	be	done
• Didn’t	allow	open,	but	did	allow	CDB	to	get	to	MOUNT	state	and	stay	there!
• Database	role	found	to	be	“PRIMARY”.
New	bug	opened	to	get	development	involved	with	investigation
• Oracle	Development	advised	to	apply	patch	for	bug	24601586
The	Investigation	(II)
Asked	to	check	contents	of	X$KCCPDB (Controlfile	PDB	records)	and	X$KCCTF (Controlfile	tempfile	records)
select CON_ID, PDBTFP from X$KCCPDB;
select CON_ID, TFNUM from X$KCCTF;
PDBTFP	and	TFNUM	should	be	the	same	for	each	CON_ID:	In	our	case,	they	didn’t	match	up	at	all.
In	the	controlfile	PDB	records	(X$KCCPDB):
CON_ID PDBTFP
3 5 (pdb#3 points at tempfile#5)
4 3 (pdb#4 points at tempfile#3)
5 6 (pdb#5 points at tempfile#6)
In	the	controlfile	tempfile	records	(X$KCCTF):
TFNUM CON_ID
3 3 (tempfile#3 points at pdb#3)
4 4 (tempfile#4 points at pdb#4)
5 5 (tempfile#5 points at pdb#5)
6 5 (tempfile#6 points at pdb#5)
Support	action	plan	when	cause	positively	identified:
• Recreate	the	controlfile	to	fix	the	pointers
• Use	ALTER TABLESPACE ... ADD TEMPFILE to	re-create	the	tempfile	at	the	new	primary.
The	Bug	and	Solution
Development	identify	the	situation	as	an	exact	match	for:
Bug 24601586 ORA-600 [kcffo_pdb_tempfiles: pdbid] or ORA-600 [krt_drop_oftf_01] on Multitenant Database after Flashback Database
Listed	for	Flashback	database	event,	but	also	applies	to	situation	where	temp	files	dropped	/	recreated	on	Primary	in	PDBs.
Advised	to	apply	patch	for	bug	24601586	at	both	Standby	and	Primary:
• Would	prevent	error	happening	again,	but	not	cure	actual	situation.
• Control	file	inconsistencies	introduced	by	bug	cause	ORA-600
Remedy	for	current	situation	confirmed	as	
• Recreate	the	controlfile	to	fix	the	pointers
• Use	ALTER TABLESPACE ... ADD TEMPFILE to	re-create	the	tempfile	at	the	new	primary.
Lessons	Learned
Apply	patch	24601586	or	bundle	containing	it	before	any	pdb temporary	tablespace	maintenance	at	primary
Note	24601568.8	contains	brief	bug	description,	but	does	not	reference	DROP	/CREATE,	only	Flashback.
Check	ORA-600	errors:	If	getting	[krt_drop_oftf_01] and	the	last	two	arguments	do	not	match,	then	hitting	this	bug,	because	in	
the	past	there	has	either	been	a	flashback	database,	or	temp	tablespaces	dropped	and	recreated.
[krt_drop_oftf_01], [204], [2], [2], [12], [12], [3], [5]
If	situation	already	exists:
• Apply	patch	24601586
• Re-create	controlfile	at	new	primary:
• Backup	to	trace	to	generate	CREATE CONTROLFILE statement
• Add	NORESETLOGS
• Comment	out	standby	redo	log	section	(returns	ORA-01967: invalid option for CREATE CONTROLFILE otherwise)
• Execute	the	CREATE CONTROLFILE script
• On	successful	open:
• For	each	PDB,	use	ALTER TABLESPACE <x> ADD TEMPFILE to	create	files	
• Re-create	standby	redo	logs

More Related Content

PDF
Overview of running R in the Oracle Database
PDF
OUG Ireland Meet-up - Updates from Oracle Open World 2016
PDF
Embedded R Execution using SQL
PDF
Sasi, cassandra on the full text search ride At Voxxed Day Belgrade 2016
PDF
User Defined Aggregation in Apache Spark: A Love Story
PDF
In Memory Database In Action by Tanel Poder and Kerry Osborne
PDF
Troubleshooting Complex Performance issues - Oracle SEG$ contention
PDF
Moving Data Between Exadata and Hadoop
Overview of running R in the Oracle Database
OUG Ireland Meet-up - Updates from Oracle Open World 2016
Embedded R Execution using SQL
Sasi, cassandra on the full text search ride At Voxxed Day Belgrade 2016
User Defined Aggregation in Apache Spark: A Love Story
In Memory Database In Action by Tanel Poder and Kerry Osborne
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Moving Data Between Exadata and Hadoop

What's hot (19)

PDF
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
PDF
Long live to CMAN!
PDF
Cassandra introduction 2016
PPT
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
PDF
VirtaThon 2011 - Mining the AWR
PDF
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
PDF
Oracle Drivers configuration for High Availability
PDF
OVH-Change Data Capture in production with Apache Flink - Meetup Rennes 2019-...
PDF
How to teach an elephant to rock'n'roll
PDF
Setup oracle golden gate 11g replication
PDF
12cR2 Single-Tenant: Multitenant Features for All Editions
PPTX
OTN Tour 2014: Rac 11g vs 12c
PDF
Fast track to getting started with DSE Max @ ING
PPTX
Oracle Database 12.1.0.2 New Features
PDF
Spark cassandra integration 2016
PDF
Spark cassandra connector.API, Best Practices and Use-Cases
PDF
Oracle Database Management Basic 1
PDF
Flink Forward Europe 2019 - Berlin
PDF
Oracle Database SQL Tuning Concept
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Long live to CMAN!
Cassandra introduction 2016
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
VirtaThon 2011 - Mining the AWR
InfluxDB IOx Tech Talks: Query Engine Design and the Rust-Based DataFusion in...
Oracle Drivers configuration for High Availability
OVH-Change Data Capture in production with Apache Flink - Meetup Rennes 2019-...
How to teach an elephant to rock'n'roll
Setup oracle golden gate 11g replication
12cR2 Single-Tenant: Multitenant Features for All Editions
OTN Tour 2014: Rac 11g vs 12c
Fast track to getting started with DSE Max @ ING
Oracle Database 12.1.0.2 New Features
Spark cassandra integration 2016
Spark cassandra connector.API, Best Practices and Use-Cases
Oracle Database Management Basic 1
Flink Forward Europe 2019 - Berlin
Oracle Database SQL Tuning Concept
Ad

Similar to Ireland OUG Meetup May 2017 (20)

TXT
oracle dba
PDF
Troubleshooting Tips and Tricks for Database 19c - EMEA Tour Oct 2019
PDF
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
PPTX
Recovery case: All the Control file are lost
PDF
les12.pdf
PDF
New availability features in oracle rac 12c release 2 anair ss
PPT
Adventures in Dataguard
PDF
Best Practices for the Most Impactful Oracle Database 18c and 19c Features
PPTX
TechEvent Performance Analyses on Standby Database
PDF
AUSOUG - NZOUG - Groundbreakers - Jun 2019 - 19 Troubleshooting Tips and Tric...
PDF
DBA 101 : Calling all New Database Administrators (PPT)
PPT
D17316 gc20 l03_broker_em
PDF
Database & Technology 1 _ Milina Ristic _ Why use oracle data guard.pdf
PDF
Oracle Database – Mission Critical
DOC
Oracle data guard configuration in 12c
PDF
AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...
PDF
Maximum Availability Architecture - Best Practices for Oracle Database 19c
DOC
Oracle11g(1z0 050) v100612[1]
PPT
5 backuprecoveryw imp
PDF
8i standby
oracle dba
Troubleshooting Tips and Tricks for Database 19c - EMEA Tour Oct 2019
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Recovery case: All the Control file are lost
les12.pdf
New availability features in oracle rac 12c release 2 anair ss
Adventures in Dataguard
Best Practices for the Most Impactful Oracle Database 18c and 19c Features
TechEvent Performance Analyses on Standby Database
AUSOUG - NZOUG - Groundbreakers - Jun 2019 - 19 Troubleshooting Tips and Tric...
DBA 101 : Calling all New Database Administrators (PPT)
D17316 gc20 l03_broker_em
Database & Technology 1 _ Milina Ristic _ Why use oracle data guard.pdf
Oracle Database – Mission Critical
Oracle data guard configuration in 12c
AIOUG - Groundbreakers - Jul 2019 - 19 Troubleshooting Tips and Tricks for Da...
Maximum Availability Architecture - Best Practices for Oracle Database 19c
Oracle11g(1z0 050) v100612[1]
5 backuprecoveryw imp
8i standby
Ad

More from Brendan Tierney (6)

PDF
SQL : The one language to rule all your data
PDF
Predictive analytics: Mining gold and creating valuable product
PDF
SQL: The one language to rule all your data
PDF
Introduction to Map-Reduce
PDF
Overview of Hadoop and HDFS
PDF
OUG Ireland Meet-up 12th January
SQL : The one language to rule all your data
Predictive analytics: Mining gold and creating valuable product
SQL: The one language to rule all your data
Introduction to Map-Reduce
Overview of Hadoop and HDFS
OUG Ireland Meet-up 12th January

Recently uploaded (20)

PPTX
Trading Procedures (1).pptxcffcdddxxddsss
PDF
Foundation of Data Science unit number two notes
PDF
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
PPTX
Moving the Public Sector (Government) to a Digital Adoption
PPTX
Understanding Prototyping in Design and Development
PDF
Data Analyst Certificate Programs for Beginners | IABAC
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PPTX
Data-Driven-Credit-Card-Launch-A-Wells-Fargo-Case-Study.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PDF
Launch Your Data Science Career in Kochi – 2025
PPTX
Measurement of Afordability for Water Supply and Sanitation in Bangladesh .pptx
PPTX
Extract Transformation Load (3) (1).pptx
PDF
Report The-State-of-AIOps 20232032 3.pdf
PDF
Mastering Query Optimization Techniques for Modern Data Engineers
PPT
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
PPTX
Logistic Regression ml machine learning.pptx
PPTX
Purple and Violet Modern Marketing Presentation (1).pptx
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPTX
Presentation1.pptxvhhh. H ycycyyccycycvvv
Trading Procedures (1).pptxcffcdddxxddsss
Foundation of Data Science unit number two notes
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
Moving the Public Sector (Government) to a Digital Adoption
Understanding Prototyping in Design and Development
Data Analyst Certificate Programs for Beginners | IABAC
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
Data-Driven-Credit-Card-Launch-A-Wells-Fargo-Case-Study.pptx
.pdf is not working space design for the following data for the following dat...
Business Ppt On Nestle.pptx huunnnhhgfvu
Launch Your Data Science Career in Kochi – 2025
Measurement of Afordability for Water Supply and Sanitation in Bangladesh .pptx
Extract Transformation Load (3) (1).pptx
Report The-State-of-AIOps 20232032 3.pdf
Mastering Query Optimization Techniques for Modern Data Engineers
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
Logistic Regression ml machine learning.pptx
Purple and Violet Modern Marketing Presentation (1).pptx
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Presentation1.pptxvhhh. H ycycyyccycycvvv

Ireland OUG Meetup May 2017