Use rman duplicate... from active database to create external uard (for each L

Source: Internet
Author: User


Use rman duplicate... from active database to create external uard (for oracle 11g) oracle 10g can implement external uard through the backup-based rman DUPLICATE, back up the DATABASE through steps, and restore the DATABASE on the standby side. At 11 GB, oracle introduced the Duplicate From Active Database technology, without the need to perform rman backup and recovery for the Database. All actions are automatically completed through the network. The following is a specific implementation example: primary db: hrdbprimstandby db: standby (because it is a three-node rac, the Instance name is standby1) www.2cto.com I. Environment preparations on the primary side: 1, ensure the database archiving status [SQL] SQL> select log_mode from v $ DATABASE; LOG_MODE ------------ ARCHIVELOG 2, Enable force logging [SQL] SQL> ALTER Database FORCE LOGGING; database altered. 3. Generate standby redolog [SQL] SQL> alter database add standby logfile '/oracle/app/oracle/oradata/hrdbprim/redo11.log' size 50 m; Da Tabase altered. 4. to modify the primary parameter file spfile, you must set the following eight parameters: [SQL] SQL> alter system set LOG_ARCHIVE_CONFIG = 'dg _ CONFIG = (hrdbprim, standby) '; www.2cto.com System altered. SQL> alter system set LOG_ARCHIVE_DEST_1 = 'location =/oracle/app/oracle/oradata/hrdbprim/VALID_FOR = (ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME = hrdbprim '; System altered. SQL> alter system set LOG_ARCHIVE_DEST_2 = 'service = standby LGWR ASYNC VALID_FOR = (ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME = standby '; System altered. SQL> alter system set LOG_ARCHIVE_DEST_STATE_1 = ENABLE; System altered. SQL> alter system set FAL_SERVER = standby; System altered. SQL> alter system set FAL_CLIENT = standby; System altered. www.2cto.com SQL> alter system set DB_FILE_NAME_CONVERT = '/oracle/app/oracle/oradata/hrdbprim/', '+ DATA/standby/datafile/' scope = spfile; System Altered. SQL> alter system set LOG_FILE_NAME_CONVERT = '/oracle/app/oracle/oradata/hrdbprim/', '+ DATA/standby/onlinelog/' scope = spfile; System altered. 2. Modify SQL * net files to Ensure network environment preparation and communication between tnsping and listener. oraSID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = standby) (ORACLE_HOME =/oracle/app/oracle/product/11.2.0/db_1) (SID_NAME = standby3 ))) LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = T CP) (HOST = 10.4.124.235) (PORT = 1521) www.2cto.com tnsnames. ora hrdbprim = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.4.124.239) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = hrdbprim ))) standby = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 10.4.124.235) (PORT = 1521) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = standby) (UR = A) 3. Create A standby database 1, pa Ssword password file. You can copy and rename the password from primary or generate a new one. The password must be consistent with the sys password. The copy method sftp... mv orapwhrdbprim orapwstandby2: Create a pfile file. Note that the pfile must be placed in the $ ORACLE_HOME/dbs directory. Otherwise, you must specify the pfile file when starting the file, otherwise, vi initstandby3.ora DB_NAME = standbyDB_UNIQUE_NAME = standby * cannot be copied *. audit_file_dest = '/oracle/app/oracle/admin/standby/adump '*. control_files = '+ DATA/standby/controlfile/control01.ctl', '+ FRA/standby/controlfile/control02.ctl '*. db_crea Te_file_dest = '+ data '*. db_block_size = 8192 *. db_recovery_file_dest = '+ fra '*. db_recovery_file_dest_size = 10G 3, create related directories, used to store datafile and trace filemkdir-p/oracle/app/oracle/admin/standby/sources> mkdir standbyASMCMD> cd standbyASMCMD> mkdir controlfileASMCMD> pwd + data/standbyASMCMD> cd controlfileASMCMD> pwd + data/standby/controlfi www.2cto.com 4, start the database to nomount status standby> startup nomount pfile = '/oracle/ap P/oracle/product/11.2.0/db_1/dbs/initstandby3.ora '; the ORACLE routine has been started. Total System Global Area 304861184 bytesFixed Size 2225872 bytesVariable Size 159385904 bytesDatabase Buffers 134217728 bytesRedo Buffers 9031680 bytes 5, test database connection SQL> connect sys/"pl, 12345" @ standby as sysdba; ERROR: ORA-12528: TNS: listener: all appropriate instances are blocking new connections indicates that the database is not started to the mount status, the listener blocked through tnsnames. add (UR = A) in ora and use listener. ora static registration 6, the primary host runs the following command, the connection must use network connection [SQL] RMAN> 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 www.2cto.com parameter_value_convert 'hrdbprim ', 'standby' set db_unique_name = 'standby' set db_file_name_convert = '/oracle/app/volume l E/oradata/hrdbprim/',' + DATA/standby/datafile/'set log_file_name_convert = '/oracle/app/oracle/oradata/hrdbprim /', '+ DATA/standby/onlinelog/'set control_files =' + DATA/standby/controlfile/control01.ctl ', '+ FRA/standby/controlfile/control02.ctl' set latency = '5' set fal_client = 'standby' set fal_server = 'hrdbprim' set standby_file_management = 'auto' set log_archive_config = 'dg _ config = (hrdbp Rim, standby) 'set log_archive_dest_1 = 'service = hrdbprim ASYNC valid_for = (ONLINE_LOGFILE, PRIMARY_ROLE) db_unique_name = hrdbprim ';}......... 7. For standby databases, enable dataguard sys @ STANDBY3 (dtydb5)> alter database recover managed standby database disconnect from session; the database has been changed. 8. For active standby uard, run the following command [SQL] sys @ STANDBY3 (dtydb5)> alter database recover managed standby database cancel; the database has been changed. Sys @ STANDBY3 (dtydb5)> alter database open; the database has been changed. Sys @ STANDBY3 (dtydb5)> alter database recover managed standby database disconnect; the database has been changed. Sys @ STANDBY3 (dtydb5)> alter database recover managed standby database using current logfile disconnect from session; the database www.2cto.com has been changed. 4. Test the ADG result to restore the single node to the rac database and register it to the CRS. For more information, see the remarks in the previous article. Note: a and standby listeners must be static listeners B and db_file_name_convert, otherwise an error will be reported for ORA-17628 references: RMAN 'duplicate From Active database' Feature in 11G [ID 452868.1] Step by Step Guide on Creating Physical Standby Using RMAN Duplicate... from active database [ID 1075908.1] ORA-17628, ORA-19505 during rman duplicate from active [ID 1331986.1] By hijk139

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.