CentOS 5.8上搭建10g物理DG
I.Preparing the Primary Database
1.1 Enable Forced Logging
SQL> ALTER DATABASE FORCE LOGGING;
1.2 Create Password File
orapwd file=orapwORCL password=dgok_#1985 entries=5 force=y
1.3 Configure a Standby Redo Log
Determine the appropriate number of standby redo log file groups.
(maximum number of logfiles for each thread + 1) * maximum number of threads
Create standby redo log file groups
ALTER DATABASE ADD STANDBY LOGFILE GROUP 11
'/opt/oracle/oradata/ORCL/std11.log' SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 12
'/opt/oracle/oradata/ORCL/std12.log' SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 13
'/opt/oracle/oradata/ORCL/std13.log' SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 14
'/opt/oracle/oradata/ORCL/std14.log' SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 15
'/opt/oracle/oradata/ORCL/std15.log' SIZE 500M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 16
'/opt/oracle/oradata/ORCL/std16.log' SIZE 500M;
Verify the standby redo log file groups were created.
SQL> SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;
1.4 Set Primary Database Initialization Parameters
Primary Database: Primary Role Initialization Parameters
DB_NAME=ORCL
DB_UNIQUE_NAME=ORCL
LOG_ARCHIVE_CONFIG='DG_CONFIG=(ORCL,ORCLDG1)'
LOG_ARCHIVE_DEST_1=
'LOCATION=/crmbak/rman/arch
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=ORCL'
LOG_ARCHIVE_DEST_2=
'SERVICE=ORCLDG1 LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=ORCLDG1'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
LOG_ARCHIVE_MAX_PROCESSES=30
Primary Database: Standby Role Initialization Parameters
FAL_SERVER=ORCLDG1
FAL_CLIENT=ORCL
STANDBY_FILE_MANAGEMENT=AUTO
1.5 Enable Archiving
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;
II.Creating a Physical Standby Database
2.1 Create a Backup Copy of the Primary Database Datafiles
2.2 Create a Control File for the Standby Database
SQL> ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/ORCLDG1.ctl';
2.3 Set Standby Database Initialization Parameters
Create the primary database parameter file
SQL> CREATE PFILE='/tmp/initORCLDG1.ora' FROM SPFILE;
Set initialization parameters
Modifying Initialization Parameters for a Physical Standby Database
DB_NAME=ORCL
DB_UNIQUE_NAME=ORCLDG1
LOG_ARCHIVE_CONFIG='DG_CONFIG=(ORCL,ORCLDG1)'
LOG_ARCHIVE_FORMAT=log%t_%s_%r.arc
LOG_ARCHIVE_DEST_1=
'LOCATION=/opt/oracle/arch
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=ORCLDG1'
LOG_ARCHIVE_DEST_2=
'SERVICE=ORCL LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=ORCL'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
STANDBY_FILE_MANAGEMENT=AUTO
FAL_SERVER=ORCL
FAL_CLIENT=ORCLDG1
2.4 Copy Files from the Primary System to the Standby System
backupset
standby controlfile
parameter file
2.5 Set Up the Environment to Support the Standby Database
Create a password file
orapwd file=orapwORCLDG1 password=dgok_#1985 entries=5 force=y
Configure listeners for the primary and standby databases.
lsnrctl stop
lsnrctl start
Create Oracle Net service names
ORCL --primary database
ORCLDG1 --standby database
Create a server parameter file for the standby database
SQL> CREATE SPFILE FROM PFILE='/tmp/initORCLDG1.ora';
2.6 Start the Physical Standby Database
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
2.7 Verify the Physical Standby Database Is Performing Properly
Identify the existing archived redo log files
SQL> SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
Force a log switch to archive the current online redo log file.
SQL> ALTER SYSTEM SWITCH LOGFILE;
Verify the new redo data was archived on the standby database
SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20801486/viewspace-1134010/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 物理DG、邏輯DG和快照DG的搭建(視訊講解)
- 【DG】Oracle 19c使用dbca來搭建物理DGOracle
- Oracle 11g單主搭建物理DGOracle
- 10G DG SWITCH OVER
- 3 建立物理DG
- 【DG】Oracle 19c使用dbca來搭建物理DG--主rac備racOracle
- CentOS 7.3 ECS上搭建RAC 18c+單例項DG+EMCC+DG的FSFO快速故障轉移配置CentOS單例
- CentOS上搭建SFTPCentOSFTP
- DG -- READ ONLY模式開啟物理Standby模式
- DG搭建配置方案
- Oracle RAC+DG搭建Oracle
- DG:11.2.0.4 RAC線上duplicate恢復DG
- 【DG】Data Guard搭建(physical standby)
- 在CentOS上搭建git伺服器CentOSGit伺服器
- 在CentOS 7上搭建Docker環境CentOSDocker
- 【DG】在Linux平臺上搭建單例項的dataguard--duplicateLinux單例
- 【DG】備庫RMAN還原方式搭建DG(不使用duplicate命令)
- 11G RAC+DG搭建
- 10g DG保護模式的切換:從最大效能到最大可用模式
- 在CentOS7.5上搭建Hadoop3.xCentOSHadoop
- 【DG】在Linux平臺上搭建單例項的dataguard--rman還原方式Linux單例
- 上週熱點回顧(5.8-5.14)
- 上週熱點回顧(5.2-5.8)
- CentOS7 上搭建多節點 Elasticsearch叢集CentOSElasticsearch
- 5.8
- CentOS 搭建 GitLabCentOSGitlab
- DFS 避坑手記 (docker 搭建 fastDFS 教程 / 在 CentOS 上搭建 FastDFS+nginx)DockerASTCentOSNginx
- 在 centos6.9 上 cdh-5.13.3的搭建報錯CentOS
- Laravel5.8 入門系列一 搭建環境,Hello World!Laravel
- 11g dg 備庫搭建多種方式
- Centos搭建VNC serverCentOSVNCServer
- centos 下搭建wordpressCentOS
- 如何在CentOS7上搭建自己的GitLab倉庫詳解?CentOSGitlab
- 如何在CentOS 7上搭建LAMP環境(使用YUM或編譯)CentOSLAMP編譯
- CentOS 7上搭建Spark 3.0.1 + Hadoop 3.2.1分散式叢集CentOSSparkHadoop分散式
- Vagrant 搭建 CentOS 環境CentOS
- CentOS 搭建 Pure-FTPCentOSFTP
- centos8搭建 gitlabCentOSGitlab
- centos7 wiki搭建CentOS