惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
LINUX DO - 热门话题
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Threat Research - Cisco Blogs
AI
AI
B
Blog RSS Feed
S
Schneier on Security
雷峰网
雷峰网
Schneier on Security
Schneier on Security
Help Net Security
Help Net Security
Cloudbric
Cloudbric
L
LINUX DO - 最新话题
罗磊的独立博客
有赞技术团队
有赞技术团队
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
The Hacker News
The Hacker News
博客园 - Franky
Attack and Defense Labs
Attack and Defense Labs
The Cloudflare Blog
Webroot Blog
Webroot Blog
Last Week in AI
Last Week in AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 叶小钗
美团技术团队
L
Lohrmann on Cybersecurity
T
The Blog of Author Tim Ferriss
The Last Watchdog
The Last Watchdog
T
Troy Hunt's Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
Know Your Adversary
Know Your Adversary
O
OpenAI News
博客园 - 【当耐特】
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cybersecurity and Infrastructure Security Agency CISA
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
PCI Perspectives
PCI Perspectives
H
Heimdal Security Blog
I
InfoQ
GbyAI
GbyAI
T
Threatpost
C
Cisco Blogs

博客园 - likingzi

数据库IO性能优化思考 RAID10和RAID5性能对比测试 迁移MySQL数据到Oracle实践记录 瀚高数据库不同版本对实例级用户的支持情况 使用benchmarksql测试数据库处理能力 BigCloud Enterprise Linux 8和Rocky Linux 8升级OpenSSH步骤 【翻译】凝视深渊:千核并发控制的评估 NFS使用TrueNAS SCALE的好处 linux 手动释放内存 linux8安装oracle 11g遇到的问题记录 ARM架构鲲鹏主机BClinux离线安装docker步骤 ORA-01658创建表或索引报错分析 MySQL PXC 集群死锁分析案例 MySQL PXC集群多个节点同时大量并发update同一行 MongoDB集群同步 【最佳实践】MySQL数据库迁移到PXC集群 MySQL PXC集群配置IPv6 【实操记录】MySQL主从配置 【实操记录】MySQL二进制安装包部署 MongoDB分片+副本集高可用集群的启停步骤
记录一下oracle 19c的集群节点移除、新增操作
likingzi · 2024-07-23 · via 博客园 - likingzi

虽然掌握得不够深入,但越来越讨厌oracle数据库这个软件了,实在不愿意再孤岛这个笨重、复杂的oracle了。今天花了好几个小时操作一个实验环境的迁移、配置,记录几个步骤吧,也许后续会有用。

■ 查看数据库配置信息

[oracle@node1:0 ~]$ srvctl config database -db likingdb
Database unique name: likingdb
Database name: likingdb
Database instances: likingdb1,likingdb2,likingdb3
Configured nodes: node1,node2,node3

■ 删除db实例3

dbca -silent -deleteInstance -nodeList node3 -gdbName likingdb -instanceName likingdb3 [-sysDBAUserName sysdba -sysDBAPassword password]
||

[oracle@node1:0 ~]$ dbca -silent -deleteInstance -nodeList node3 -gdbName likingdb -instanceName likingdb3
[WARNING] [DBT-19203] The Database Configuration Assistant will delete the Oracle instance and its associated OFA directory structure. All information about this instance will be deleted.
Prepare for db operation
40% complete
Deleting instance
Unable to copy the file "node3:/etc/oratab" to "/tmp/oratab.node3".
48% complete
52% complete
56% complete
60% complete
64% complete
68% complete
72% complete
76% complete
80% complete
Completing instance management.
100% complete
[FATAL] Illegal Capacity: -1
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/likingdb/likingdb.log" for further details.

■ 更新inventory

su - oracle
cd $ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1 "CLUSTER_NODES={node1,node2}"

■ 在node3删除GI节点

[root@node3:1 /u01/app/12.2.0/grid/crs/install]# ./rootcrs.sh -deconfig -force
Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/node3/crsconfig/crsdeconfig_node3_2024-07-23_04-57-58PM.log
PRCR-1070 : 无法检查 资源 ora.net1.network 是否已注册
CRS-0184 : Cannot communicate with the CRS daemon.
PRCR-1070 : 无法检查 资源 ora.helper 是否已注册
CRS-0184 : Cannot communicate with the CRS daemon.
PRCR-1070 : 无法检查 资源 ora.ons 是否已注册
CRS-0184 : Cannot communicate with the CRS daemon.
2024/07/23 16:58:06 CLSRSC-180: An error occurred while executing the command '/u01/app/12.2.0/grid/bin/srvctl config nodeapps'
2024/07/23 16:58:17 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
2024/07/23 17:00:20 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
2024/07/23 17:00:21 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node

■ 在node1删除node3的CRS配置

[root@node1:0 /etc/oracle/scls_scr/node1/root]# crsctl delete node -n node3
CRS-4661: Node node3 successfully deleted.

■ 在删除节点上更新node list

su - grid
cd $ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=/u01/app/12.2.0/grid "CLUSTER_NODES={node3}" CRS=TRUE -silent -local

■ 在活动节点删除VIP配置

su - grid
srvctl config vip -node node3
srvctl stop vip -node node3
srvctl remove vip -vip node3-vip

■ 在node1检查确认

cluvfy stage -post nodedel -n node3

■ 删除db实例2

dbca -silent -deleteInstance -nodeList node2 -gdbName likingdb -instanceName likingdb2
||
[oracle@node1:0 ~]$ dbca -silent -deleteInstance -nodeList node2 -gdbName likingdb -instanceName likingdb2
[WARNING] [DBT-19203] Database Configuration Assistant 将删除 Oracle 实例及其关联的 OFA 目录结构。所有有关此实例的信息都将被删除。

准备执行数据库操作
已完成 40%
正在删除实例
无法将文件 "node2:/etc/oratab" 复制为 "/tmp/oratab.node2"。
已完成 48%
已完成 52%
已完成 56%
已完成 60%
已完成 64%
已完成 68%
已完成 72%
已完成 76%
已完成 80%
正在进行实例管理。
已完成 100%
[FATAL] Illegal Capacity: -1
有关详细信息, 请参阅日志文件 "/u01/app/oracle/cfgtoollogs/dbca/likingdb/likingdb0.log"。

■ 更新inventory

su - oracle
cd $ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1 "CLUSTER_NODES={node1}"

■ 在node2删除GI节点

同上

■ 在node1删除node2的CRS配置

crsctl delete node -n node2

■ 在删除节点上更新node list

su - grid
cd $ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=/u01/app/12.2.0/grid "CLUSTER_NODES={node2}" CRS=TRUE -silent -local

■ 在活动节点删除VIP配置

su - grid
srvctl config vip -node node2
srvctl stop vip -node node2
srvctl remove vip -vip node2-vip

■ 在node1检查确认

cluvfy stage -post nodedel -n node2

■ 增加GI节点node2

首先要配置好ssh互信
${ORACLE_HOME}/oui/prov/resources/scripts/sshUserSetup.sh -hosts "node1 node2 node3" -user grid -advanced

su - grid
cd ${ORACLE_HOME}/bin
cluvfy comp peer -refnode node1 -n node2
cd ${ORACLE_HOME}/addnode
./addnode.sh -silent -ignoreSysPrereqs -ignorePrereqFailure "CLUSTER_NEW_NODES={node2}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={node2-priv2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={node2-vip}"

各种报错,实在不愿意鼓捣了

srvctl remove vip -vip node2-vip -force