配置数据网络
1. 配置监听
[root@pdg ~]# su - grid
[grid@pdg ~]$ vim /oracle/19.0.0/grid/network/admin/listener.ora
LISTENER_DG =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.11)(PORT = 1525))
)
)
)
SID_LIST_LISTENER_DG =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /oracle/app/oracle/product/19.0.0/dbhome_1)
(SID_NAME = test)
(GLOBAL_DBNAME = test)
)
)
lsnrctl start LISTENER_DG
lsnrctl status LISTENER_DG
LISTENER_DG =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.21)(PORT = 1525))
)
)
)
SID_LIST_LISTENER_DG =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME = /oracle/app/oracle/product/19.0.0/dbhome_1)
(SID_NAME = test)
(GLOBAL_DBNAME = test)
)
)
lsnrctl start LISTENER_DG
lsnrctl status LISTENER_DG
[root@pdg ~]# su - oracle
[oracle@pdg ~]$ vim /oracle/app/oracle/product/19.0.0/dbhome_1/network/admin/tnsnames.ora
pdg =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.11)(PORT = 1525))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
sdg =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.21)(PORT = 1525))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
(UR=A)
)
)
[root@sdg ~]# su – oracle
[oracle@sdg ~]$ vim /oracle/app/oracle/product/19.0.0/dbhome_1/network/admin/tnsnames.ora
pdg =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.11)(PORT = 1525))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
sdg =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.21)(PORT = 1525))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
(UR=A)
)
)
tnsping pdg
tnsping sdg
注:配置数据网络时提前配置好第二张网卡。
主库配置
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter system set log_archive_dest_1=location=+data/arch;
SQL> alter database archivelog;
SQL> alter database open;
SQL> select name,log_mode,force_logging from v$database;
NAME LOG_MODE FORCE_LOGGING
--------- ------------ ---------------------------------------
TEST ARCHIVELOG NO
SQL> alter database force logging;
Database altered.
SQL> select name,log_mode,force_logging from v$database;
NAME LOG_MODE FORCE_LOGGING
--------- ------------ ---------------------------------------
TEST ARCHIVELOG YES
alter database add standby logfile group 11 +data/test/onlinelog/stb01.log size 200M;
alter database add standby logfile group 12 +data/test/onlinelog/stb02.log size 200M;
alter database add standby logfile group 13 +data/test/onlinelog/stb03.log size 200M;
alter database add standby logfile group 14 +data/test/onlinelog/stb04.log size 200M;
SQL> select group#,bytes/1024/1024 from v$standby_log;
alter system set db_unique_name=test scope=spfile;
alter system set log_archive_config=dg_config=(test,sdg);
alter system set log_archive_dest_1=LOCATION=+data/arch valid_for=(all_logfiles,all_roles) db_unique_name=test;
alter system set log_archive_dest_2=service=sdg lgwr sync valid_for=(online_logfile,primary_role) db_unique_name=sdg;
alter system set log_archive_dest_state_1=enable;
alter system set log_archive_dest_state_2=enable;
alter system set fal_client=test;
alter system set fal_server=sdg;
alter system set standby_file_management=AUTO;
alter system set db_file_name_convert=+data/test/adg,+data/test/adgscope=spfile;
alter system set log_file_name_convert=+data/test/adg,+data/test/adgscope=spfile;
create pfile=/oracle/app/oracle/product/19.0.0/dbhome_1/dbs/pfile.ora
scp pfile.ora oracle@192.168.168.21: /oracle/app/oracle/product/19.0.0/dbhome_1/dbs/pfile.ora
scp orapwtest oracle@192.168.168.21: /oracle/app/oracle/product/19.0.0/dbhome_1/dbs/orapwtest
备库操作
*.db_file_name_convert=+data/test,+data/test
*.db_name=test
*.db_unique_name=sdg
*.fal_client=sdg
*.fal_server=test
*.log_archive_config=dg_config=(sdg,test)
*.log_archive_dest_1=LOCATION=+data/arch valid_for=(all_logfiles,all_roles) db_unique_name=sdg
*.log_archive_dest_2=service=test lgwr sync valid_for=(online_logfile,primary_role) db_unique_name=test
*.log_archive_dest_state_1=enable
*.log_archive_dest_state_2=enable
*.log_file_name_convert=+data/test,+data/test
SQL> startup nomount pfile=/oracle/app/oracle/product/19.0.0/dbhome_1/dbs/pfile.ora;
ORACLE instance started.
Total System Global Area 2516581464 bytes
Fixed Size 8899672 bytes
Variable Size 536870912 bytes
Database Buffers 1962934272 bytes
Redo Buffers 7876608 bytes
[oracle@sdg dbs]$ rman target=sys/oracle@pdg auxiliary sys/oracle@sdg
duplicate target database for standby nofilenamecheck from active database;
启动备库
alter database recover managed standby database disconnect from session;
recover managed standby database cancel;
alter database open;
ALTER DATABASE recover managed standby database using current logfile disconnect;
SQL> select database_role,open_mode,switchover_status from v$database;
DATABASE_ROLE OPEN_MODE SWITCHOVER_STATUS
---------------- -------------------- --------------------
PHYSICAL STANDBY READ ONLY NOT ALLOWED
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129603.html
摘要:序言在实际开发项目过程中如果说要用到缓存那么第一个想到的一定是但是为什么选大多数人都不会去了解也不会去思考只知道它能当缓存使用比数据库快一点恰巧我也是这样的一个人所以当我想写一篇关于介绍的时候我竟然无从说起这也是对于以及主流内存数据库不熟的 showImg(https://segmentfault.com/img/bVbi2tN?w=240&h=80); 序言 在实际开发项目过程中,...
摘要:作者使用实现了,并将其开源放在了上。在年的两个问题上分别取得了第一名和第二名。的获取方式是第层,形状为,的获取方式是第层,形状为。每个卷积核可以看做是图形的一种特征抽取。相关性的描述使用余弦相似性,而余弦相似性又正比于两种特征的点积。 showImg(https://segmentfault.com/img/bVPmNA?w=1056&h=707); Neural Style是一个非常...
阅读 1346·2023-01-11 13:20
阅读 1684·2023-01-11 13:20
阅读 1132·2023-01-11 13:20
阅读 1858·2023-01-11 13:20
阅读 4099·2023-01-11 13:20
阅读 2704·2023-01-11 13:20
阅读 1385·2023-01-11 13:20
阅读 3594·2023-01-11 13:20