这篇文章主要讲解了“Oracle 12.2提供了什么功能”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Oracle 12.2提供了什么功能”吧!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 STANDBYOn Primary (CDB)
执行解锁:SQL> alter user sys$umf identified by sysumf account unlock;SYS$UMF用户默认是locked的;该用户具有Remote Management Framework (RMF)有关的所有的视图和表的权限。On Primary (CDB)创建db_linkcreate 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_nameOn Primary(CDB
执行) ,LTACTEST是主库db_unique_nameexec dbms_umf.configure_node (‘LTACTEST’);On Standby,LTACTESTPDG01是备库db_unique_nameexec dbms_umf.configure_node (‘LTACTESTPDG01′,’dblk_EMNBBETAPDG01_TO_EMNBBETA’);创建RMF拓扑,On Primary:exec DBMS_UMF.create_topology (‘EMNBBETA_Topology’);验证目前为止的操作set line 132col topology_name format a15col node_name format a15select * from dba_umf_topology;select * from dba_umf_registration;For exampleSQL> select * from dba_umf_topology;TOPOLOGY_NAME TARGET_ID TOPOLOGY_VERSION TOPOLOGY_STATE——————– ———- —————- ————————EMNBBETA_Topology 798157014 1 ACTIVESQL> 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 topologyORA-06512: at “SYS.DBMS_UMF_INTERNAL”, line 132ORA-06512: at “SYS.DBMS_UMF_INTERNAL”, line 170ORA-06512: at “SYS.DBMS_UMF”, line 822ORA-06512: at line 1ORA-06512: at “SYS.DBMS_UMF”, line 794ORA-06512: at “SYS.DBMS_UMF”, line 712ORA-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_databaseexec DBMS_WORKLOAD_REPOSITORY.unregister_remote_database(‘LTACTESTPDG01′,’ EMNBBETA_Topology’,TRUE);注册到AWRexec DBMS_WORKLOAD_REPOSITORY.register_remote_database(node_name=>’LTACTESTPDG01′);PL/SQL procedure successfully completed.验证set line 132col topology_name format a20col node_name format a15SQL> select * from dba_umf_topology;TOPOLOGY_NAME TARGET_ID TOPOLOGY_VERSION TOPOLOGY_STATE——————– ———- —————- ————————EMNBBETA_Topology 798157014 6 ACTIVESQL> 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 OKEMNBBETA_Topology LTACTESTPDG01 524737559 0 FALSE FALSE OKSQL> select * from dba_umf_service;TOPOLOGY_NAME NODE_ID SERVICE_ID——————– ———- ———————EMNBBETA_Topology 524737559 AWR用RMF创建远程snapshotSQL> 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.sqlSpecify the Report Type~~~~~~~~~~~~~~~~~~~~~~~AWR reports can be generated in the following formats. Please enter thename of the format at the prompt. Defau免费云主机域名lt value is ‘html’. ‘html’ HTML format (default) ‘text’ Text format ‘active-html’ Includes Performance Hub active reportEnter value for report_type: htmlType Specified: htmlInstances 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: 524737559Using 524737559 for database IdEnter value for inst_num: 1Using 1 for instance numberSpecify 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
这篇文章主要介绍redis是不是关系型数据库,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!redis是一个key-value的nosql数据库(非关系型数据库)。支持存储的value类型包括string(字符串)、list(链表)、se…
免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。