当前位置:网站首页>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>
边栏推荐
- [mobile terminal] design size of mobile phone interface
- When an interface has an exception, how do you analyze the exception?
- 商城项目 pc----商品详情页
- Are programmers from Huawei, Alibaba and other large manufacturers really easy to find?
- 非凸联合创始人李佐凡:将量化作为自己的终身事业
- 【STL源码剖析】配置器(待补充)
- 转行软件测试2年了,给还在犹豫的女生一点建议
- Logminer database log mining
- Constant current circuit composed of 2 NPN triodes
- 产业互联网的概念里有「互联网」字眼,但却是一个和互联网并不关联的存在
猜你喜欢

保险APP适老化服务评测分析2022第06期

高速缓存Cache详解(西电考研向)

Can automate - 10k, can automate - 20K, do you understand automated testing?

都2022年了,你还不了解什么是性能测试?

分布式事务解决方案和代码落地

数据库系统概论必背知识

yarn : 无法加载文件 C:\Users\xxx\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本

random list随机生成不重复数

qt打包exe文件,解决“无法定位程序输入点_ZdaPvj于动态链接库Qt5Cored.dll”
Cusdis - lightweight, privacy first open source comment system | chain of the city
随机推荐
Application of TSDB in civil aircraft industry
数据库系统概论必背知识
Beescms website penetration test and repair comments "suggestions collection"
AI服装生成,帮你完成服装设计的最后一步
Folding screen will become an important weapon for domestic mobile phones to share the apple market
Chrysanthemum chain (winter vacation daily question 39)
yarn : 无法加载文件 C:\Users\xxx\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本
调用系统函数安全方案
入坑机器学习:一,绪论
What are the SQL aggregate functions
02 common codes for Epicor secondary development
DDD concept is complex and difficult to understand. How to design code implementation model in practice?
Convert string array to list collection
When they are in private, they have a sense of propriety
[live review] battle code pioneer phase 7: how third-party application developers contribute to open source
Intranet learning notes (5)
【Proteus仿真】Arduino UNO+数码管显示4x4键盘矩阵按键
3 years of testing experience. I don't even understand what I really need on my resume. I need 20K to open my mouth?
【移动端】手机界面的设计尺寸
Qt中使用QDomDocument操作XML文件