Unraveling Multimodality with Large Language Models.pdf
Database & Technology 1 _ Milina Ristic _ Why use oracle data guard.pdf
1. Why
Use
Oracle
Data
Guard?
Milina
Ris7c
TelstraClear,
New
Zealand
The most comprehensive Oracle applications & technology content under one roof
2. Data
Guard
Func,ons
• High
availability
• Data
protec,on
• Disaster
recovery
• Repor,ng
• Backup
and
recovery
The most comprehensive Oracle applications & technology content under one roof
3. Data
Guard
Configura,ons
• Physical
Standby
– block
for
block
iden,cal
copy
of
primary
database
• Logical
Standby
– same
logical
informa,on
as
primary
database
The most comprehensive Oracle applications & technology content under one roof
4. Data
Guard
11g
Snapshot
Standby
• fully
updateable
standby
database
• tes,ng
on
produc,on
like
data
• easily
resynchronised
with
produc,on
The most comprehensive Oracle applications & technology content under one roof
5. Data
Guard
11g
Ac,ve
Data
Guard
• Real-‐,me
repor,ng
• Fast
incremental
backups
• Automa,c
correc,on
of
corrupted
blocks
NB:
Requires
separate
license
The most comprehensive Oracle applications & technology content under one roof
6. Ac,ve
Data
Guard
Read-‐only
applica,on
can
perform:
• Selects
• Alter
session
• Call
stored
procedures
• Call
remote
procedures
via
DB
links
• DB
links
to
write
to
remote
databases
The most comprehensive Oracle applications & technology content under one roof
7. Apply
Lag
Management
11g
ALTER
SESSION
SET
STANDBY_MAX_DATA_DELAY=600;
ORA-‐03172:
STANDBY_MAX_DATA_DELAY
of
600
seconds
exceeded
The most comprehensive Oracle applications & technology content under one roof
8. Physical
Standby
Primary Standby
database database
Redo
transport
Database Database copy
The most comprehensive Oracle applications & technology content under one roof
9. Benefits
of
Physical
Standby
• Switchover
• Failover
• Repor,ng
• Backup
The most comprehensive Oracle applications & technology content under one roof
10. Running
Backup
on
Physical
Standby
Primary
Standby
• 4-‐node
RAC
• 4-‐node
RAC
• NetApp
Filers
• SAN
• No
ASM
• ASM
• RMAN
• RMAN
• TSM
with
TDPO
• TSM
with
TDPO
The most comprehensive Oracle applications & technology content under one roof
11. Filesystem
to
ASM
and
Back
How
to
duplicate
a
controlfile
when
ASM
is
involved
[ID
345180.1]
How
to
move
a
datafile
from
a
file
system
to
ASM
[ID
390274.1]
How
to
move
a
datafile
from
ASM
to
the
file
system
[ID
390416.1]
The most comprehensive Oracle applications & technology content under one roof
12. Primary RAC database Secondary
Recovery
Catalog
nc
Standby RAC database Primary
sy
Recovery
re
Catalog
backup
The most comprehensive Oracle applications & technology content under one roof
13. Alterna,ves
for
DR
Complex
systems
e.g.
Sybase
database
Oracle
Transparent
Gateway
for
Sybase
Third
party
applica,ons
may
require
alterna,ve
technologies:
•
SAN
replica,on
•
snapshot
technology
The most comprehensive Oracle applications & technology content under one roof
14. Logical
Standby
Primary Standby
database database
Oracle Net
Archived Redo Log Apply
Log Files Services
Log Transport Archived Redo
Services Log Files
The most comprehensive Oracle applications & technology content under one roof
15. SQL
Apply
–
Log
Mining
• READER
–
reads
archived
redo
logs
• PREPARER
–
generates
logical
change
records
• BUILDER
–
groups
LCRs
into
transac,ons
The most comprehensive Oracle applications & technology content under one roof
16. SQL
Apply
–
Apply
Processing
• ANALYZER
–
iden,fies
dependencies
• COORDINATOR
–
assigns
transac,ons
• APPLIER
–
applies
transac,ons
The most comprehensive Oracle applications & technology content under one roof
17. Benefits
of
Logical
Standby
• Switchover
• Failover
• Repor,ng
• Addi,onal
objects
The most comprehensive Oracle applications & technology content under one roof
18. Importance
of
NOT
NULL
TABLE1
ID
NUMBER(5)
NAME
VARCHAR2(20)
TABLE2
ID
NOT
NULL
NUMBER(5)
NAME
VARCHAR2(20)
The most comprehensive Oracle applications & technology content under one roof
19. Importance
of
NOT
NULL
UPDATE
SQL
on
standby
database
UPDATE
table1
SET
name
=
'Smith'
WHERE
(id
=
:b1
OR
id
IS
NULL)
AND
(name
=
:b2
OR
name
IS
NULL)
The most comprehensive Oracle applications & technology content under one roof
20. Tracing
APPLIER
SELECT
PID,
TYPE,
STATUS,
HIGH_SCN
FROM
V$LOGSTDBY
oradebug
setospid
<APPLIER
pid>
oradebug
unlimit
oradebug
event
10046
trace
name
context
forever,
level
12
The most comprehensive Oracle applications & technology content under one roof
21. Tracing
APPLIER
oradebug
setospid
<APPLIER
pid>
oradebug
event
10046
trace
name
context
off
Trace
file
will
be
generated
in
bdump
tkprof
<fn>
tkprof.out
explain=
"/
as
sysdba"
The most comprehensive Oracle applications & technology content under one roof
22. Data
Guard
Modes
ALTER
DATABASE
GUARD
{ALL|STANDBY|NONE}
ALL
–
read
only
STANDBY
–
read
only
for
maintained
objects
NONE
–
fully
updateable
The most comprehensive Oracle applications & technology content under one roof
23. Bulk
Updates
Primary
Single
update
of
million
rows
Standby
Million
updates
on
standby
The most comprehensive Oracle applications & technology content under one roof
24. Reinstan,a,ng
Tables
DBMS_LOGSTDBY.INSTANTIATE_TABLE
('HR',
'EMPLOYEES',
'primary_dblink');
• Log
apply
needs
to
be
stopped
• Table
is
dropped
and
recreated
• Addi,onal
grants
and
indexes
are
lost
The most comprehensive Oracle applications & technology content under one roof
25. To
Skip
or
Not
to
Skip
• Temporary
and
audit
tables
• User
crea,on
• Schemas
• Index
rebuilds
• Par,,on
maintenance
The most comprehensive Oracle applications & technology content under one roof
26. Par,,on
Maintenance
Produc7on
Repor7ng
• Keep
12
months
• Keep
24
months
• Archive
older
data
• Drop
older
par,,ons
• Drop
older
par,,ons
The most comprehensive Oracle applications & technology content under one roof
27. Skipping
Transac,ons
execute
dbms_logstdby.skip
('SCHEMA_DDL',
'HR',
'DEPT');
('DML',
'HR',
'%TEMP');
('ALTER
INDEX',
'%',
'%');
The most comprehensive Oracle applications & technology content under one roof
28. Skipping
Drop
Par,,on
execute
dbms_logstdby.skip
('ALTER
TABLE',
'<schema
name>',
'<object
name>',
'<procedure
name>');
The most comprehensive Oracle applications & technology content under one roof
29. Skipping
Drop
Par,,on
IF
upper(statement)
like
'%DROP%PARTITION%'
THEN
skip_ac,on
:=
sys.dbms_logstdby.SKIP_ACTION_SKIP;
ELSE
skip_ac,on
:=
sys.dbms_logstdby.SKIP_ACTION_APPLY;
END
IF;
The most comprehensive Oracle applications & technology content under one roof
30. Hints
–
What
to
Watch
Out
For
• Explicitly
using
inappropriate
indexes
• Hin,ng
full
table
scan
• Using
too
high
parallel
degree
The most comprehensive Oracle applications & technology content under one roof
31. Unsupported
Opera,ons
Table
compression
up
to
11gR2
workaround
–
triggers
Segment
shrinking
workaround
–
move
The most comprehensive Oracle applications & technology content under one roof
32. Logical
Standby
Tips
• Sound
primary
database
data
model
• Beware
bulk
updates
• Know
the
limits
• Op,mise
long
running
processes
The most comprehensive Oracle applications & technology content under one roof