Академический Документы
Профессиональный Документы
Культура Документы
newdg
lsdsk
ASMCMD Extensions
• ASMCMD is extended to include ASM metadata backup and restore functionality. This
provides the ability to recreate a pre-existing ASM disk group with exact same template and
alias directory structure. Currently if an ASM disk group is lost, it is possible to restore the
lost files using RMAN but you have to manually recreate ASM disk group and any required
user directories/templates. There is no way to backup and restore ASM metadata. ASM
metadata backup and restore (AMBR) works in two modes. In backup mode it parses ASM
fixed tables and views to gather information about existing disks and failure group
configurations, template and alias directory structure. It then dumps this metadata
information to a text file. In restore mode, AMBR reads the previously generated file to
reconstruct the disk group and its metadata. You have the possibility to control AMBR
behavior in restore mode to do a full, nodg, or newdg restore. The difference between the
three sub-modes is to whether you want to include the disk group creation or not, and change
its characteristics.
• The lsdsk command lists ASM disk information. This command can run in two modes:
connected and non-connected. In connected mode, ASMCMD uses the V$ and GV$ views to
retrieve disk information. In non-connected mode, ASMCMD scans disk headers to retrieve
disk information, using an ASM disk string to restrict the discovery set. The connected mode
is always attempted, first.
Production
Database
Cursor cache
Production Test
Database Database
performance baseline
• SQL Performance = execution plans
+ execution statistics
• Test-Execute SQL in SQL tuning Before
set: changes
Database Instance
– produce execution plans and
statistics
– execute SQL serially
(no concurrency)
– every SQL is executed only once
– skip DDL/DML effects
• Explain plan SQL in SQL tuning set
Test
to generate SQL plans only Database
• PL/SQL package:
– DBMS_SQLTUNE
• Main APIs:
– CREATE_TUNING_TASK:Creates an advisor task
– EXECUTE_TUNING_TASK:Executes a previously created
tuning task
– REPORT_TUNING_TASK:Displays the results of a tuning
task
Statement Log
Plan History
Plan History
Plan
Baseline Plan
GB Baseline
GB GB GB
HJ GB GB SQL
HJ HJ … HJ HJ HJ … HJ profile
Repeatable HJ HJ HJ
HJ HJ
SQL
statement
Plan History
Plan
Baseline
GB
GB GB
HJ
HJ HJ … HJ
HJ HJ Automatic
SQL Tuning
task
Plan verification before
integration to baseline
load_plans_from_cursor_cache
Ba Pl lin
e
GB
an se
Pl lin
load_plans_from_sqlset
1 e HJ
HJ
GB
HJ
HJ
GB alter_sql_plan_baseline
HJ
2
HJ
*_stgtab_baseline
GB
HJ 3
HJ staging
Cursor table
cache
Plan History
Ba
an s
Pl GB eline
4
HJ
HJ
DBA