SlideShare una empresa de Scribd logo
1 de 15
Creating a Physical Standby Database 
Cách thực hiện: 
1. Tạo 2 máy ảo ping thông mạng và phải có môi trường giống nhau. 
2. Cấu hình tnsname, listener, sql và kiểm tra kết nối. 
3. Cấu hình Initialization Parameter File cho primary và standby 
4. Add redolog file 
5. Tạo controlfile cho standby từ primary. 
6. Copy source primary đến standby 
7. Kiểm tra 
Chuẩn bị: 
- OS Names: "prime" for the Primary database and "standby" for the Standby database. 
Network: 
Trên Prime:
Trên Standby: 
Next: 
+ The primary and standby databases must be using the same version of Oracle Database 11g. 
+ The primary database must be opened in ARCHIVELOG mode. 
+Install the database, Enterprise edition. (using DBCA) 
+Set up Oracle net components (using NETCA)
+Test sql net connectivity. 
PRIME: 
SQL> Alter system set db_recovery_file_dest_size=2G scope=both; 
System altered. 
Alter system set db_recovery_file_dest=’C:BKFRA’ 
Select * from v$recovery_file_dest 
Oracle Net Services network files must be set up on the primary database and on the standby 
database. 
SQLNET.ORA file of the Primary:
TNSNAMES.ORA file of the Primary:
LISTENER.ORA file of the Primary: 
SQLNET.ORA file of the Standby: 
TNSNAMES.ORA file of the Standby:
LISTENER.ORA file of the Standby: 
You can use "tnsping" to test the sql connectivity: On standby
Next: (On PRIME) Create the password file.
Create standby redo logs(On Prime): 
SELECT * from v$logfile; 
Alter database add standby logfile group 4 (‘C:apporacleoradataoraprimestandbyredo01.LOG’) 
size 50M; 
Alter database add standby logfile group 5 (‘C:apporacleoradataoraprimestandbyredo03.LOG’) 
size 50M; 
Alter database add standby logfile group 6 (‘C:apporacleoradataoraprimestandbyredo03.LOG’) 
size 50M; 
Alter database add standby logfile group 7 (‘C:apporacleoradataoraprimestandbyredo04.LOG’) 
size 50M; 
Next: Enable force logging (Optional) (On Prime) 
Select log_mode from v$database; 
Alter database force logging;
Configure the pfile of the primary: 
USING: SQL> ALTER SYSTEM SET ….
alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(oraprime,orastandby)'; 
alter system set LOG_ARCHIVE_DEST_1='LOCATION=+DATA VALID_FOR=(ALL_LOGFILES,ALL_ROLES) 
DB_UNIQUE_NAME=oraprime'; 
alter system set LOG_ARCHIVE_DEST_2='SERVICE=orastandby LGWR ASYNC 
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME= orastandby’; 
alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE; 
alter system set FAL_SERVER=orastandby; 
alter system set FAL_CLIENT=oraprime; 
alter database add standby logfile '+DATA'; 
alter database add standby logfile '+DATA'; 
alter database add standby logfile '+DATA'; 
alter database add standby logfile '+DATA'; 
On Standby: 
Option 1: Create pfile with only one parameter DB_NAME. 
Start up no mount the database using the pfile.
Using: - Run RMAN Dupplicate database on primary 
rman target sys/@oraprime auxiliary sys/oracle@orastandby 
run { 
allocate channel prmy1 type disk; 
allocate channel prmy2 type disk; 
allocate channel prmy3 type disk; 
allocate channel prmy4 type disk; 
allocate auxiliary channel stby type disk; 
duplicate target database for standby from active database 
spfile 
parameter_value_convert 'oraprime','orastandby' 
set db_unique_name='orastandby' 
set control_files='+DATA' 
set log_archive_max_processes='5' 
set fal_client='oraprime' 
set fal_server='orastandby' 
set standby_file_management='AUTO' 
set log_archive_config='dg_config=(oraprime,orastandby)' 
set log_archive_dest_2='service=oraprime LGWR ASYNC 
valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=prime'
; 
} 
Start apply service on standby & Open for read-only 
recover managed standby database using current logfile disconnect from session; 
recover managed standby database cancel; 
alter database open; 
recover managed standby database using current logfile disconnect from session; 
Option 2: On PRIME 
Create a Control File for the Standby Database 
SQL> SHUTDOWN IMMEDIATE; 
SQL> STARTUP MOUNT; 
SQL>ALTER DATABASE CREATE STANDBY CONTROLFILE AS 
'C:tostandbycontrolstd.ctl'; 
SQL> ALTER DATABASE OPEN; 
Create a pFile for the Standby Database:
Copy pfile to standby and edit: 
1. FAL_SERVER 
2. FAL_CLIENT 
3. CONTROL_FILES: add standby controlfile 
*.fal_client='orastandby' 
*.fal_server='oraprime' 
*.control_files='C:apporacleoradataoraprimecontrol01.ctl','C:apporacleflash_recover 
y_areaoraprimecontrol02.ctl','C:tostandbyCONTROLSTD.CTL' 
*.log_archive_config='DG_CONFIG=(oraprime,orastandby)' 
*.log_archive_dest_1='LOCATION=C:apporacleoradataorastandby 
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby' 
*.log_archive_dest_2='SERVICE=oraprime LGWR ASYNC 
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=prime'
SQL>Startup mount; 
SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; 
Check that primary and standby are synchronized 
Using: 
PRIMARY 
SQL> archive log list; 
Database log mode Archive Mode 
Automatic archival Enabled 
Archive destination /u01/arch1/orcl/ 
Oldest online log sequence 43 
Next log sequence to archive 45 
Current log sequence 45 
SQL> select database_role, open_mode from v$database; 
DATABASE_ROLE OPEN_MODE 
---------------- ---------- 
PRIMARY READ WRITE 
STANDBY
SQL> archive log list; 
Database log mode Archive Mode 
Automatic archival Enabled 
Archive destination /u01/arch1/orcl/ 
Oldest online log sequence 43 
Next log sequence to archive 0 
Current log sequence 45 
SQL> select database_role, open_mode from v$database; 
DATABASE_ROLE OPEN_MODE 
---------------- ---------- 
PHYSICAL STANDBY MOUNTED

Más contenido relacionado

La actualidad más candente

Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from Anar Godjaev
 
Data Migration in Database
Data Migration in DatabaseData Migration in Database
Data Migration in DatabaseJingun Jung
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guideAmit87_dba
 
Test Dml With Nologging
Test Dml With NologgingTest Dml With Nologging
Test Dml With NologgingN/A
 
12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storageMonowar Mukul
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and RecoveryAnar Godjaev
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.subhani shaik
 
Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Biju Thomas
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklistpraveen_01236
 
Migrate from database file system to asm
Migrate from database file system to asmMigrate from database file system to asm
Migrate from database file system to asmSurender Martha
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11guzzal basak
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_pptmaclean liu
 
Flashback (Practical Test)
Flashback (Practical Test)Flashback (Practical Test)
Flashback (Practical Test)Anar Godjaev
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recoveryArun Sharma
 
Enable archivelod mode in oracle rac12cR1 with asm location
Enable archivelod mode  in oracle rac12cR1 with asm locationEnable archivelod mode  in oracle rac12cR1 with asm location
Enable archivelod mode in oracle rac12cR1 with asm locationDebasish Nayak
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeMarco Gralike
 

La actualidad más candente (20)

Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
Data Migration in Database
Data Migration in DatabaseData Migration in Database
Data Migration in Database
 
Rman cloning guide
Rman cloning guideRman cloning guide
Rman cloning guide
 
Test Dml With Nologging
Test Dml With NologgingTest Dml With Nologging
Test Dml With Nologging
 
12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
Migrate from database file system to asm
Migrate from database file system to asmMigrate from database file system to asm
Migrate from database file system to asm
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Flashback (Practical Test)
Flashback (Practical Test)Flashback (Practical Test)
Flashback (Practical Test)
 
Oracle database hot backup and recovery
Oracle database hot backup and recoveryOracle database hot backup and recovery
Oracle database hot backup and recovery
 
Less17 Util
Less17  UtilLess17  Util
Less17 Util
 
Change DB Name
Change DB NameChange DB Name
Change DB Name
 
Enable archivelod mode in oracle rac12cR1 with asm location
Enable archivelod mode  in oracle rac12cR1 with asm locationEnable archivelod mode  in oracle rac12cR1 with asm location
Enable archivelod mode in oracle rac12cR1 with asm location
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
 
Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
 

Similar a Create a Physical Standby Database

D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlMoeen_uddin
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradationinfluxbob
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby databaseJorge Batista
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Featuresxiangrong
 
Migrate database to Exadata using RMAN duplicate
Migrate database to Exadata using RMAN duplicateMigrate database to Exadata using RMAN duplicate
Migrate database to Exadata using RMAN duplicateUmair Mansoob
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.subhani shaik
 
Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)than sare
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Recvivaankumar
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productionsOsama Mustafa
 
Oracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard SetupOracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard SetupArun Sharma
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userDesty Yani
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4uzzal basak
 
Oracle Data Guard Physical Standby Configuration
Oracle Data Guard Physical Standby ConfigurationOracle Data Guard Physical Standby Configuration
Oracle Data Guard Physical Standby ConfigurationArun Sharma
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12cuzzal basak
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in DataguardJason Arneil
 
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهمآموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهمfaradars
 

Similar a Create a Physical Standby Database (20)

D17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sqlD17316 gc20 l05_phys_sql
D17316 gc20 l05_phys_sql
 
oracle upgradation
oracle upgradationoracle upgradation
oracle upgradation
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
Les 07 rman_rec
Les 07 rman_recLes 07 rman_rec
Les 07 rman_rec
 
Migrate database to Exadata using RMAN duplicate
Migrate database to Exadata using RMAN duplicateMigrate database to Exadata using RMAN duplicate
Migrate database to Exadata using RMAN duplicate
 
Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.Rman cloning when both directory and db name are same.
Rman cloning when both directory and db name are same.
 
Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)
 
Les 06 Perform Rec
Les 06 Perform RecLes 06 Perform Rec
Les 06 Perform Rec
 
Refresh development from productions
Refresh development from productionsRefresh development from productions
Refresh development from productions
 
Oracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard SetupOracle 11g Installation With ASM and Data Guard Setup
Oracle 11g Installation With ASM and Data Guard Setup
 
Kp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan userKp.3 pengaturan sistem dan user
Kp.3 pengaturan sistem dan user
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4
 
Oracle Data Guard Physical Standby Configuration
Oracle Data Guard Physical Standby ConfigurationOracle Data Guard Physical Standby Configuration
Oracle Data Guard Physical Standby Configuration
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in Dataguard
 
Database upgradation
Database upgradationDatabase upgradation
Database upgradation
 
5895640.ppt
5895640.ppt5895640.ppt
5895640.ppt
 
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهمآموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
آموزش مدیریت بانک اطلاعاتی اوراکل - بخش پانزدهم
 

Último

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 

Último (20)

Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 

Create a Physical Standby Database

  • 1. Creating a Physical Standby Database Cách thực hiện: 1. Tạo 2 máy ảo ping thông mạng và phải có môi trường giống nhau. 2. Cấu hình tnsname, listener, sql và kiểm tra kết nối. 3. Cấu hình Initialization Parameter File cho primary và standby 4. Add redolog file 5. Tạo controlfile cho standby từ primary. 6. Copy source primary đến standby 7. Kiểm tra Chuẩn bị: - OS Names: "prime" for the Primary database and "standby" for the Standby database. Network: Trên Prime:
  • 2. Trên Standby: Next: + The primary and standby databases must be using the same version of Oracle Database 11g. + The primary database must be opened in ARCHIVELOG mode. +Install the database, Enterprise edition. (using DBCA) +Set up Oracle net components (using NETCA)
  • 3. +Test sql net connectivity. PRIME: SQL> Alter system set db_recovery_file_dest_size=2G scope=both; System altered. Alter system set db_recovery_file_dest=’C:BKFRA’ Select * from v$recovery_file_dest Oracle Net Services network files must be set up on the primary database and on the standby database. SQLNET.ORA file of the Primary:
  • 4. TNSNAMES.ORA file of the Primary:
  • 5. LISTENER.ORA file of the Primary: SQLNET.ORA file of the Standby: TNSNAMES.ORA file of the Standby:
  • 6. LISTENER.ORA file of the Standby: You can use "tnsping" to test the sql connectivity: On standby
  • 7. Next: (On PRIME) Create the password file.
  • 8. Create standby redo logs(On Prime): SELECT * from v$logfile; Alter database add standby logfile group 4 (‘C:apporacleoradataoraprimestandbyredo01.LOG’) size 50M; Alter database add standby logfile group 5 (‘C:apporacleoradataoraprimestandbyredo03.LOG’) size 50M; Alter database add standby logfile group 6 (‘C:apporacleoradataoraprimestandbyredo03.LOG’) size 50M; Alter database add standby logfile group 7 (‘C:apporacleoradataoraprimestandbyredo04.LOG’) size 50M; Next: Enable force logging (Optional) (On Prime) Select log_mode from v$database; Alter database force logging;
  • 9. Configure the pfile of the primary: USING: SQL> ALTER SYSTEM SET ….
  • 10. alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(oraprime,orastandby)'; alter system set LOG_ARCHIVE_DEST_1='LOCATION=+DATA VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=oraprime'; alter system set LOG_ARCHIVE_DEST_2='SERVICE=orastandby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME= orastandby’; alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE; alter system set FAL_SERVER=orastandby; alter system set FAL_CLIENT=oraprime; alter database add standby logfile '+DATA'; alter database add standby logfile '+DATA'; alter database add standby logfile '+DATA'; alter database add standby logfile '+DATA'; On Standby: Option 1: Create pfile with only one parameter DB_NAME. Start up no mount the database using the pfile.
  • 11. Using: - Run RMAN Dupplicate database on primary rman target sys/@oraprime auxiliary sys/oracle@orastandby run { allocate channel prmy1 type disk; allocate channel prmy2 type disk; allocate channel prmy3 type disk; allocate channel prmy4 type disk; allocate auxiliary channel stby type disk; duplicate target database for standby from active database spfile parameter_value_convert 'oraprime','orastandby' set db_unique_name='orastandby' set control_files='+DATA' set log_archive_max_processes='5' set fal_client='oraprime' set fal_server='orastandby' set standby_file_management='AUTO' set log_archive_config='dg_config=(oraprime,orastandby)' set log_archive_dest_2='service=oraprime LGWR ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=prime'
  • 12. ; } Start apply service on standby & Open for read-only recover managed standby database using current logfile disconnect from session; recover managed standby database cancel; alter database open; recover managed standby database using current logfile disconnect from session; Option 2: On PRIME Create a Control File for the Standby Database SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP MOUNT; SQL>ALTER DATABASE CREATE STANDBY CONTROLFILE AS 'C:tostandbycontrolstd.ctl'; SQL> ALTER DATABASE OPEN; Create a pFile for the Standby Database:
  • 13. Copy pfile to standby and edit: 1. FAL_SERVER 2. FAL_CLIENT 3. CONTROL_FILES: add standby controlfile *.fal_client='orastandby' *.fal_server='oraprime' *.control_files='C:apporacleoradataoraprimecontrol01.ctl','C:apporacleflash_recover y_areaoraprimecontrol02.ctl','C:tostandbyCONTROLSTD.CTL' *.log_archive_config='DG_CONFIG=(oraprime,orastandby)' *.log_archive_dest_1='LOCATION=C:apporacleoradataorastandby VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby' *.log_archive_dest_2='SERVICE=oraprime LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=prime'
  • 14. SQL>Startup mount; SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; Check that primary and standby are synchronized Using: PRIMARY SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination /u01/arch1/orcl/ Oldest online log sequence 43 Next log sequence to archive 45 Current log sequence 45 SQL> select database_role, open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- ---------- PRIMARY READ WRITE STANDBY
  • 15. SQL> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination /u01/arch1/orcl/ Oldest online log sequence 43 Next log sequence to archive 0 Current log sequence 45 SQL> select database_role, open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- ---------- PHYSICAL STANDBY MOUNTED