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那活兒
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/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...
閱讀 1346·2023-01-11 13:20
閱讀 1684·2023-01-11 13:20
閱讀 1132·2023-01-11 13:20
閱讀 1858·2023-01-11 13:20
閱讀 4100·2023-01-11 13:20
閱讀 2704·2023-01-11 13:20
閱讀 1385·2023-01-11 13:20
閱讀 3597·2023-01-11 13:20