安装数据库

1.不要创建容器数据库
2.设置字符集为utf-8
3.设置联机日志为300m
4.检查创建pfile文件追加_allow_insert_with_update_check=TRUE 值,以initORCL.ora启动数据库,重新创建spfile

  1. alter system set "_optimizer_nlj_hj_adaptive_join"= FALSE scope=spfile sid='*';
  2. 19c安装emcc13.4追加下列参数
  3. alter system set "_optimizer_strans_adaptive_pruning" = FALSE scope=spfile sid='*';
  4. alter system set "_px_adaptive_dist_method" = OFF scope=spfile sid='*';
  5. alter system set "_sql_plan_directive_mgmt_control" = 0 scope=spfile sid='*';
  6. alter system set "_optimizer_dsdir_usage_control" = 0 scope=spfile sid='*';
  7. alter system set "_optimizer_use_feedback" = FALSE scope=spfile sid='*';
  8. alter system set "_optimizer_gather_feedback" = FALSE scope=spfile sid='*';
  9. alter system set "_optimizer_performance_feedback" = OFF scope=spfile sid='*';
  10. alter system set "_allow_insert_with_update_check" = TRUE scope=spfile sid='*';
  11. alter system set parallel_min_servers=0;
  12. alter system set session_cached_cursors=400 scope=spfile;
  13. alter system set log_buffer=8M scope=spfile;
  14. alter system set open_cursors=600 scope=spfile;
  15. alter system set pga_aggregate_target=2G scope=spfile;
  16. alter system set processes=1000 scope=spfile;
  17. alter system set session_cached_cursors=400 scope=spfile;
  18. alter system set sga_max_size=8G scope=spfile;
  19. alter system set sga_target=8G scope=spfile;
  20. alter system set shared_pool_size=1G scope=spfile;
  21. startup pfile='/opt/oracle/product/19c/dbhome_1/dbs/initORCL.ora';
  22. SQL> create spfile from memory;
  23. 下记为参考值
  24. --------------------------------------------------------------
  25. alter system set session_cached_cursors=400 scope=spfile;
  26. alter system set shared_pool_size=1G scope=spfile;
  27. alter system set sga_target=5G scope=spfile;
  28. alter system set pga_aggregate_target=1G scope=spfile;
  29. Recommendation : All adaptive features parameters should be unset for improved SQL performance
  30. ---------------19c 安装emcc13.5报错处理-------------------------
  31. alter system reset "_optimizer_nlj_hj_adaptive_join" scope=both sid='*';
  32. alter system reset "_optimizer_strans_adaptive_pruning" scope=both sid='*';
  33. alter system reset "_px_adaptive_dist_method" scope=both sid='*';
  34. alter system reset "_sql_plan_directive_mgmt_control" scope=both sid='*';
  35. alter system reset "_optimizer_dsdir_usage_control" scope=both sid='*';
  36. alter system reset "_optimizer_use_feedback" scope=both sid='*';
  37. alter system reset "_optimizer_gather_feedback" scope=both sid='*';
  38. alter system reset "_optimizer_performance_feedback" scope=both sid='*';

准备环境

1.Oracle Management Service的内核参数要求:

  1. [oracle@emcc ~]$ cat /proc/sys/net/ipv4/ip_local_port_range
  2. 11000 65000
  3. 修改/etc/sysctl.d/ 下面三个配置文件值,以防万一都修改而后重启系统生效
  4. net.ipv4.ip_local_port_range = 11000 65000
  5. [root@emcc sysctl.d]# ls
  6. 99-initial-sysctl.conf 99-sysctl.conf
  7. 99-oracle-database-preinstall-19c-sysctl.conf

2.建立目录:

  1. mkdir /u01/app/middleware -p
  2. mkdir /u01/app/agent -p
  3. chown -R oracle:oinstall /u01/app
  4. chmod -R 755 /u01/app

3.安装软件包

  1. yum install gcc glibc-devel.i686 -y

3.启动emcc

  1. 2.启动oms
  2. <OMS_HOME>
  3. cd /app/middleware/bin
  4. ./emctl getversion oms
  5. ./emctl status oms
  6. ./emctl status oms -details
  7. ./emctl status oms -details -sysman_pwd Oracle123
  8. ./emctl list properties
  9. ./emctl stop oms
  10. ./emctl start oms
  11. 启动日志
  12. /app/gc_inst1/user_projects/domains/GCDomain/servers/EMGC_OMS1/logs/EMGC_OMS1.out

启动agent

  1. 3.启动agent
  2. <AGENT_HOME>
  3. cd /u02/agent/agent_13.3.0.0.0/bin
  4. ./emctl getversion agent
  5. ./emctl status agent
  6. ./emctl stop agent
  7. ./emctl start agent
  8. ./emctl pingOMS
  9. ./emctl upload agent
  10. 端口:3872

4.数据库启动错误

  1. SQL> startup
  2. ORACLE instance started.
  3. Total System Global Area 5368708176 bytes
  4. Fixed Size 8907856 bytes
  5. Variable Size 1207959552 bytes
  6. Database Buffers 4143972352 bytes
  7. Redo Buffers 7868416 bytes
  8. Database mounted.
  9. ORA-03113: end-of-file on communication channel
  10. Process ID: 6634
  11. Session ID: 261 Serial number: 21790

5.修改密码

  1. ./emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd

原因闪回空间不足,增加 db_recovery_file_dest_size大小。

  1. SQL> show parameters recov
  2. NAME TYPE VALUE
  3. ------------------------------------ ----------- ------------------------------
  4. db_recovery_file_dest string /opt/oracle/fast_recovery_area
  5. db_recovery_file_dest_size big integer 8256M
  6. db_unrecoverable_scn_tracking boolean TRUE
  7. recovery_parallelism integer 0
  8. remote_recovery_file_dest string
  9. SQL> alter system set db_recovery_file_dest_size=20G scope=spfile;

emcli agent 下载
https://dbakevlar.com/2013/10/em12c-agent-deployment-on-windows/