我们可能会问的一个问题,虽然ODA的最新版本实际上是19.x,但是是否有可能在ODA中部署Oracle 21c数据库?
答案是肯定的。自ODA 19.12版以来,我们可以使用Oracle 21c安装DB系统,而裸机系统运行Oracle Grid Infrastructure 19.x,
要查看DB系统上支持的版本,只需运行命令descripe dbsystem image
[root@dbi-oda-x8 ~]# odacli describe-dbsystem-image DB System Image details -------------------------------------------------------------------------------- Component Name Supported Versions Available Versions -------------------- -------------------- -------------------- DBVM 19.14.0.0.0 19.14.0.0.0 GI 19.14.0.0.220118 19.14.0.0.220118 19.13.0.0.211019 19.13.0.0.211019 19.12.0.0.210720 not-available 19.11.0.0.210420 not-available 21.5.0.0.220118 not-available 21.4.0.0.211019 not-available 21.3.0.0.210720 not-available DB 19.14.0.0.220118 19.14.0.0.220118 19.13.0.0.211019 19.13.0.0.211019 19.12.0.0.210720 not-available 19.11.0.0.210420 not-available 21.5.0.0.220118 not-available 21.4.0.0.211019 not-available 21.3.0.0.210720 not-available [root@dbi-oda-x8 ~]#
复制
在博客中,我展示了我在ODA19.14的裸机上安装Oracle 21c数据库系统的一些实验。
[root@dbi-oda-x8 ~]# odacli describe-component System Version --------------- 19.14.0.0.0 System node Name --------------- dbi-oda-x8 Local System Version --------------- 19.14.0.0.0 Component Installed Version Available Version ---------------------------------------- -------------------- -------------------- OAK 19.14.0.0.0 up-to-date GI 19.14.0.0.220118 up-to-date DB { [ OraDB19000_home2,OraDB19000_home4 ] 19.14.0.0.220118 up-to-date [ OraDB12201_home1 ] 12.2.0.1.220118 up-to-date [ OraDB19000_home3 ] 19.13.0.0.211019 19.14.0.0.220118 } DCSCONTROLLER 19.14.0.0.0 up-to-date DCSCLI 19.14.0.0.0 up-to-date DCSAGENT 19.14.0.0.0 up-to-date DCSADMIN 19.14.0.0.0 up-to-date OS 7.9 up-to-date ILOM 5.0.2.24.r141466 up-to-date BIOS 52050300 up-to-date SHARED CONTROLLER FIRMWARE VDV1RL04 up-to-date LOCAL DISK FIRMWARE 1132 up-to-date SHARED DISK FIRMWARE 1132 up-to-date HMP 2.4.8.0.600 up-to-date [root@dbi-oda-x8 ~]#
复制
为了能够使用Oracle 21c(21.5)创建DB系统,首先,我们必须使用所需的补丁更新存储库。
所以,让我们下载以下补丁
–p33152235_1914000_Linux-x86-64.zip:Oracle Database Appliance 21.5.0.0.220118 数据库系统的GI克隆
–p33152237_1914000_Linux-x86-64.zip:Oracle Database Appliance 21.5.0.0.220118 数据库克隆文件,用于数据库系统
下载后,我们解压压缩文件
[root@dbi-oda-x8 mdi]# unzip p33152235_1914000_Linux-x86-64.zip Archive: p33152235_1914000_Linux-x86-64.zip extracting: odacli-dcs-19.14.0.0.0-220127-GI-21.5.0.0.zip inflating: README.txt [root@dbi-oda-x8 mdi]# unzip p33152237_1914000_Linux-x86-64.zip Archive: p33152237_1914000_Linux-x86-64.zip extracting: odacli-dcs-19.14.0.0.0-220127-DB-21.5.0.0.zip replace README.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: A inflating: README.txt [root@dbi-oda-x8 mdi]#
复制
然后让我们用这些文件更新存储库
对于GI堆栈
[root@dbi-oda-x8 ~]# /opt/oracle/dcs/bin/odacli update-repository -f /u03/app/oracle/mdi/odacli-dcs-19.14.0.0.0-220127-GI-21.5.0.0.zip { "jobId" : "c93133b6-be21-43cd-9a3a-9e58af6798fc", "status" : "Created", "message" : "/u03/app/oracle/mdi/odacli-dcs-19.14.0.0.0-220127-GI-21.5.0.0.zip", "reports" : [ ], "createTimestamp" : "April 27, 2022 08:46:00 AM CEST", "resourceList" : [ ], "description" : "Repository Update", "updatedTime" : "April 27, 2022 08:46:00 AM CEST" } [root@dbi-oda-x8 ~]#
复制
确保job成功完成
[root@dbi-oda-x8 ~]# odacli describe-job -i "c93133b6-be21-43cd-9a3a-9e58af6798fc" Job details ---------------------------------------------------------------- ID: c93133b6-be21-43cd-9a3a-9e58af6798fc Description: Repository Update Status: Success Created: April 27, 2022 8:46:00 AM CEST Message: /u03/app/oracle/mdi/odacli-dcs-19.14.0.0.0-220127-GI-21.5.0.0.zip Task Name Start Time End Time Status ---------------------------------------- ----------------------------------- ----------------------------------- ---------- Unzip bundle April 27, 2022 8:46:00 AM CEST April 27, 2022 8:46:26 AM CEST Success [root@dbi-oda-x8 ~]#
复制
对于数据库
[root@dbi-oda-x8 ~]# /opt/oracle/dcs/bin/odacli update-repository -f /u03/app/oracle/mdi/odacli-dcs-19.14.0.0.0-220127-DB-21.5.0.0.zip { "jobId" : "413f472f-7351-46f1-92e4-44d464b268bc", "status" : "Created", "message" : "/u03/app/oracle/mdi/odacli-dcs-19.14.0.0.0-220127-DB-21.5.0.0.zip", "reports" : [ ], "createTimestamp" : "April 27, 2022 08:47:59 AM CEST", "resourceList" : [ ], "description" : "Repository Update", "updatedTime" : "April 27, 2022 08:47:59 AM CEST" } [root@dbi-oda-x8 ~]#
复制
[root@dbi-oda-x8 ~]# odacli describe-job -i "413f472f-7351-46f1-92e4-44d464b268bc" Job details ---------------------------------------------------------------- ID: 413f472f-7351-46f1-92e4-44d464b268bc Description: Repository Update Status: Success Created: April 27, 2022 8:47:59 AM CEST Message: /u03/app/oracle/mdi/odacli-dcs-19.14.0.0.0-220127-DB-21.5.0.0.zip Task Name Start Time End Time Status ---------------------------------------- ----------------------------------- ----------------------------------- ---------- Unzip bundle April 27, 2022 8:48:00 AM CEST April 27, 2022 8:48:28 AM CEST Success [root@dbi-oda-x8 ~]#
复制
如果我们随后验证可用的镜像,我们应该可以在界面查询到的“Available Versions”列看到现在可用的21c镜像,您同样也可以在Oracle文档中找到一些json模板。
当然,您也可以使用GUI直接创建DB系统
[root@dbi-oda-x8 mdi]# odacli describe-dbsystem-image DB System Image details -------------------------------------------------------------------------------- Component Name Supported Versions Available Versions -------------------- -------------------- -------------------- DBVM 19.14.0.0.0 19.14.0.0.0 GI 19.14.0.0.220118 19.14.0.0.220118 19.13.0.0.211019 19.13.0.0.211019 19.12.0.0.210720 not-available 19.11.0.0.210420 not-available 21.5.0.0.220118 21.5.0.0.220118---------√√√√ 21.4.0.0.211019 not-available 21.3.0.0.210720 not-available DB 19.14.0.0.220118 19.14.0.0.220118 19.13.0.0.211019 19.13.0.0.211019 19.12.0.0.210720 not-available 19.11.0.0.210420 not-available 21.5.0.0.220118 21.5.0.0.220118---------√√√√ 21.4.0.0.211019 not-available 21.3.0.0.210720 not-available [root@dbi-oda-x8 mdi]#
复制
json模板:
[root@dbi-oda-x8 mdi]# cat mdi-dbi-ip42.json { "system": { "name": "mdi-dbi-ip42", "systemPassword": "******", "timeZone": "Europe/Zurich", "diskGroup": "DATA", "cpuPoolName": "cpuninja", "enableRoleSeparation": true }, "database": { "name": "MDIDB1", "uniqueName": "MDIDB1_42", "domainName": "dbi-lab.ch", "adminPassword": null, "version": "21.5.0.0.220118", "edition": "EE", "type": "SI", "dbClass": "OLTP", "shape": "odb2", "role": "PRIMARY", "targetNodeNumber": null, "enableDbConsole": false, "enableFlashStorage": false, "redundancy": null, "characterSet": { "characterSet": "AL32UTF8", "nlsCharacterset": "AL16UTF16", "dbTerritory": "AMERICA", "dbLanguage": "AMERICAN" }, "rmanBackupPassword": null, "enableTDE": false, "isCdb": true, "pdbName": "PDB1", "pdbAdminUser": "pdb1admin", "tdePassword": null }, "network": { "domainName": "dbi-lab.ch", "ntpServers": [ "216.239.35.0" ], "dnsServers": [ "8.8.8.8", "8.8.4.4" ], "nodes": [ { "name": "mdidbi42", "ipAddress": "10.36.0.242", "netmask": "255.255.255.0", "gateway": "10.36.0.1", "number": 0 } ], "publicVNetwork": "pubnet" }, "grid": { "language": "en", "enableAFD": false } } [root@dbi-oda-x8 mdi]#
复制
使用以下命令创建数据库系统
[root@dbi-oda-x8 mdi]# odacli create-dbsystem -p /u03/app/oracle/mdi/mdi-dbi-ip42.json Enter password for system "mdi-dbi-ip42": Retype password for system "mdi-dbi-ip42": Enter administrator password for DB "MDIDB1": Retype administrator password for DB "MDIDB1": Job details ---------------------------------------------------------------- ID: 65360c5e-cdc0-4fe4-98f4-d1422070f980 Description: DB System mdi-dbi-ip42 creation Status: Created Created: April 27, 2022 10:52:36 AM CEST Message: Task Name Start Time End Time Status ---------------------------------------- ----------------------------------- ----------------------------------- ---------- [root@dbi-oda-x8 mdi]#
复制
几分钟后,我们可以验证创建是否成功。
[root@dbi-oda-x8 ~]# odacli describe-job -i 65360c5e-cdc0-4fe4-98f4-d1422070f980 Job details ---------------------------------------------------------------- ID: 65360c5e-cdc0-4fe4-98f4-d1422070f980 Description: DB System mdi-dbi-ip42 creation Status: Success Created: April 27, 2022 10:52:36 AM CEST Message: Task Name Start Time End Time Status ---------------------------------------- ----------------------------------- ----------------------------------- ---------- Create DB System metadata April 27, 2022 10:52:36 AM CEST April 27, 2022 10:52:36 AM CEST Success Persist new DB System April 27, 2022 10:52:36 AM CEST April 27, 2022 10:52:36 AM CEST Success Validate DB System prerequisites April 27, 2022 10:52:36 AM CEST April 27, 2022 10:52:40 AM CEST Success Setup DB System environment April 27, 2022 10:52:40 AM CEST April 27, 2022 10:52:41 AM CEST Success Create DB System ASM volume April 27, 2022 10:52:41 AM CEST April 27, 2022 10:52:48 AM CEST Success Create DB System ACFS filesystem April 27, 2022 10:52:48 AM CEST April 27, 2022 10:52:57 AM CEST Success Create DB System VM ACFS snapshots April 27, 2022 10:52:57 AM CEST April 27, 2022 10:53:26 AM CEST Success Create temporary SSH key pair April 27, 2022 10:53:26 AM CEST April 27, 2022 10:53:27 AM CEST Success Create DB System cloud-init config April 27, 2022 10:53:27 AM CEST April 27, 2022 10:53:27 AM CEST Success Provision DB System VM(s) April 27, 2022 10:53:27 AM CEST April 27, 2022 10:53:28 AM CEST Success Attach disks to DB System April 27, 2022 10:53:28 AM CEST April 27, 2022 10:53:29 AM CEST Success Add DB System to Clusterware April 27, 2022 10:53:29 AM CEST April 27, 2022 10:53:29 AM CEST Success Start DB System April 27, 2022 10:53:29 AM CEST April 27, 2022 10:53:30 AM CEST Success Wait DB System VM first boot April 27, 2022 10:53:30 AM CEST April 27, 2022 10:54:42 AM CEST Success Setup Mutual TLS (mTLS) April 27, 2022 10:54:42 AM CEST April 27, 2022 10:55:01 AM CEST Success Export clones repository April 27, 2022 10:55:01 AM CEST April 27, 2022 10:55:01 AM CEST Success Setup ASM client cluster config April 27, 2022 10:55:01 AM CEST April 27, 2022 10:55:04 AM CEST Success Install DB System April 27, 2022 10:55:04 AM CEST April 27, 2022 11:22:46 AM CEST Success Cleanup temporary SSH key pair April 27, 2022 11:22:46 AM CEST April 27, 2022 11:22:47 AM CEST Success Set DB System as configured April 27, 2022 11:22:47 AM CEST April 27, 2022 11:22:47 AM CEST Success [root@dbi-oda-x8 ~]#
复制
我们可以查看新创建的数据库系统描述
[root@dbi-oda-x8 mdi]# odacli describe-dbsystem -n mdi-dbi-ip42 DB System details -------------------------------------------------------------------------------- ID: 731cdd55-7094-44fa-87c4-6941a422931b Name: mdi-dbi-ip42 Image: 19.14.0.0.0 Shape: odb2 Cluster name: dbs0fab9fed3 Grid version: 21.5.0.0.220118 Memory: 16.00 GB NUMA enabled: YES Status: CONFIGURED Created: 2022-04-27 10:52:36 CEST Updated: 2022-04-27 11:22:47 CEST CPU Pool -------------------------- Name: cpuninja Number of cores: 4 Host: dbi-oda-x8 Effective CPU set: 21-24,31-34 Online CPUs: 21, 22, 23, 24, 31, 32, 33, 34 Offline CPUs: NONE VM Storage -------------------------- Disk group: DATA Volume name: S0FAB9FED3 Volume device: /dev/asm/s0fab9fed3-390 Size: 200.00 GB Mount Point: /u05/app/sharedrepo/mdi-dbi-ip42 VMs -------------------------- Host: dbi-oda-x8 VM Name: x0fab9fed3 VM Host Name: mdidbi42.dbi-lab.ch VM image path: /u05/app/sharedrepo/mdi-dbi-ip42/.ACFS/snaps/vm_x0fab9fed3/x0fab9fed3 Target State: ONLINE Current State: ONLINE VNetworks -------------------------- Host: dbi-oda-x8 VM Name: x0fab9fed3 Public: 10.36.0.242 / 255.255.255.0 / ens3 / BRIDGE(pubnet) ASM: 192.168.17.10 / 255.255.255.128 / ens4 / BRIDGE(privasm) VLAN(priv0.100) Extra VNetworks -------------------------- Host: dbi-oda-x8 VM Name: x0fab9fed3 pubnet: 10.36.0.242 / 255.255.255.0 / PUBLIC Databases -------------------------- Name: MDIDB1 Resource ID: f964b35e-7209-4d2d-9fca-5387c61c2148 Unique name: MDIDB1_42 Database ID: 3671723533 Domain name: dbi-lab.ch DB Home ID: 51c91da9-af48-42b4-86b5-01e1cafe7711 Shape: odb2 Version: 21.5.0.0.220118 Edition: EE Type: SI Role: PRIMARY Class: OLTP Storage: ASM Redundancy: Target node name: Character set: AL32UTF8 NLS character set: Language: AMERICAN Territory: AMERICA Console enabled: false SEHA enabled: false Associated networks: Public-network Backup config ID: Level 0 Backup Day: sunday Autobackup enabled: true TDE enabled: false CDB type: true PDB name: PDB1 PDB admin user: pdb1admin [root@dbi-oda-x8 mdi]#
复制
以上就是全部的安装内容。当连接到DB系统服务器时,我们可以像管理其他数据库一样管理数据库。
[root@mdidbi42 trace]# ps -ef | grep pmon root 6218 23103 0 11:36 pts/0 00:00:00 grep --color=auto pmon oracle 90406 1 0 11:21 ? 00:00:00 ora_pmon_MDIDB1 [root@mdidbi42 trace]#
复制
我们可以连接到数据库并验证版本是否为21c
[oracle@mdidbi42 ~]$ sqlplus / as sysdba SQL*Plus: Release 21.0.0.0.0 - Production on Wed Apr 27 11:36:30 2022 Version 21.5.0.0.0 Copyright (c) 1982, 2021, Oracle. All rights reserved. Connected to: Oracle Database 21c Enterprise Edition Release 21.0.0.0.0 - Production Version 21.5.0.0.0 SQL>
复制
数据库组件版本
SQL> select comp_name,version,status from dba_registry; COMP_NAME VERSION STATU ----------------------------------- ---------- ----- Oracle Database Catalog Views 21.0.0.0.0 VALID Oracle Database Packages and Types 21.0.0.0.0 VALID Oracle Real Application Clusters 21.0.0.0.0 VALID JServer JAVA Virtual Machine 21.0.0.0.0 VALID Oracle XDK 21.0.0.0.0 VALID Oracle Database Java Packages 21.0.0.0.0 VALID OLAP Analytic Workspace 21.0.0.0.0 VALID Oracle XML Database 21.0.0.0.0 VALID Oracle Workspace Manager 21.0.0.0.0 VALID Oracle Text 21.0.0.0.0 VALID Oracle Multimedia 21.0.0.0.0 VALID Oracle OLAP API 21.0.0.0.0 VALID Spatial 21.0.0.0.0 VALID Oracle Locator 21.0.0.0.0 VALID Oracle Label Security 21.0.0.0.0 VALID Oracle Database Vault 21.0.0.0.0 VALID 16 rows selected.
复制
RU版本
SQL> select description from dba_registry_sqlpatch; DESCRIPTION -------------------------------------------------------------------------------- Database Release Update : 21.5.0.0.220118 (33516412)
复制
结论
我们已经看到,即使我的ODA是19.x版本,我们同样可以部署21c数据库。
原文标题:Configure DB System Oracle 21c in a ODA 19.14
原文作者:Mouhamadou Diaw
原文链接:https://www.dbi-services.com/blog/configure-db-system-oracle-21c-in-a-oda-19-14/