Standby Database :
▼▼▼
[oracle@localhost ~]$ telnet 172.25.18.252 1521
Trying 172.25.18.252...
Connected to 172.25.18.252.
Escape character is ^].
^C
^CConnection closed by foreign host.
[oracle@localhost ~]$
# tnsnames.ora Network Configuration File: /u01/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
▼▼▼
PTGBSS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.25.18.251)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ptgbss)
)
)
PTGBSSDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.25.18.252)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ptgbssdg)
(UR=A)
)
)
▼▼▼
alter database add standby logfile thread 1 group 10 /u01/oradata/ptgbss/redo10.log size 1024M;
alter database add standby logfile thread 1 group 11 /u01/oradata/ptgbss/redo11.log size 1024M;
alter database add standby logfile thread 1 group 12 /u01/oradata/ptgbss/redo12.log size 1024M;
alter database add standby logfile thread 1 group 13 /u01/oradata/ptgbss/redo13.log size 1024M;
alter database add standby logfile thread 1 group 14 /u01/oradata/ptgbss/redo14.log size 1024M;
alter database add standby logfile thread 1 group 15 /u01/oradata/ptgbss/redo15.log size 1024M;
alter database add standby logfile thread 1 group 16 /u01/oradata/ptgbss/redo16.log size 1024M;
alter database add standby logfile thread 1 group 17 /u01/oradata/ptgbss/redo17.log size 1024M;
alter database add standby logfile thread 1 group 18 /u01/oradata/ptgbss/redo18.log size 1024M;
alter database add standby logfile thread 1 group 19 /u01/oradata/ptgbss/redo19.log size 1024M;
▼▼▼
alter system set LOG_ARCHIVE_CONFIG=DG_CONFIG=(ptgbss,ptgbssdg) scope=both ;
alter system set LOG_ARCHIVE_DEST_1=LOCATION=/data/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ptgbss scope=both;
alter system set LOG_ARCHIVE_DEST_2=SERVICE=ptgbssdg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ptgbssdg scope=both;
alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE scope=both;
alter system set LOG_ARCHIVE_DEST_STATE_2=ENABLE scope=both;
alter system set FAL_SERVER=ptgbssdg scope=both;
alter system set FAL_CLIENT=ptgbss scope=both;
alter system set standby_file_management=auto;
alter system set db_file_name_convert=/data/ptgbssdg,/data/ptgbss scope=spfile;
alter system set log_file_name_convert=/u01/oradata/ptgbssdg,/u01/oradata/ptgbss scope=spfile;
create pfile from spfile;
▼▼▼
[oracle@localhost dbs]$ scp /u01/product/11.2.0/db_1/dbs/initptgbss.ora 172.25.18.252:/u01/product/11.2.0/db_1/dbs
[oracle@localhost dbs]$ scp /u01/product/11.2.0/db_1/dbs/orapwptgbss 172.25.18.252:/u01/product/11.2.0/db_1/dbs
(2)日志文件目录
[oracle@ptgbssdg ~]$ vi /u01/product/11.2.0/db_1/network/admin/listener.ora
▼▼▼
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ptgbssdg)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ptgbss)
(ORACLE_HOME = /u01/product/11.2.0/db_1)
(SID_NAME = ptgbssdg)
)
)
# tnsnames.ora Network Configuration File: /u01/product/11.2.0/db_1/network/admin/tnsnames.ora
▼▼▼
PTGBSS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.25.18.251)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ptgbss)
)
)
PTGBSSDG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.25.18.252)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ptgbssdg)
)
)
▼▼▼
ptgbss.__db_cache_size=17448304640
ptgbssdg.__db_cache_size=16642998272
ptgbss.__java_pool_size=134217728
ptgbssdg.__java_pool_size=134217728
ptgbss.__large_pool_size=134217728
ptgbssdg.__large_pool_size=134217728
ptgbss.__oracle_base=/u01#ORACLE_BASE set from environment
ptgbssdg.__oracle_base=/u01#ORACLE_BASE set from environment
ptgbss.__pga_aggregate_target=3422552064
ptgbssdg.__pga_aggregate_target=3422552064
ptgbss.__sga_target=19327352832
ptgbssdg.__sga_target=19327352832
ptgbss.__shared_io_pool_size=0
ptgbssdg.__shared_io_pool_size=0
ptgbss.__shared_pool_size=1476395008
ptgbssdg.__shared_pool_size=2281701376
ptgbss.__streams_pool_size=0
ptgbssdg.__streams_pool_size=0
*.audit_file_dest=/u01/admin/ptgbss/adump --此处修改
*.audit_trail=db
*.compatible=11.2.0.4.0
*.control_files=/u01/oradata/ptgbssdg/control01.ctl,/u01/fast_recovery_area/ptgbssdg/control02.ctl --此处修改存放控制文件路径
*.db_block_size=8192
*.db_domain=
*.db_file_name_convert=/data/ptgbss,/data/ptgbssdg --此处修改
*.db_name=ptgbss --此处修改
*.db_recovery_file_dest=/u01/fast_recovery_area --此处修改对应的路径
*.db_recovery_file_dest_size=4385144832
*.db_unique_name=ptgbssdg --此处修改
*.diagnostic_dest=/u01
*.dispatchers=(PROTOCOL=TCP) (SERVICE=ptgbssXDB)
*.fal_client=PTGBSSDG --此处修改
*.fal_server=PTGBSS --此处修改
*.log_archive_config=DG_CONFIG=(ptgbssdg,ptgbss) --此处修改
*.log_archive_dest_1=location=/data/arch --此处修改
*.log_archive_dest_2=SERVICE=ptgbssdg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ptgbssdg --此处修改
*.log_archive_dest_state_1=ENABLE --修改此处参数
*.log_archive_dest_state_2=ENABLE --修改此处参数
*.log_file_name_convert=/u01/oradata/ptgbss,/u01/oradata/ptgbssdg --此处修改对应路径
*.open_cursors=300
*.pga_aggregate_target=3365928960
*.processes=150
*.remote_login_passwordfile=EXCLUSIVE
*.sga_max_size=19327352832
*.sga_target=19327352832
*.standby_file_management=AUTO
*.undo_tablespace=UNDOTBS1
启动监听lsnrctl start
sqlplus sys/oracle@ptgbssdg AS SYSDBA
▼▼▼
rman target sys/oracle@ptgbss auxiliary sys/oracle@ptgbssdg
run
{
allocate channel cl1 type disk;
allocate channel cl2 type disk;
allocate channel cl3 type disk;
allocate auxiliary channel c1 type disk;
allocate auxiliary channel c2 type disk;
allocate auxiliary channel c3 type disk;
duplicate target database for standby from active database nofilenamecheck;
release channel c1;
release channel c2;
release channel c3;
}
▼▼▼
alter database open;
alter database recover managed standby database using current logfile disconnect from session;
select sequence#,thread#,applied from v$archived_log;
▼▼▼
col name for a50
select name,SEQUENCE#,APPLIED from v$archived_log order by sequence#;
▼▼▼
select max(sequence#) from v$archived_log where applied=YES;
select thread#,max(sequence#) from v$archived_log where applied=YES group by thread#;
select * from v$archive_gap;
更多精彩干货分享
点击下方名片关注
IT那活儿
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/129944.html
RAC补丁日常更新成功反遇异常处理 img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%; m...
摘要:搭建项目前准备工作首先你需要一台电脑,建议做开发的电脑最好是内存以上最佳,土豪随意。技术栈本次搭建主要采用开始搭建创建项目文件夹个人比价喜欢使用创建文件夹,毕竟接下来下载官方脚手架还是的用。 网上搜索了很久Vue项目搭建指南,并没有找到写的比较符合心意的,所以打算自己撸一个指南,集合众家之所长(不善于排版,有点逼死强迫症,如果觉得写的有问题,可以留言斧正,觉得写的太差的,可以留言哪里差...
摘要:项目地址前言大数据技术栈思维导图大数据常用软件安装指南一分布式文件存储系统分布式计算框架集群资源管理器单机伪集群环境搭建集群环境搭建常用命令的使用基于搭建高可用集群二简介及核心概念环境下的安装部署和命令行的基本使用常用操作分区表和分桶表视图 项目GitHub地址:https://github.com/heibaiying... 前 言 大数据技术栈思维导图 大数据常用软件安装指...
摘要:原文地址实战指南二在中搭建服务器学习最快的方法就是直接使用,在实战指南一介绍中,我们已经介绍了如何快速搭建,以及如何在中运行我们的第一个程序。 原文地址:Docker实战指南(二):在Docker中搭建Nginx服务器 Introduction 学习Docker最快的方法就是直接使用,在Docker实战指南(一):Docker介绍中,我们已经介绍了如何快速搭建Docker,以及如何在D...
阅读 1235·2023-01-11 13:20
阅读 1543·2023-01-11 13:20
阅读 996·2023-01-11 13:20
阅读 1651·2023-01-11 13:20
阅读 3958·2023-01-11 13:20
阅读 2456·2023-01-11 13:20
阅读 1290·2023-01-11 13:20
阅读 3452·2023-01-11 13:20