Oracle 12.2 physical standby備庫收集AWR報告
Oracle 12.2 提供了收集備庫AWR 的功能。
確定備庫角色和開啟狀態
SQL> select inst_id, open_mode, database_role from gv$database order by 1;
INST_ID OPEN_MODE DATABASE_ROLE ---------- ------------------------------ ------------------------------------------------ 1 READ ONLY WITH APPLY PHYSICAL STANDBY |
On Primary (CDB) 執行解鎖:
SQL> alter user sys$umf identified by sysumf account unlock; |
SYS$UMF 使用者預設是locked 的;該使用者具有Remote Management Framework (RMF) 有關的所有的檢視和表的許可權。
On Primary (CDB) 建立db_link
create database link dblk_EMNBBETA_TO_EMNBBETAPDG01 CONNECT TO sys$umf IDENTIFIED BY sysumf using 'LTACTESTPDG01'; create database link dblk_EMNBBETAPDG01_TO_EMNBBETA CONNECT TO sys$umf IDENTIFIED BY sysumf using 'LTACTEST'; |
RMF 拓撲結構中的所有節點必須有一個獨一無二的名字,預設選擇db_unique_name
On Primary (CDB 執行) ,LTACTEST 是主庫db_unique_name
exec dbms_umf.configure_node ('LTACTEST'); |
On Standby ,LTACTESTPDG01 是備庫db_unique_name
exec dbms_umf.configure_node ('LTACTESTPDG01','dblk_EMNBBETAPDG01_TO_EMNBBETA'); |
建立RMF 拓撲,On Primary :
exec DBMS_UMF.create_topology ('EMNBBETA_Topology'); |
驗證目前為止的操作
set line 132 col topology_name format a15 col node_name format a15
select * from dba_umf_topology; select * from dba_umf_registration;
For example
SQL> select * from dba_umf_topology;
TOPOLOGY_NAME TARGET_ID TOPOLOGY_VERSION TOPOLOGY_STATE -------------------- ---------- ---------------- ------------------------ EMNBBETA_Topology 798157014 1 ACTIVE
SQL> select * from dba_umf_registration;
TOPOLOGY_NAME NODE_NAME NODE_ID NODE_TYPE AS_SOURCE AS_CANDIDATE_TA STATE -------------------- --------------- ---------- ---------- --------------- --------------- -------------------- EMNBBETA_Topology LTACTEST 798157014 0 FALSE FALSE OK |
註冊備庫到RMF 拓撲中
SQL> exec DBMS_UMF.register_node ('EMNBBETA_Topology', 'LTACTESTPDG01', 'dblk_EMNBBETA_TO_EMNBBETAPDG01', 'dblk_EMNBBETAPDG01_TO_EMNBBETA', 'FALSE', 'FALSE'); BEGIN DBMS_UMF.register_node ('EMNBBETA_Topology', 'LTACTESTPDG01', 'dblk_EMNBBETA_TO_EMNBBETAPDG01', 'dblk_EMNBBETAPDG01_TO_EMNBBETA', 'FALSE', 'FALSE'); END;
* ERROR at line 1: ORA-15766: already registered in an RMF topology ORA-06512: at "SYS.DBMS_UMF_INTERNAL", line 132 ORA-06512: at "SYS.DBMS_UMF_INTERNAL", line 170 ORA-06512: at "SYS.DBMS_UMF", line 822 ORA-06512: at line 1 ORA-06512: at "SYS.DBMS_UMF", line 794 ORA-06512: at "SYS.DBMS_UMF", line 712 ORA-06512: at line 1 |
解決辦法:
如果遇到了ORA-15766 ,那麼就執行下面:
SQL> exec DBMS_UMF.unregister_node ('EMNBBETA_Topology', 'LTACTESTPDG01');
PL/SQL procedure successfully completed. |
如果遇到了 ORA-13519: Database id (1730117407) exists in the workload repository ,然後重新執行 DBMS_WORKLOAD_REPOSITORY.register_remote_database
exec DBMS_WORKLOAD_REPOSITORY.unregister_remote_database('LTACTESTPDG01' ,' EMNBBETA_Topology ',TRUE); |
註冊到AWR
exec DBMS_WORKLOAD_REPOSITORY.register_remote_database(node_name=>'LTACTESTPDG01');
PL/SQL procedure successfully completed. |
驗證
set line 132 col topology_name format a20 col node_name format a15 SQL> select * from dba_umf_topology; TOPOLOGY_NAME TARGET_ID TOPOLOGY_VERSION TOPOLOGY_STATE -------------------- ---------- ---------------- ------------------------ EMNBBETA_Topology 798157014 6 ACTIVE
SQL> select * from dba_umf_registration;
TOPOLOGY_NAME NODE_NAME NODE_ID NODE_TYPE AS_SOURCE AS_CANDIDATE_TA STATE -------------------- --------------- ---------- ---------- --------------- --------------- -------------------- EMNBBETA_Topology LTACTEST 798157014 0 FALSE FALSE OK EMNBBETA_Topology LTACTESTPDG01 524737559 0 FALSE FALSE OK
SQL> select * from dba_umf_service;
TOPOLOGY_NAME NODE_ID SERVICE_ID -------------------- ---------- --------------------- EMNBBETA_Topology 524737559 AWR |
用RMF 建立遠端snapshot
SQL> exec dbms_workload_repository.create_remote_snapshot('LTACTESTPDG01');
PL/SQL procedure successfully completed. |
如果遇到了 ORA-13516: AWR Operation failed: Remote source not registered for AWR ,手動切 2-3 個歸檔
alter system switch logfile; |
收集備庫AWR 報告
@?/rdbms/admin/awrrpti.sql |
注意是 awrrpti.sql ,不是 awrrpt.sql
輸入dbid 就可以了。
SQL> @?/rdbms/admin/awrrpti.sql
Specify the Report Type ~~~~~~~~~~~~~~~~~~~~~~~ AWR reports can be generated in the following formats. Please enter the name of the format at the prompt. Default value is 'html'.
'html' HTML format (default) 'text' Text format 'active-html' Includes Performance Hub active report
Enter value for report_type: html Type Specified: html
Instances in this Workload Repository schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name Instance Host ------------ ---------- --------- ---------- ------ 524737559 1 LTACTEST LTACTEST ORADB-53154. * 4166033225 1 LTACTEST LTACTEST ORADB-53163.
Enter value for dbid: 524737559 Using 524737559 for database Id Enter value for inst_num: 1 Using 1 for instance number
Specify the number of days of snapshots to choose from ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Entering the number of days (n) will result in the most recent (n) days of snapshots being listed. Pressing <return> without specifying a number lists all completed snapshots.
Enter value for num_days: 1
Listing the last day's Completed Snapshots Instance DB Name Snap Id Snap Started Snap Level ------------ ------------ ---------- ------------------ ----------
LTACTEST LTACTEST 1 04 Sep 2019 15:41 1 2 04 Sep 2019 15:42 1
Specify the Begin and End Snapshot Ids ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter value for begin_snap: 1 Begin Snapshot Id specified: 1
Enter value for end_snap: 2 End Snapshot Id specified: 2
Specify the Report Name ~~~~~~~~~~~~~~~~~~~~~~~ The default report file name is awrrpt_1_1_2.html. To use this name, press <return> to continue, otherwise enter an alternative.
Enter value for report_name:
Using the report name awrrpt_1_1_2.html |
檢視AWR 報告:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31480688/viewspace-2656126/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 如何在12.2版本ADG備庫生成AWR報告
- 搭建windows到linux的oracle 12c physical standby備庫WindowsLinuxOracle
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- 12.2 如何單為PDB建立AWR報告
- 【AWR】Oracle批量生成awr報告指令碼Oracle指令碼
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Oracle 12.2 How to Generate AWRs in Active Data Guard Standby DatabasesOracleDatabase
- Oracle 12.2 使用Database Link優化Standby Database WorkloadOracleDatabase優化
- Oracle生成awr報告操作步驟Oracle
- Oracle 12c DG備庫啟動報錯standby database requires recoveryOracleDatabaseUI
- 【DG】Data Guard搭建(physical standby)
- ORACLE AWR效能報告和ASH效能報告的解讀Oracle
- 【AWR】Oracle資料庫建立awr基線Oracle資料庫
- oracle12.2 adg ORA-46952: standby database format mismatch for password fileOracleDatabaseORM
- 【效能調優】Oracle AWR報告指標全解析Oracle指標
- [20230220][20230110]生成相關備庫的awr報表
- 本機生成遠端資料庫AWR報告資料庫
- ORACLE AWROracle
- Oracle Physical Database LimitsOracleDatabaseMIT
- AWR報告基礎操作
- 達夢資料庫AWR報告日常管理方法資料庫
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- 宜信資料庫實踐|解讀Oracle AWR效能分析報告,更快定位效能瓶頸資料庫Oracle
- oracle rac 單個例項不能生成awr報告的問題Oracle
- 達夢資料庫如何來配置並生成AWR報告資料庫
- Oracle dataguard報錯:Error 1017 received logging on to the standbyOracleError
- [20230303]生成相關備庫的awr報表(補充說明).txt
- Oracle 11.2.0.3.0中執行awrrpt.sql生成awr報告報ora-06502錯誤OracleSQL
- 4 Creating a Logical Standby Database 建立邏輯備庫Database
- Oracle ADG 備庫新增備庫Oracle
- Oracle的快照standbyOracle
- oracle工具 awr formatOracleORM
- Oracle 12.2 Heavy swapping 資料庫自動關閉OracleAPP資料庫
- 在Oracle DG Standby庫上啟用flashback database功能OracleDatabase
- 備份mysql資料庫報告MySql資料庫
- awr-----一份經典的負載很高的awr報告負載
- Oracle 12.2 OJVM安裝OracleJVM