Technical Special Summary: Standby Database

xiaoxiao2021-03-06  67

- Reprinted from Snowhite2000

Technical Special Summary: Standby Database

Forward, when chao_ping proposes me to open a STANDBY DATABASE technology, I originally wanted to discuss the technical aspects of Standby Database. Seeing more than 30 posts, it is necessary to say that before the technical problem, let's say some questions, although these are topics that have nothing to do with technology, but for the workman of the industry IT, it is a The question should be considered first. We are doing technology, meaning, in the management of enterprises, we can do the most, what we said, for managers, can only be referred to, the decision is not us. Many IT's technicians, especially many young friends who first out, feel that technicians are in a business, most important. If my technology is good, the world is mine. There are a lot of misunderstandings. For example, what server will technicians use to use the company, what Database Server is used, how much is the ability to control? There are now many companies to put Oracle data platforms, set in IBM's AIX UNIX server, is this a reasonable choice? It is well known that AIX is not the preferred operating system in Oracle, and the Oracle has many BUGs on the AIX platform. These two companies are pushed to each other. The users can't get Patch solutions, but the company's decision-making In this way, those who do technology can determine how much. The company's management must have their truth. For example, the company decides that all servers can purchase a larger discount, reduce the support manufacturers in the technology. Wait, we can only accept the company's choice. At this point, we have no differences with the company's other staff. If you hold the thoughts of "only my alone", you will not agree in people. It is mentioned that many people will say that China's interpersonal relationship is very complicated, and it may be much abroad. In fact, there is the same thing in the world. In China, it is not working in China. We have a post in the forum. Some people are posted, and some people rebound, such as the low-handed hand, or ironically, the procedures are not good, I don't want to use the ancients, three people, there must be the class of our teachers to argue Dish, from the lowest point, you have a problem, some people are willing to help you, no matter whether they have or not help you, you should be grateful, isn't it. Regrained to Standby Database discussion, many posts refer to the issue of Standby Database should be selected. In fact, this problem is not just a problem. This is why I said it has said a bunch of external words. When a DateBase requires special features, such as High Available, Disaster Recovery, Scalability, etc. Various products, each has a thousand autumn. In the functions we need, the most satisfied requirement, don't ask others, no one knows what you need than you. After doing research, if you are not sure, you can consult a senior person, but the basic view is that someone's proposal is just your reference, I still have to say, because no one knows what you need more than yourself.

Technicians do to know the product is best suited for technical requirements, but this does not guarantee that the product that is the most suitable for technical requirements, and the final choice is related to many aspects. For example, I have a Database requires high available, scalability, which looks OPS is the most suitable, but the next question is that the OPS requires extra licensing feed, and our current hardware cannot support OPS, need Database must enter the production mode before ordering new, ordering new devices. More complicated, the boss of our technical department should use OPS, but the boss of the project management department should use Standby Database, because existing hardware support, no need to purchase additional software, two of them, one tube technology, one, two Individuals know some Oracle technology, it is not an expert. With conscience, OPS and Standby can cope with current demand, long-term, OPS is good, after all, using Client / Server front desk software, users will have increased trends. However, these contents have also exceeded the scope of the staff of the technicians, and I only do it according to the final decision. Because I don't have the right to choose and decide. Finally, I hope to talk about the professional ethics of IT practitioners. As an expert in a certain field, maybe many times will be asked to be related to professional issues. There is a project, please recommend running platform or background to choose the company's Database support. Although many new technologies are very attractive, IT's technicians can't learn from themselves, and they are recommended and not suitable for the product. Gossip has been completed, such as a topic. Thank you for your patience.

1. STANDBY DATABASE Working 1. Oracle and high availability ) application and middleware failures (3) network failures (4) media failures (5) Human Error (6) Disasters and extended outages (7) Planned downtime, maintenance and management tasks contains the above-described sixth including disaster recovery. So Disaster Recovery should be considered as a relation to High Availability. In general, in addition to the performance mediation in the Oracle Database itself, Oracle provides high Availability related products mainly below: (1) Oracle Fail Safe On NT (2) Oracle Parallel Server (3) Oracle Parallel Fail Safe (4) ORACLE Advanced QUENING (5) Oralce Advanced Replication (6) Oracle Standby Database mainly uses Advanced Replication for DistribIited Data features and we discussed Standby Database. From the posts involved in the discussion, the relevant problem is to focus on the choice of OPS, Standby Database, and Advanced Replication, so I will first make comparison first. The original design for OPS (Oracle Parallel Sever) is the original design of System / Application High Availability. Compared to other products: OPS is a pluster (MPP Massively Parallel Process) of multiple single CUP or SMP (Symmetric Multi-Processing System). Different NODEs in the Cluster use one (generally one) or multiple Oracle Instances to connect with a DATABASE. Main technical features: (1) Database All Data files are built on Raw Devices, so there is high dependence on OS settings in technology, many aspects depend on whether the OS is supported. (2) In Database, each Node has its own alone on-line redo log file groups, so special processing is required when making backup and recovery. (3) OPS Data Files does not have Redundance, so the MEDIA Failure is based on the RAID (Redundant Array Of INExpensive Disk) Subsystem.Orcle starts on the OS platform from 8i, and gradually on different OS platforms, adding Fail. The features of Safe / Failover are not described in detail here. The design of Advanced ReplicationReplication is the Application Access Database Locally, which is dispersed.

This technique can copy Tables, Indexes, Views, Packages and Functions, Triggers, SEQUENCES, SYNONYMS in a Database, SEQUENCES, SYNONYMS to another Database. If it is a copy of all Database, it is also available for High Availability. One example, Yahoo in the east bank of the United States and the West Bank, each has a mirror Database, which is the use of the replication technology. Users on both sides of the shore are the most recent Database to improve access. If a Database has a problem, the user automatically turns into another connected to the other, and realizes the HIGH Availability of the website. This high availability is transparent to the user. Other examples, in the company, for example, HR Database employee information, other information such as salary, can be created in HR in the HR, replicated in the ACCOUNG DATABASE in HR. Because most Replicas are in different places, it has established Redundance Data in the same place. Replication is the High Availability for Database. 2. STANDBY DATABASE has written so much, and now the topic to be discussed now. From the description, Standby Database is a backup established for Primary Database, so it has Redundance Data, which is also high availability relative to Database. Standby Database is a backup made by Primary Database, which is implemented by the Primary Database constantly generated ArchiveD log files. primary database state archive mode, continuous feeding archived log files to the standby database, the standby database is in recovery mode, archived log files continue Apply primary database in order to accomplish the above-described process, you must meet the following conditions: (1) If the primary Database and Standby Database are running on different servers, then the two servers must have the same Version and Release operating system; must have the same Version, Release, and Patch Oracle RDBMS system. (2) Oracle is to allow Primary and Standby Database to run on the same server. If this is this situation, it is recommended that these two Databases are to be distributed over different Physical Disk Drives. And not all operating systems support Mount two instances to connect two Databasess. (3) Primary Database must be in Archive Log Mode. (4) Oracle starts support Standby Database from Version 7.3.

7.3.x - 8.0.x Nery to manually copy all ArchiveD log files from Primary Server to Standby Server, and require manual recovery archived log files (of course these can be implemented by OS shell scripts, sql scripts, etc.); and Standby Database can only be in the state of Close / Nomount / Mount. (5) Oracle starts from Version 8i (8.1.5) Support Primary Database to automatically send ArhiveD log file to a Up to one Remote Site (Generally, the Standby Database Server), which can be more than seven locations. And, STANDBY DATABASE adds Managed Recovery Mode in a state in which STANDBY DATABASE can automatically immediately apply from Primary Node. ArchiveD log files. (6) Oracle starts supporting the conversion of Standby Database Mount and Database Read Only Mode from Version 8i (8.1.5). This makes it easy, the system can use Standby Database to generate Reports without affecting the user's normal use of Primary Database. (7) Once STANDBY DATABASE is active, it becomes Primary Database, which cannot return to Standby Database Mode. So Primary Database has a problem, and Standby Database is backed by active as Primary Database. If you need to rebuild Primary / Standby Database on the original primary / standardby node, both Database need to rebuild. (8) Data loss problems between PRIMARY DATABASE is on starting Standby Database. If PRIMARY DATABASE cannot complete the log file switch before you have a problem, the two Database will take the data in the Current On-Line Redo Log file. Data Guard in Oracle9i made up this lack. Oracle8i only supports Data Guard with the Solaris platform. Note: The two items support only the Oralce 8i EE (Enterprise Edition) version (5) (6). These two features are not supported by SE (STANDARD Edition). Different from OPS and Advanced Replication, when using Standby Database, both the system requires Down Time when reconstructing Primary Database on the Active Node, or in the primary node. The length of time is long, related to the system status. If you can establish Standby Database in Primary Mode (if the hardware settings of the two Server, general Standby Node should be worse, save costs), can reduce Downtime. Partial details can be discussed in several parts below.

Second, the establishment of the Standby Database Establishing Oracle Standby Database is not complex, but the relevant settings for the establishment process depends on the purpose of establishing the Standby Database. For example, if establishing Standby Database is for Disaster Protection, Standby Database cannot be built on the same server as the Primary DataBase. If it is for Protection Against Data Corruption, when Standby Database receives the ArchiveD log file sent by Primary Database, Apply requires a paragraph, such as three hours, or six hours. This way Standby Database will not synchronize with Primary Database when the Primary Database has an error. In this article, I can't analyze various performance, only a specific example analysis. Conditions We are committed to customers: 24x7 uptime of SIS databasein case of failure on primary: 1.1 1/2 hour to fail over to standby database1.2 no more than 5 mins data loss1.3 2 hours scheduled downtime to revert back to primary / standby We have completed the work in order to complete the above, and build Standby Database in Remote Site. We have half an hour of time Activing Standby Database, I personally like to make a Cold Backup. 2. Take our environment, 4 groups of log groups, 2 MEMBERS per group, on-line redo log file size is 10M, run peak, up to 10 Archived Files per minute. So when it is non-peak, we use cron job to force log switch.3. Because our Standby Database Server is not dedicated, we need to re-establish Primary / Standby Database during a non-peak period. Here, I have to say some Excessive words. When the DBA is applied for Down Time, I should reserve enough time to give myself. How much is appropriate, I have to master it. (If there is too little time, the boss and customers may think that the work of DBA is easy, or not important, if there is an error, its pressure is also big enough. So general choice to accept the maximum time available in users, I usually require 2-4 times the time required to take time). 1. In accordance with the above conditions, we do the environment setting (1) First, we must confirm the primary database is in archived mode: SQL> archive log list; Database log mode Archive ModeAutomatic archival EnabledArchive destination / oradba / sisi / archOldest online log sequence 4783Next log Sequence to Archive 4786Current Log Sequence 4786 (2) The condition we must meet is High Availablity, so we use a duplex.

In the form of double-machine form, there are many benefits. In addition to the other OS systems and Oracle systems that are installed with Primary Node, all other settings can be identical to the Primary Node, save a lot of troubles to modify parameters. (3) Our Oracle version is 8.1.7ee, Standby Node ARCHIVED LOG FILES for Primary Node via Net8. We specially opened the Port 1512 as a Listener for Standby Database at Standby Node. (Oracle's default is Port 1521). 2. The establishment of Standby Database: Standby Database is generally built with the Cold Backup of Primary Database. In special cases, you can do it with RMAN or Export DMP File. Here we are the normal situation. (1) Establish the same DataFile Directory as the primary node on the STANDBY Node.

We use / ORADBA / SISI / (2) Modify Primary Database's Initialize Parameter File: (Our example, please don't ask me, a lot of Application requirements, not me to make) Primary Database: db_name = sisiinstance_name = sisiService_names = sisicontrol_files = (/oradba/sisi/ctrl/stctl1si.ctl, /oradba/sisi/ctrl/stctl2si.ctl)db_files = 500compatible = 8.1.7.0.0rollback_segments = (rbs1, rbs2, rbs3, rbs4, rbs5, rbs6, rbs7 , rbs8, rbs9, rbs10, rbs11, rbs12, rbs13, rbs14, rbs15) db_file_multiblock_read_count = 32optimizer_mode = rule #application requireddb_block_size = 8192db_block_buffers = 83200 shared_pool_size = 52428800 sort_area_size = 1048576 sort_area_retained_size = 64000log_checkpoint_interval = 10000sessions = 252transactions = 280transactions_per_rollback_segment = 4processes = 800open_cursors = 1000dml_locks = 500log_buffer = 20971520log_checkpoint_timeout = 10000cursor_space_for_time = trueutl_file_dir = / tmptimed_statistics = false # if you want timed statisticsmax_dump_file_size = 2097152 # limit trace file size to 5 Meg eachcore_dump_des t = / oradba / sisi / cdumpbackground_dump_dest = / oradba / sisi / bdumpuser_dump_dest = / oradba / sisi / udumpremote_login_passwordfile = noneparallel_max_servers = 0 # The following parameters are the HA parameters needed for Standby Database on primary sideLOG_ARCHIVE_START = TRUELOG_ARCHIVE_FORMAT = "sisi% S.arc "LOG_ARCHIVE_DEST_1 = 'LOCATION = / oradba / sisi / arch MANDATORY REOPEN = 60'LOG_ARCHIVE_DEST_STATE_1 = ENABLESTANDBY_ARCHIVE_DEST =' / oradba / sisi / arch'LOG_ARCHIVE_DEST_2 = 'SERVICE = standby_sisi MANDATORY REOPEN = 60'LOG_ARCHIVE_DEST_STATE_2 =

ENABLELOG_ARCHIVE_MIN_SUCCEED_DEST = 2 Copy Standby database side opposite to the directory below: db_name = sisiinstance_name = sisiservice_names = sisicontrol_files = (/oradba/sisi/ctrl/stctl1si.ctl, /oradba/sisi/ctrl/stctl2si.ctl)db_files = 500compatible = 8.1. 7.0.0rollback_segments = (rbs1, rbs2, rbs3, rbs4, rbs5, rbs6, rbs7, rbs8, rbs9, rbs10, rbs11, rbs12, rbs13, rbs14, rbs15) db_file_multiblock_read_count = 32optimizer_mode = ruledb_block_size = 8192db_block_buffers = 83200 shared_pool_size = 52428800 sort_area_size = 1048576 # 100M Change to 1M after import.sort_area_retained_size = 64000log_checkpoint_interval = 10000sessions = 252transactions = 280transactions_per_rollback_segment = 4processes = 800open_cursors = 1000dml_locks = 500log_buffer = 20971520log_checkpoint_timeout = 10000cursor_space_for_time = trueutl_file_dir = / tmptimed_statistics = false # if you want timed statisticsmax_dump_file_size = 2097152 # limit trace file size to 5 meg eachcore_dump_dest = / oradba / sisi / cdumpbackround_dump_dest = / Oradba / sisi / bdumpuser_dump_dest = / oradba / sisi / udumpremote_login_passwordfile = noneparallel_max_servers = 0 # The following parameter are the HA parameters needed for Standby Database on standby sideLOG_ARCHIVE_START = FALSELOG_ARCHIVE_FORMAT = "sisi% S.arc" LOG_ARCHIVE_DEST_1 = 'LOCATION = / oradba / sisi / arch MANDATORY REOPEN = 60'LOG_ARCHIVE_DEST_STATE_1 = ENABLESTANDBY_ARCHIVE_DEST = '/ oradba / sisi / arch'LOG_ARCHIVE_DEST_2 =' SERVICE = standby_sisi MANDATORY REOPEN = 60'LOG_ARCHIVE_DEST_STATE_2 = ENABLELOG_ARCHIVE_MIN_SUCCEED_DEST =

2 (3) Shutdown Primary Database Normal / Immediate, make a cold backup, when startup primary data, use the PFile to mark the Parameter file above. With FTP or other OS tool, put the cool backup DataFiles / Online Redo log files to The corresponding Directory has been built in Standby Node. (4) Establish Standby Database Control File.alter Database Create Standby ControlFile As '/ ORADBA/SISI/temp/stctl1si.ctl'; uses RCP or FTP to Standby Node to replicate the other with CP Command.

(5) In the primary side edit the Tnsnames.ora file, add one (you can do it with Netasst): Standby_SISISI = (deScription = (address = (address = (protocol = TCP) (Host = 1512)) (port = 1512)) (Connect_Data = (SID = SISI))) (6) Add one feature (can be done with Netast) at Standby Node (you can do it with NetAsSt): ST_Listener = (deSCription = (protocol = tcp) (Host = protltest) (Port = 1512)))) SID_LIST_ST_Listener = (SID_LIST = (SID_DESC = (Global_DBNAME = SISI) (Oracle_Home = / ORACLE / 8.1.7) (SID_NAME = SISI))) (7) Start Standby Listener: Lsnrctl Start ST_Listener; (8 ) start standby database $ export ORACLE_SID = sisi $ sqlplusSQL * Plus: Release 8.1.7.0.0 - Production on Mon Dec 31 00:54:28 2001 (c) Copyright 2000 Oracle Corporation All rights reserved.Enter user-name:. internalConnected to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - ProductionJServer Release 8.1.7.0.0 - ProductionSQL> startup nomount pfile = '/ oradba / sisi / pfile / stinitsi.ora'; SQL> alter database mount standby database; (9) Apply log files here, the nucleus has Archiv between Standby Database and Primary Database, which has been mount. Is there a gap on Ed logs: SQL> Select Sequence # from v $ log_history; if there is a gap, you should manually take the difference ArchiveD Log Files Copy to Standby Node, and manually recovery: SQL> Recovery Automatic Standby Database If There is no gap, you can enter the Managed Recovery mode: SQL> Recovery Managed Standby Database Note: Standby Database is under the management below Managed Recovery Mode, see the next part.

Third, Standby Database maintenance and backup in the previous part, we mentioned the status of Standby Database. In each version (referring to 7.3.x - 8.0.x) before Oracle 8i, Standby Database can only be in the Manual Recovery Mode and become Active to become Primary Database, and the transmission of ArchiveD log file needs to be done by manual or OS related tools. From ORACLE8.1.X Start (EE Version), Oracle adds new features, on the status of Standby Database, adds Managed Recoved Mod and Read Only Mode, ArchiveD log files can also be automatically transmitted to Standby through Oracle Network. Side. This article is based on the discussion of related issues in UNIX environment based on Oracle 8.1.7ee version. 1. Maintenance of Standby Database In the general case, Standby Database has been in the case of Managed Recovered Mode. (1) If Database is required to be managed by Managed Recovered Mode, the condition that must be satisfied is: In the Primary Database and Standby Database, you have manually Recover Gap log files after being created. Therefore, if it is not established by the previous cold backup and backup Archive Database, there is no log gap between the two Database, you can go directly to Managed Mode. When there are archived log files gaps primary database and standby database, the need to manually do the recovery, of the order is: SQL> recover standby database; OrSQL> recover automatic standby database; if the two command get ora-00308, 27037, 01547 , 01194, 01110, 01112 wrong time, standby database can directly enter the managed mode: SQL> recover managed standby database; (2) when the standby database is in managed recovery mode, recover managed standby database; command line of the window session to be forever Open, Standby Database can always be in the waiting state. When the next ArchiveD log file is delivered to the Standby Node specified location, it will be promptly sent by Recovery to Standby Database. If it is limited, you can use the following command when you are always open, you can use a Managed Mode Session WINDOW. SQL> Recover Managed Standby Database Timeout 15; It is a 15 minute for the Managed Mode window. If you don't receive a new ArchiveD log files within 15 minutes, this session ends yourself. But after the end, the new ArchiveD log files will not be automatically recover to Standby Database.

In this case, you can run the above command by setting up crontab Job, run the above command, to ensure the data gap in Primary Database and Standby Database, the maximum frequency of execution of Crontab JOB. (3) In terms of maintenance, we have not discussed the impact of the Primary Database data structure and Data Files Size to Standby Database. These conditions are not very common in a mature Database environment, nor is it difficult to solve. 2. After using Standby Database, the Database's backup plan is very important before the system has not used Standby Database, everyone knows that the Databases' backup plan that is running on a node on a node is very important. From the perspective of DBA, it is not intended to add all the backup plans to discard it because the system adds Standby Database. For the system I used to use, before we set up Standby Database, we have two hours of Downtime to do Cold Back back, remove all Archived log files above Hard Disk; every night, there is a Full Export and all Data HotBack for FILES. After establishing Standby Database, we lost every Tuesday's Downtime time, ie, we have no way to Cold Backup for Primary Database every week, but we still retain the full DataBase every night of Full Export and all Data Files Hotback. All ArchiveD log files are still cleaned up once a week and transferred to the backup tape, retaining a year. Every year's Downtime We are still in consultation with our customers. In this case, STANDBY DATABASE is made to make a relatively need to consider it, and Primary Database cannot perform Cold Backup's defects. Standby Database can use two situations for Backup. One is in the SHUTDOWN state (must shutdown Normal / Immediate). The other is that Standby Database is in the Read-ONLY state. SHUTDOWN state, equivalent to Cold Backup, after Standby Database Shutdown, Database cannot be in the Managed Recovery status, there is a possibility of manual Recover Primary / Standby Database, which is possible to manually manually. Standby Database still allows Database to be in Managed Recovery Mode when STANDBY DATABASE is in the Read-Only state. But this backup recovery may be troublesome. After considering the various situations, our system uses the Cold Backup after SHUTDOWN IMMEDITE, and the Standby Database.

Fourth, Opening / Activating A Standby Database In the usual case, Standby Database is in the Recovery status. But after OPENED Read-Only or Activeated, you can Access Standby Database in the DATA in Access Standby Database. 1. Opening Standby Database Read-Only: When Standby Database is Opened Read-Only, the data can only be in the read state. Because the standby database is opened to be read-only mode after, can also be restored to recovery / managed recovery mode, so opening standby database read-only, can be used to test the standby database is set up successfully and whether the archived log files successfully applied to the database. In more case, Read-Only Mode is used for system Run Report. Many systems with many users need ON-Line Data Access, while needing Run Report, in order to avoid the system Overheat, when the stand-alone status, the big Reports is running at night and weekends in the non-peak. If there is a Standby Database, you can use Run Reports in Read-Only, do not affect the performance of Primary Database. It should be noted that when under Read-Only Status, Primary Database's ArchiveD log file continues to serve Standby Database, but will not be Apply to Standby Database. So, after RUN is completed, Standby Database returns to Managed / Manual Recovery Mode. For the command line as follows: If the standby database in shutdown state: SQL> startup nomount pfile = / path / stinit.oraSQL> alter database mount standby database; SQL> alter database open read only; if the standby database in manual / managed recovery mode: SQL > recover cancel / recover managed standby database cancel (need another open a session to do) SQL> alter database open read only; the read-only mode the standby database return to manual / managed recovery mode: SQL> recover standby database; / recover managed Standby Database Time Out 15; Check the status of Database: SQL> Select Status from V $ Instance; Status ------- mounted2. Activating A Standby Database When PRIMARY DATABASE does not work properly, Time is more than the user acceptable range, you need to hit STANDBY DATABASE to make it a Primary Database. This behavior is one-way.

The Standby Database that is hitted is unable to return to the Standby state. Next part, we discussed the reconstruction issues of Standby Database. The process of completing the hitting Standby Database makes it a process of Primary Database requires Downtime. The process is as follows: (1) First, you want to shutdown Primary Database. This situation appears in Primary Database, you can't work properly, but Database is still in the Open state, but you can't do Online Recovery, or the conditions you need on Online Recovery, Customers cannot accept (possibly part of DATA unacceptable, the required time is different depending on the data corruption). At this time, if you may try to try to trust Archive Current Online Log Current; (2) Corresponding to Standby Database Node, Activating, Apply To the last ArchiveD log file. If the PRIMARY DATABASE error causes Database Down, the system lost DATA will be DATA in the Online log file. Similarly, Before Activating, Apply to the last ArchiveD log file. (3) Activate Standby Database: SQL> ALTABASE ACTIVATE Standby Database; (4) Shutdown The Standby Database Normal / Immediate, after Standby Database; Here, you need to explain it here, when STANDBY DATABASE is active after ActiVated, this process will automatically resetLogs. Therefore, you have to make Cold Backup before Startup, because the past BACKUP can only receive this by recover to Standby Database by ActiVated. In addition, Standby Database's Parameter File is log_archive_start is false, and the system cannot automatically automatically archive log file, to change to Ture before Startup. This ensures that any situation before reconstructing Primary Database, Database can be used by Recovered to the point of failure. (5) Open the standby database.sql> Startup pfile = / path / stinit.ora Note: If the user is connected to Primary Database or other means, while the CLIENT SIDE is modified while the Activate Standby DataBase The Database Hose Name or IP address in the TNSNames.ora file.

Reconstruction of Primary and Standby Database When the original Standby Database has become Primary Database, it is generally reconstructed in the first non-peak working period of only the first non-peak working period. How to rebuild Standby Database, first consider the settings of the system, and how much time is rebuilt. Example 1: If the primary / standby two Nodes are dedicated to the database, and the settings are the same, the database on the Standby Node can be used as Primary Database, and it is possible to create a Standby Database on the original primary. The system does not require Downtime. The backup file can be used in the previous part, and Standby Database changes the cold backup before the primary Database Open, and then manually Apply from the database Open to all ArchiveD logs. Note that in this case, you want to reset the TNSNames.ora file of the current primary Database Node, as well as the listner.ora file above the current Standby Node. (For details on the establishment of SitBy Database in the above) This setting is the ideal setting in the Standby Database system, even under some scenarios, you can active Standby Database, directly for Primary Database, then in Standby Node Rebuild Standby Database. Specific settings and operations are set according to the requirements of the project. Example 2: In this case, in any case, the original primary node wants to return to the primary database server, and the Database on the Standby Node returns to the status of Standby Database. In this case, if you can get enough system Down Time, the easiest way is to copy all the ALL DATABASE SHUTOWN, copy all all Database File on the Standby Node, but does not include Parameter files to Primary Node. In the original directory, cover the original file, remove the original Database's alter.log / trace files / archived log file, etc., directly Open Database, and all TNSNAMES. ORA files of Application Side are changed into Primary node. Reconstruction of Primary Database is only 10 minutes more time than the system copy file. At Standby Node: After Database Shutdown, copy files Go to Primary Node, you want to make a cold backup for the entire Database. After that, use the original backup Standby Database's parameter file to replace the current parameter file, then create a Standby Database's Control File from the Open's Primary Database to the Standby Node to replace the current Control Files.

If this time, Primary Database has not generated new archived log files, and Standby Database can go directly to Managed Recovery Mode. This example is a way I am like to use. Now the specific steps are as follows: Reconstruction of Primary Database: 1) Construction of a Standby Database on Standby Node Control File: ALTER DATABASE CREATE Standby Control File '/ ORADBA/DBA /STCRT1SI.CTL' ;2) SHUTDOWN DATABASE Normal / Immediate; 3) A cold backup for Database 4) Clear all ArchiveD log files (original primary node) 5) Copy all Data Files / Control Files / Online Redo Log Files outside Parameter File to Primary Node Orecting Directory, override the original file. 6) The process of reconstructing Standby Database directly using the existing instance: 1) Copying the new Control File (see Reconstruction Primary Database Procedure) Standby Database Parameter File The Directory below 2) Clear all of the Standby Node top after archived log files.3) check to see if the original parameter file with the same standby database parameter file (should be the same), it can be directly Startup standby database: Startup nomount pfile = 'xxxxxxxxxxxxxxxxxxx'; Alter database mount standby database; 4) Recover Managed Standby Database Timeout 15; (Because it is not working busy, there will be many Transactions, so you can enter Managed Recover mode before you have new archived log file. If you have already generated ArchiveD log files To manually manually. Example 3: In the case of instance II, if you reconstruct the primary Database on the primary node, the user does not allow enough system Down Time, the method you can use is, in the primary node, build it again After running Database, after the establishment, you can make a conversion in the shortest time. In this case, the problem that needs to be an idea is that the parameter file above the original primary node is to modify the parameter of Standby Mode, At the same time, Network file also needs to make a corresponding change. (Standby Database change, best every version of the file, if parameter file, tnsnames.ora, listener.ora, etc., special collection of a place, will benefit Shallow.

) Under this instance, after activated Standby Database, Shutdown, you still have to make Cold Backup after SHUTDOWN. So the required System Downtime is almost a time of Cold Backup. How to reconstruct Standby Database on the original Standby Node, please refer to how to establish the contents of the Standby Database part. After the report, STANDBY DATABASE was written from December 18 last year, and after completion of today, it can be described as long as it is. For this article, Snow Snow strives to complete a summary of all discussion issues, hoping to have a basic concept; I hope to implement Standby Database friends, there is a basic technical guidance . It is hoped that the technical summary can achieve the original intention of Snow, help you friends in the forum. Japanese moon, fighting star shift. Recalling that every time I encounter, I have been encouraged and supported by friends on the forum. It has not been there many years, and Bai Xue is very moving. Here, I sincerely pay tribute and grateful to these friends. At the same time, I also grateful to all friends who participated in the discussion, especially those who provide information: Blossom (AK66), Allanliao, half bottle vinegar (IS is a good name.), Guan_yi et al. In the case of energy and time, Snow is willing to continue to launch the technical topic of everyone. If you have a problem, please post it on the forum, or leave a whisper, give me a message, welcome everyone to participate. Finally, thank you for your friends who support Snow. Reference: 1. Oracle 8i Random Document: Oracle8i Standby Database Concepts and AdministrationHttp: //otn.racle.com/docs/Products.../a76995/toc.htm2. Oracle White Papers.http: //otn.racle. COM / Deploy / Availa ... 8i_listing.html

转载请注明原文地址:https://www.9cbs.com/read-106595.html

New Post(0)