Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle11g build physical standby database     - Using PHP MySQL library (Programming)

- Hadoop upload files error solved (Server)

- Linux server is how to do after the invasion (Linux)

- Ubuntu 14.04 Trusty Tahr User How to install Banshee 2.9.1 (Linux)

- Memcached installation, configuration and monitoring (Server)

- grep, egrep and regular expressions (Linux)

- To create and manage virtual machines on Ubuntu Redhat (Linux)

- Ubuntu UFW firewall settings Introduction (Linux)

- C # asynchronous delegates (Programming)

- Security matters and practical Linux System (Linux)

- To setup the Swift language learning environment under linux (Linux)

- CentOS 5.3 under broadcom NIC dual activation issues (Linux)

- Shuffle Process Arrangement in MapReduce (Server)

- Bash variable expansion modifier (Programming)

- How to install Perl modules from CPAN (Linux)

- Deploy Mono 4 and Jexus 5.6 on CentOS7 (Server)

- Oracle Client + PL SQL Developer enables remote access to the Oracle database (Database)

- Experience RHEL7 new features (Linux)

- According to the national position on how to block traffic in Linux (Server)

- Java rewrite the hashcode method (Programming)

 
         
  Oracle11g build physical standby database
     
  Add Date : 2018-11-21      
         
         
         
  First, the experimental environment
Main library configuration:
Operating System: win7 64bit
Oracle Database: Oracle 11.2.0.1
IP Address: 127.0.0.1
db_unique_name: orcl
oracle_sid: orcl
Preparation library configuration:
Operating System: win7 64bit
ORACLE database: Oracle 11.2.0.1
IP Address: 127.0.0.1
oracle_sid: pdb
db_unique_name: pdb_orcl
Note: DB_NAME main library and library equipment must be consistent, that is orcl

Second, the main library configuration
1. archive mode
SQL> archive log list
Database log mode Archive Mode
Enable automatic archiving
Archive destination E: \ ora_arch
The earliest online log sequence 4
The next archived log sequence 6
The current log sequence 6
2. Check db_unqie_name
SQL> show parameter db_unique_name

NAME TYPE VALUE
------------------------------------ -------------- -------- ---------
db_unique_name string orcl
3.force logging mode
SQL> select force_logging from v $ database;

FORCE_
------
YES
If NO, you need to be modified
SQL> alter database force logging;
4. Configure tnsnames.ora
ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP) (HOST = kermart) (PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

PDB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP) (HOST = kermart) (PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdb)
    )
  )
5. Parameter File
Bulk edit parameters to be configured via pfile way, add the following parameters:
* .db_file_name_convert = 'D: \ oradata \ pdb', 'C: \ app \ Administrator \ oradata \ orcl'
* .fal_client = 'Pdb'
* .fal_server = 'Orcl'
* .log_archive_config = 'DG_CONFIG = (orcl, pdb_orcl)'
* .log_archive_dest_1 = 'LOCATION = USE_DB_RECOVERY_FILE_DEST VALID_FOR = (ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME = orcl'
* .log_archive_dest_2 = 'SERVICE = pdb LGWR VALID_FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = pdb_orcl'
* .log_file_name_convert = 'D: \ oradata \ pdb', 'C: \ app \ Administrator \ oradata \ orcl'
* .standby_file_management = 'AUTO'

6. Create spfile pfile by
SQL> shutdown immediate
SQL> create spfile from pfile;
File has been created.
SQL> startup
ORACLE instance started.

Total System Global Area 1235959808 bytes
Fixed Size 2175288 bytes
Variable Size 989859528 bytes
Database Buffers 234881024 bytes
Redo Buffers 9043968 bytes
Database loading is completed.
Database has been opened.
SQL>

Third, the standby database configuration
1. Create a configuration instance service
C: \> oradim -NEW -SID pdb -startmode manual
Instance has been created.
2. Configure tnsnames.ora
ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP) (HOST = kermart) (PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

PDB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP) (HOST = kermart) (PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pdb)
    )
  )
tnsnames.ora main library and library equipment consistent.
3. Configure listeners
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS = ONLY: C: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ bin \ oraclr11.dll")
    )
- Add Static Static
    (SID_DESC =
      (GLOBAL_DBNAME = pdb)
      (ORACLE_HOME = C: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1)
      (SID_NAME = pdb)
    )
  )
4. Create the necessary directories
C: \> mkdir -p C: \ app \ Administrator \ admin \ pdb
C: \> mkdir -p C: \ app \ Administrator \ admin \ pdb \ adump
C: \> mkdir -p D: \ oradata \ archlog
C: \> mkdir -p C: \ app \ Administrator \ flash_recovery_area \ pdb
5. The configuration parameter file
The main library pfile copy a line modification
* .db_create_file_dest = 'D: \ oradata \ pdb'
* .db_unique_name = 'Pdb_orcl'
* .db_file_name_convert = 'C: \ app \ Administrator \ oradata \ orcl', 'D: \ oradata \ pdb'
* .fal_client = 'Pdb'
* .fal_server = 'Orcl'
* .log_archive_config = 'DG_CONFIG = (pdb_orcl, orcl)'
* .log_archive_dest_1 = 'LOCATION = D: \ oradata \ archlog VALID_FOR = (ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME = pdb_orcl'
* .log_archive_dest_2 = 'SERVICE = orcl LGWR VALID_FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = orcl'
* .log_file_name_convert = 'C: \ app \ Administrator \ oradata \ orcl', 'D: \ oradata \ pdb'
* .standby_file_management = 'AUTO'
6. Create a password file
The master password file under the library copy, rename, you can, of course, can also be created, note the password to keep the main library consistent.
mv PWDorcl.ora PWDpdb.ora

Third, create a physical standby database
There are two ways to create a physical standby:
1) Based on the backup set is created
2) copied directly from the activities of the main library
Option 2) Direct Copy
1. Check the status monitor
C: \> lsnrctl status

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 28- April 11:14:04 -2014

Copyright (c) 1991, 2010, Oracle. All rights reserved.

Connecting to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = kermart) (PORT = 1521)))
The STATUS LISTENER
------------------------
Alias ​​LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start date 28-4 Yue 11:13:43 -2014
Uptime 0 days 0 hours 0 minutes 22 seconds
Trace level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File C: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN \ listener.ora
Listener log file c: \ app \ administrator \ diag \ tnslsnr \ kermart \ listener \ alert \ log.xml
Listening endpoint summary ...
  (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = kermart) (PORT = 1521)))
  (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (PIPENAME = \\. \ Pipe \ EXTPROC1521ipc)))
Services Summary ..
Service "CLRExtProc" contains an instance.
  Examples of "CLRExtProc", status UNKNOWN, contains a handler for this service ...
Service "orcl" contains an instance.
  Examples of "orcl", status READY, contains a handler for this service ...
Service "orclXDB" contains an instance.
  Examples of "orcl", status READY, contains a handler for this service ...
Service "pdb" contains an instance.
  Examples of "pdb", status UNKNOWN, contains this service a handler ...
The command completed successfully

2. pfile to start the standby database state NOMOUNT
SQL> startup nomount pfile = 'C: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ database \ initpdb.ora';
ORACLE instance started.

Total System Global Area 1235959808 bytes
Fixed Size 2175288 bytes
Variable Size 989859528 bytes
Database Buffers 234881024 bytes
Redo Buffers 9043968 bytes
3. copying
C: \> rman target / auxiliary sys / oracle @ pdb

Recovery Manager: Release 11.2.0.1.0 - Production on Monday, April 28 2014 11:15:53

Copyright (c) 1982, 2009, Oracle and / or its affiliates. All rights reserved.

Connect to the target database: ORCL (DBID = 1364729008)
Connected to the secondary database: ORCL (not loaded)
RMAN> duplicate target database for standby from active database nofilenamecheck dorecover;

Start Duplicate Db at 28-4 months to 14
Using target database control file alternative recovery catalog
Distribution channels: ORA_AUX_DISK_1
Channel ORA_AUX_DISK_1: SID = 10 device type = DISK

The memory contents of the script:
{
  backup as copy reuse
  targetfile 'C: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ DATABASE \ PWDorcl.ORA' auxiliary format
 'C: \ app \ Administrator \ product \ 11.2.0 \ dbhome_1 \ DATABASE \ PWDpdb.ORA';
}
The script is being executed memory

Start backup at 28-4 months to 14
Distribution channels: ORA_DISK_1
Channel ORA_DISK_1: SID = 20 device type = DISK
Complete backup at 28-4 months to 14

The memory contents of the script:
{
  backup as copy current controlfile for standby auxiliary format 'D: \ ORADATA \ PDB \ CONTROL01.CTL';
  restore clone controlfile to 'C: \ APP \ ADMINISTRATOR \ FLASH_RECOVERY_AREA \ PDB \ CONTROL02.CTL' from
 'D: \ ORADATA \ PDB \ CONTROL01.CTL';
}
The script is being executed memory

Start backup at 28-4 months to 14
Use the channel ORA_DISK_1
Channel ORA_DISK_1: a copy of the data file to start
Copy the backup control file
Output File Name = C: \ APP \ ADMINISTRATOR \ PRODUCT \ 11.2.0 \ DBHOME_1 \ DATABASE \ SNCFORCL.ORA tag = TAG20140428T111659 RECID = 6 STAMP = 846069421
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:04
Complete backup at 28-4 months to 14

Start restore to 28-4 months to 14
Use the channel ORA_AUX_DISK_1

Channel ORA_AUX_DISK_1: replicated control file copies
Complete restore on 28-4 months to 14

The memory contents of the script:
{
  sql clone 'alter database mount standby database';
}
The script is being executed memory

sql statement: alter database mount standby database

The memory contents of the script:
{
  set newname for tempfile 1 to
 "D: \ ORADATA \ PDB \ TEMP01.DBF";
  switch clone tempfile all;
  set newname for datafile 1 to
 "D: \ ORADATA \ PDB \ SYSTEM01.DBF";
  set newname for datafile 2 to
 "D: \ ORADATA \ PDB \ SYSAUX01.DBF";
  set newname for datafile 3 to
 "D: \ ORADATA \ PDB \ UNDOTBS01.DBF";
  set newname for datafile 4 to
 "D: \ ORADATA \ PDB \ USERS01.DBF";
  set newname for datafile 5 to
 "D: \ ORADATA \ PDB \ EXAMPLE01.DBF";
  set newname for datafile 6 to
 "D: \ ORADATA \ PDB \ TBS01.DBF";
  set newname for datafile 7 to
 "D: \ ORADATA \ PDB \ UNDOTBS02.DBF";
  set newname for datafile 8 to
 "D: \ ORADATA \ PDB \ RMAN_TBS01.DBF";
  backup as copy reuse
  datafile 1 auxiliary format
 "D: \ ORADATA \ PDB \ SYSTEM01.DBF" datafile
 2 auxiliary format
 "D: \ ORADATA \ PDB \ SYSAUX01.DBF" datafile
 3 auxiliary format
 "D: \ ORADATA \ PDB \ UNDOTBS01.DBF" datafile
 4 auxiliary format
 "D: \ ORADATA \ PDB \ USERS01.DBF" datafile
 5 auxiliary format
 "D: \ ORADATA \ PDB \ EXAMPLE01.DBF" datafile
 6 auxiliary format
 "D: \ ORADATA \ PDB \ TBS01.DBF" datafile
 7 auxiliary format
 "D: \ ORADATA \ PDB \ UNDOTBS02.DBF" datafile
 8 auxiliary format
 "D: \ ORADATA \ PDB \ RMAN_TBS01.DBF";
  sql 'alter system archive log current';
}
The script is being executed memory

Command being executed: SET NEWNAME

1 temporary files in the control file has been renamed to D: \ ORADATA \ PDB \ TEMP01.DBF

Command being executed: SET NEWNAME

Command being executed: SET NEWNAME

Command being executed: SET NEWNAME

Command being executed: SET NEWNAME

Command being executed: SET NEWNAME

Command being executed: SET NEWNAME

Command being executed: SET NEWNAME

Command being executed: SET NEWNAME

Start backup at 28-4 months to 14
Use the channel ORA_DISK_1
Channel ORA_DISK_1: a copy of the data file to start
Input data files: File No. 00006 = Name = C: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \ TBS01.DBF
Output file name = D: \ ORADATA \ PDB \ TBS01.DBF tag = TAG20140428T111715
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:55
Channel ORA_DISK_1: a copy of the data file to start
Input data files: File No. 00001 = Name = C: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \ SYSTEM01.DBF
Output file name = D: \ ORADATA \ PDB \ SYSTEM01.DBF tag = TAG20140428T111715
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:55
Channel ORA_DISK_1: a copy of the data file to start
Input data files: File No. 00002 = Name = C: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \ SYSAUX01.DBF
Output file name = D: \ ORADATA \ PDB \ SYSAUX01.DBF tag = TAG20140428T111715
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:35
Channel ORA_DISK_1: a copy of the data file to start
Input data files: File No. 00003 = Name = C: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \ UNDOTBS01.DBF
Output file name = D: \ ORADATA \ PDB \ UNDOTBS01.DBF tag = TAG20140428T111715
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:35
Channel ORA_DISK_1: a copy of the data file to start
Input data files: File No. 00007 = Name = C: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \ UNDOTBS02.DBF
Output file name = D: \ ORADATA \ PDB \ UNDOTBS02.DBF tag = TAG20140428T111715
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:35
Channel ORA_DISK_1: a copy of the data file to start
Input data files: File No. 00005 = Name = C: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \ EXAMPLE01.DBF
Output file name = D: \ ORADATA \ PDB \ EXAMPLE01.DBF tag = TAG20140428T111715
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:07
Channel ORA_DISK_1: a copy of the data file to start
Input data files: File No. 00008 = Name = C: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \ RMAN_TBS01.DBF
Output file name = D: \ ORADATA \ PDB \ RMAN_TBS01.DBF tag = TAG20140428T111715
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:07
Channel ORA_DISK_1: a copy of the data file to start
Input data files: File No. 00004 = Name = C: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \ USERS01.DBF
Output file name = D: \ ORADATA \ PDB \ USERS01.DBF tag = TAG20140428T111715
Channel ORA_DISK_1: data file copy is complete, elapsed time: 00:00:07
Complete backup at 28-4 months to 14

sql statement: alter system archive log current

The memory contents of the script:
{
  backup as copy reuse
  archivelog like "C: \ APP \ ADMINISTRATOR \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ 2014_04_28 \ O1_MF_1_8_9OVL1Z3C_.ARC" auxiliary format
 "D: \ ORADATA \ ARCHLOG \ ARC0000000008_0844855394.0001" archivelog like
 "C: \ APP \ ADMINISTRATOR \ FLASH_RECOVERY_AREA \ ORCL \ ARCHIVELOG \ 2014_04_28 \ O1_MF_1_9_9OVL9CLM_.ARC" auxiliary format
 "D: \ ORADATA \ ARCHLOG \ ARC0000000009_0844855394.0001";
  catalog clone archivelog "D: \ ORADATA \ ARCHLOG \ ARC0000000008_0844855394.0001";
  catalog clone archivelog "D: \ ORADATA \ ARCHLOG \ ARC0000000009_0844855394.0001";
  switch clone datafile all;
}
The script is being executed memory

Start backup at 28-4 months to 14
Use the channel ORA_DISK_1
Channel ORA_DISK_1: Starting copy archive log
Input archived log thread = 1 sequence = 8 RECID = 165 STAMP = 846069440
Output file name = D: \ ORADATA \ ARCHLOG \ ARC0000000008_0844855394.0001 RECID = 0 STAMP = 0
Channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Channel ORA_DISK_1: Starting copy archive log
Input archived log thread = 1 sequence = 9 RECID = 166 STAMP = 846069675
Output file name = D: \ ORADATA \ ARCHLOG \ ARC0000000009_0844855394.0001 RECID = 0 STAMP = 0
Channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Complete backup at 28-4 months to 14

Cataloged archived log
Archive log filename = D: \ ORADATA \ ARCHLOG \ ARC0000000008_0844855394.0001 RECID = 1 STAMP = 846069680

Cataloged archived log
Archive log filename = D: \ ORADATA \ ARCHLOG \ ARC0000000009_0844855394.0001 RECID = 2 STAMP = 846069680

1 data file has been converted to a copy of the data file
Input data file copy RECID = 6 STAMP = 846069680 filename = D: \ ORADATA \ PDB \ SYSTEM01.DBF
2 has been converted to a data file copy of the data file
Input data file copy RECID = 7 STAMP = 846069681 filename = D: \ ORADATA \ PDB \ SYSAUX01.DBF
3 data file has been converted to copy data files
Input data file copy RECID = 8 STAMP = 846069681 filename = D: \ ORADATA \ PDB \ UNDOTBS01.DBF
4 has been converted to a data file copy of the data file
Input data file copy RECID = 9 STAMP = 846069681 filename = D: \ ORADATA \ PDB \ USERS01.DBF
5 data file has been converted to a copy of the data file
Input data file copy RECID = 10 STAMP = 846069681 filename = D: \ ORADATA \ PDB \ EXAMPLE01.DBF
6 data file has been converted to a copy of the data file
Input data file copy RECID = 11 STAMP = 846069682 filename = D: \ ORADATA \ PDB \ TBS01.DBF
7 has been converted to a data file copy of the data file
Input data file copy RECID = 12 STAMP = 846069682 filename = D: \ ORADATA \ PDB \ UNDOTBS02.DBF
8 is converted into the data file copy of the data file
Input data file copy RECID = 13 STAMP = 846069682 filename = D: \ ORADATA \ PDB \ RMAN_TBS01.DBF

The memory contents of the script:
{
  set until scn 2918155;
  recover
  standby
  clone database
    delete archivelog
  ;
}
The script is being executed memory

Command being executed: SET until clause

Start recover at 28-4 months to 14
Use the channel ORA_AUX_DISK_1

Media recovery is beginning

Archive log 8 thread 1 sequence has been as a file D: \ ORADATA \ ARCHLOG \ ARC0000000008_0844855394.0001 exists on disk
Archive log thread 1 sequence 9 as document D: \ ORADATA \ ARCHLOG \ ARC0000000009_0844855394.0001 exists on disk
Archive log filename = D: \ ORADATA \ ARCHLOG \ ARC0000000008_0844855394.0001 thread = 1 sequence = 8
Archive log filename = D: \ ORADATA \ ARCHLOG \ ARC0000000009_0844855394.0001 thread = 1 sequence = 9
Media recovery is complete, Time: 00:00:03
Complete recover to 28-4 months to 14
Completed Duplicate Db at 28-4 months to 14

4. Check the standby database
set oracle_sid = pdb
SQL> sqlplus / as sysdba
SQL> select status from v $ instance;
STATUS
------------------------
MOUNTED
SQL> select member from v $ logfile;
MEMBER
------------------------------------
D: \ ORADATA \ PDB \ REDO03.LOG
D: \ ORADATA \ PDB \ REDO02.LOG
D: \ ORADATA \ PDB \ REDO01.LOG
SQL> select * from v $ dbfile;
    FILE # NAME
---------- ------------------------------
        4 D: \ ORADATA \ PDB \ USERS01.DBF
        3 D: \ ORADATA \ PDB \ UNDOTBS01.DBF
        2 D: \ ORADATA \ PDB \ SYSAUX01.DBF
        1 D: \ ORADATA \ PDB \ SYSTEM01.DBF
        5 D: \ ORADATA \ PDB \ EXAMPLE01.DBF
        6 D: \ ORADATA \ PDB \ TBS01.DBF
        7 D: \ ORADATA \ PDB \ UNDOTBS02.DBF
        8 D: \ ORADATA \ PDB \ RMAN_TBS01.DBF
Selected 8 rows.
SQL> select name from v $ tempfile;
NAME
------------------------------------
D: \ ORADATA \ PDB \ TEMP01.DBF
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ -------------- -------- ------------------------------
control_file_record_keep_time integer 14
control_files string D: \ ORADATA \ PDB \ CONTROL01.CTL,
                                                            C: \ APP \ ADMINISTRATOR \ FLASH_REC
                                                            OVERY_AREA \ PDB \ CONTROL02.CTL
control_management_pack_access string DIAGNOSTIC + TUNING
SQL> show parameter spfile
NAME TYPE VALUE
------------------------------------ -------------- -------- ------------------------------
spfile string

5. Create a standby database standby logfile
The standby redo log log than the master database redo log more than one group.
redo log main library
SQL> select group #, thread #, sequence #, members, archived, status from v $ log;

    GROUP # THREAD # SEQUENCE # MEMBERS ARCHIV STATUS
---------- ---------- ---------- ---------- ------ ---- --------------------
        1 1 10 1 YES INACTIVE
        2 1 11 1 NO CURRENT
        3 1 9 1 YES INACTIVE
Main Library is three groups, each one, then the library should be prepared to establish four groups a.
SQL> alter database add standby logfile group 4 'D: \ oradata \ pdb \ redo04.log' size 50M;
Database has changed.
SQL> alter database add standby logfile group 5 'D: \ oradata \ pdb \ redo05log' size 50M;
Database has changed.
SQL> alter database add standby logfile group 6 'D: \ oradata \ pdb \ redo06log' size 50M;
Database has changed.
SQL> alter database add standby logfile group 7 'D: \ oradata \ pdb \ redo07log' size 50M;
Database has changed.

6. In the main library to add standby log
SQL> alter database add standby logfile group 4 'C: \ app \ Administrator \ oradata \ orcl \ redo04.log' size 50M;
Database has changed.
SQL> alter database add standby logfile group 5 'C: \ app \ Administrator \ oradata \ orcl \ redo05.log' size 50M;
Database has changed.
SQL> alter database add standby logfile group 6 'C: \ app \ Administrator \ oradata \ orcl \ redo06.log' size 50M;
Database has changed.
SQL> alter database add standby logfile group 7 'C: \ app \ Administrator \ oradata \ orcl \ redo07.log' size 50M;
Database has changed.

Fourth, the test
Archive logs 1. Main Library
SQL> archive log list;
Database log mode Archive Mode
Enable automatic archiving
Archive destination USE_DB_RECOVERY_FILE_DEST
The earliest online log sequence 9
The next archived log sequence 11
Current log sequence 11
2. Preparation of the archive library
SQL> archive log list;
Database log mode Archive Mode
Enable automatic archiving
Archive destination D: \ oradata \ archlog
The earliest online log sequence 11
The next archived log sequence 0
Current log sequence 11
3. Turn on the standby database redo apply
SQL> alter database recover managed standby database disconnect from session;

Database has changed.
4. On the master side switch logs for synchronization
SQL> alter system switch logfile;

The system has changed.
SQL> select max (SEQUENCE #) from v $ archived_log;

MAX (SEQUENCE #)
--------------
          156
Preparation Sink:
SQL> select max (SEQUENCE #) from v $ archived_log;

MAX (SEQUENCE #)
--------------
          156

At this point, Oracle11gR2 the physical standby database completed structures.
     
         
         
         
  More:      
 
- 24 Docker recommendations (Linux)
- How to test your MongoDB application upgrade? (Database)
- Ubuntu 14.04 install Sublime Text 3 plug and use SublimeClang (Linux)
- Linux kernel log --dmesg (Linux)
- Use Markdown editor for document work under Linux (Linux)
- Linux Getting Started tutorial: GNU C and Vim will fight the C / C ++ IDE semi-automatic (Linux)
- How to turn Java String into Date (Programming)
- Getting the Linux shell expr use (Programming)
- OpenvSwitch 2.1.2 shell script to start and stop (Linux)
- Linux, Firefox unloading and installation and upgrade (Linux)
- Linux system security knowledge (Linux)
- Ubuntu users Steam controller does not work solutions (Linux)
- Fedora 22 users to install the VLC media player (Linux)
- Redis-2.8.17 installation and configuration process some errors (Linux)
- C ++ Supplements - Smart Pointers (Programming)
- Android Qemu GPS module (Programming)
- OpenGL Superb Learning Notes - Fragment Shader (Programming)
- Using open source software to build XWiki Wiki system installed within the company (Linux)
- sed and awk in shell usage and some examples (Linux)
- CentOS 6.5 install Maven and Nexus warehouse agent (Server)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.