当前位置:网站首页>Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (4) -- modify the scanip of Oracle11g RAC cluster
Migrate Oracle database from windows system to Linux Oracle RAC cluster environment (4) -- modify the scanip of Oracle11g RAC cluster
2022-06-25 02:24:00 【Rsda DBA_ WGX】
hold Oracle Database from Windows System migration to Linux Oracle Rac Cluster environment (4)—— modify oracle11g rac Clustered scanIP
Catalog
- hold Oracle Database from Windows System migration to Linux Oracle Rac Cluster environment (4)—— modify oracle11g rac Clustered scanIP
- One 、 see scan ip Status information
- Two 、 stop it scan_listener and scan
- 3、 ... and 、 modify /etc/hosts In the document scanIP( All nodes )
- Four 、 modify DNS Service configuration information
- 5、 ... and 、 modify SCAN name
- 6、 ... and 、 start-up scan and scan_listener
- 7、 ... and 、 test : Use the new scanIP Access database
- 8、 ... and 、 solve ORA-12514 error
When migrating data in a production environment , You need to create the target database cluster first , After the data migration is successful, the original IP Address access oracle database , In this way, the original client does not need to make any changes . here , You need to change the target database cluster scanIP For the source database IP Address .
When the client application uses scanIP When accessing the database ,scan listener Will forward the connection to local listener On . node rac1 The local monitoring content of is as follows :
LISTENER_RAC1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.101)(PORT=1521)
(IP=FIRST)))) # line added by Agent
One 、 see scan ip Status information
[[email protected] ~]$ srvctl config scan
SCAN name: rac-scan, Network: 1/192.168.1.0/255.255.255.0/ens34
SCAN VIP name: scan1, IP: /rac-scan/192.168.1.201
Two 、 stop it scan_listener and scan
# stop it scan_listener and scan
srvctl stop scan_listener
srvctl stop scan
# ---------------------------------------------------------------------
[[email protected] ~]$ srvctl stop scan_listener
[[email protected] ~]$ srvctl stop scan
# see scan_listener and scan The state of
[[email protected] ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
[[email protected] ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
[[email protected] ~]$ crs_stat -t | grep scan
ora.scan1.vip ora....ip.type OFFLINE OFFLINE
[[email protected] ~]$ crs_stat -t | grep lsnr
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type OFFLINE OFFLINE
ora....C1.lsnr application ONLINE ONLINE rac1
ora....C2.lsnr application ONLINE ONLINE rac2
3、 ... and 、 modify /etc/hosts In the document scanIP( All nodes )
# Switch to root user , node 1 and node 2 At the same time to modify scan IP
[[email protected] ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
#Public Network (bond1)—— public IP
192.168.1.101 rac1
192.168.1.102 rac2
#Private Interconnect (bond2)—— private IP
10.1.1.101 rac1-priv
10.1.1.102 rac2-priv
#Virtual IP—— fictitious IP, And bond1 Must be in the same network segment
192.168.1.111 rac1-vip
192.168.1.112 rac2-vip
#scan IP
192.168.1.221 my-racscan # Turned out to be :192.168.1.201
Four 、 modify DNS Service configuration information
[[email protected] ~]# vi /var/named/chroot/var/named/1.168.192.local
$TTL 86400
@ IN SOA dns.oracle.com. root.oracle.com. (
19997022700 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ) ; minimum
@ IN NS dns.oracle.com.
101 IN PTR dns.oracle.com.
101 IN PTR rac1.oracle.com.
102 IN PTR rac2.oracle.com.
221 IN PTR scan.oracle.com. # Turned out to be :201
[[email protected] ~]# vi /var/named/chroot/var/named/oracle.com.zone
$TTL 86400
@ IN SOA dns.oracle.com. root.oracle.com. (
42 ; serial
3H ; refresh
15M ; retry
1W ; expire
1D ) ; minimum
@ IN NS dns.oracle.com.
dns IN A 192.168.1.101
rac1 IN A 192.168.1.101
rac2 IN A 192.168.1.102
scan IN A 192.168.1.221 # Turned out to be :192.168.1.201
# restart named service
[[email protected] ~]# systemctl restart named
# test
[[email protected] ~]# nslookup 192.168.1.221
Server: 192.168.1.101
Address: 192.168.1.101#53
221.1.168.192.in-addr.arpa name = scan.oracle.com.
[[email protected] ~]# nslookup scan.oracle.com
Server: 192.168.1.101
Address: 192.168.1.101#53
Name: scan.oracle.com
Address: 192.168.1.221
5、 ... and 、 modify SCAN name
# Switch to root user
[[email protected] ~]# cd /u01/app/11.2.0/grid/bin
[[email protected] bin]# pwd
/u01/app/11.2.0/grid/bin
[[email protected] bin]# ./srvctl modify scan -n my-racscan
# see scan ip Status information
[[email protected] bin]# ./srvctl config scan
SCAN name : my-racscan, The Internet : 1/192.168.1.0/255.255.255.0/ens34
SCAN VIP name : scan1, IP: /my-racscan/192.168.1.221
6、 ... and 、 start-up scan and scan_listener
# start-up scan and scan_listener
[[email protected] admin]$ srvctl start scan
[[email protected] admin]$ srvctl start scan_listener
# see scan and scan_listener The state of :
[[email protected] admin]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac1
[[email protected] admin]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac1
[[email protected] admin]$ crs_stat -t | grep scan
ora.scan1.vip ora....ip.type ONLINE ONLINE rac1
[[email protected] admin]$ crs_stat -t | grep lsnr
ora....ER.lsnr ora....er.type ONLINE ONLINE rac1
ora....N1.lsnr ora....er.type ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora....C2.lsnr application ONLINE ONLINE rac2
7、 ... and 、 test : Use the new scanIP Access database
1、 Test new scanIP Whether you can use
[[email protected] ~]$ ping 192.168.1.221
PING 192.168.1.221 (192.168.1.221) 56(84) bytes of data.
64 bytes from 192.168.1.221: icmp_seq=1 ttl=64 time=2.84 ms
64 bytes from 192.168.1.221: icmp_seq=2 ttl=64 time=0.267 ms
64 bytes from 192.168.1.221: icmp_seq=3 ttl=64 time=14.3 ms
^C
--- 192.168.1.221 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.267/5.827/14.374/6.134 ms
2、 Use the new scanIP Access database
[oracle@rac1 ~]$ sqlplus sys/oracle@192.168.1.221/hisdb as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 19 10:24:11 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
-- There is an error , Error code :ORA-12514
8、 ... and 、 solve ORA-12514 error
1、 At the node rac1 Do the following
-- View parameters :remote_listener
SQL> show parameter remote_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_listener string
-- Modify the parameters remote_listener The value of is empty
SQL> alter system set remote_listener='';
System altered.
-- register
SQL> alter system register;
System altered.
-- Modify the parameters remote_listener Value
SQL> alter system set remote_listener='my-racscan:1521';
System altered.
-- View parameters :remote_listener
SQL> show parameter remote_listener
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_listener string my-racscan:1521
2、 test : Use the new scanIP Access database
[[email protected] ~]$ sqlplus sys/[email protected]/hisdb as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 22 13:57:47 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
边栏推荐
- Please run IDA with elevated permissons for local debugging.
- Redistemplate operates redis. This article is enough (I) [easy to understand]
- 3 years of testing experience. I don't even understand what I really need on my resume. I need 20K to open my mouth?
- 对进程内存的实践和思考
- 软件测试人员的7个等级,据说只有1%的人能做到级别7
- 内网学习笔记(7)
- Basic layout -qhboxlayout class, qvboxlayout class, qgridlayout class
- Smartctl opens the device and encounters permission denied problem troubleshooting process record
- Hashcat 的使用
- 把 Oracle 数据库从 Windows 系统迁移到 Linux Oracle Rac 集群环境(3)—— 把数据库设置为归档模式
猜你喜欢
The ecosystem of the yuan universe
It's 2022, and you still don't know what performance testing is?
Left hand dreams right hand responsibilities GAC Honda not only pays attention to sales but also children's safety
DDD概念复杂难懂,实际落地如何设计代码实现模型?
Exploring the mystery of C language program -- C language program compilation and preprocessing
业务与技术双向结合构建银行数据安全管理体系
yarn : 无法加载文件 C:\Users\xxx\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本
Folding screen will become an important weapon for domestic mobile phones to share the apple market
How to monitor the log through the easycvr interface to observe the platform streaming?
Cusdis - lightweight, privacy first open source comment system | chain of the city
随机推荐
linux上查看mysql的密码_Linux下MySQL忘记密码「建议收藏」
软件测试人员的7个等级,据说只有1%的人能做到级别7
消息称一加将很快更新TWS耳塞、智能手表和手环产品线
Cusdis - 轻量级、隐私优先的开源评论系统 | 倾城之链
AI服装生成,帮你完成服装设计的最后一步
Lizuofan, co-founder of nonconvex: Taking quantification as his lifelong career
LINQ 查询(3)
Cusdis - lightweight, privacy first open source comment system | chain of the city
内网学习笔记(7)
internship:svn的使用
数据库系统概论必背知识
vim的Dirvish中文文档
会自动化—10K,能做自动化—20K,你搞懂自动化测试没有?
目录权限错误导致 Oracle 11g rac 集群数据库无法启动的问题
ProcessOn制作ER过程(自定义)
一线城市软件测试工资——你拖后腿了吗
字符串数组转换为list集合
【STL源码剖析】配置器(待补充)
Pit entry machine learning: I. Introduction
调用系统函数安全方案