Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are several concepts in database Standby?

2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article shows you what are several concepts in the database Standby, which are concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

One. Dual machine hot standby

In a broad sense, dual-computer hot backup (dual-computer fault tolerance) means that for important services, two servers are used to back up each other and execute the same service together. When one server fails, another server can undertake the service task, thus without human intervention, automatically guarantee that the system can provide continuous service dual-machine hot standby. The standby server solves the problem of uninterrupted service in the event of a failure of the main server. However, in practical applications, there may be multiple servers, that is, server cluster dual-computer hot backup is generally required to have shared storage devices. However, in some cases, two independent servers can be used to achieve dual-computer hot backup, which needs to be achieved through professional cluster software or dual-computer software.

In a narrow sense, dual-computer hot backup especially refers to server hot backup based on active/standby mode. Server data includes database data written to two or more servers at the same time, or using a shared storage device. Only one server is running at a time. When one of the running servers fails to start, the other backup server will activate the standby machine through the diagnosis of dual-computer software (usually through heartbeat diagnosis) to ensure that the application can be fully restored to normal use in a short time.

Therefore, Oracle Cluster Server implemented by software such as VCS (VERITAS Cluster Manager), as well as Oracle Standby, Oracle RAC (Real Application Cluster), Advanced Replication, Streams and other technologies can be regarded as dual hot backup.

II. Physical Standby, Logical Standby (physical Standby and logical Standby)

Physical standby accepts archived log directly from the main library, and then directly does physical recovery based on block (update or adjust the changed block), so physical standby is exactly the same as the main library at the physical file level. Physical standby recovery is only the underlying block apply, OS level work, database SCHEMA, including indexes are the same. It uses REDO or archiving directly to achieve synchronization. Temp, undo and so on will not be involved. Possible modes of physical STANDBY: read-only mode (OPEN READONLY) and recovery mode (MANANGED RECOVERY).

In logical STANDBY, the logical information is the same, but the physical organization and data structure can be different. The way to keep synchronized with the main library is to convert the received REDO into SQL statements, and then execute the SQL statements (SQL Apply) on the STANDBY. Logical STANDBY has other uses in addition to disaster recovery, such as for users to query and report.

Prior to 9i R2, data guard's server could only run in read only or recover mode. A physical standby database is physically equivalent to the main library and cannot be opened for other purposes while physical standby database is being restored. Logical standby database is only equivalent to the schema that needs to be restored on logical, so when restoring, you can open and do report (query action) at the same time, or data objects that are different from the main database, and so on, which greatly improves the utilization of the standby database.

III. Dataguard

It's all Standby. Standby that was called Standby,9i before or after Oracle 9i was renamed Data guard. However, there are also a lot of functional improvements and differences.

IV. LGWR / ARCH transmission under Standby

View database protection mode:

SQL > select DATABASE_ROLE,PROTECTION_MODE,PROTECTION_LEVEL from v$database

1. Maximum performance (maximize performance): this is the default protection mode for data guard. Transactions on primay do not need to receive feedback from the standby before commit (the commit operation of the primary database does not wait for STANDBY), this mode may lose data in the event of a primary failure, but standby has the least impact on primary performance. You can use either LGWR ASYNC or ARCH transfer modes.

ARCH transfer mode: when the online redo log on Primary DB is full or other conditions cause redo log to write an archive, the archived log file generated by redo log is written to the local archive directory as well as the Standby archive directory. It's just that the online redo log switch on Primary db doesn't have to wait for the write archive action on Standby to finish.

two。 Maximum available (maximize availability): under normal circumstances, the maximum available mode is the same as the maximum protection mode; when the standby is not available, the maximum available mode is automatically reduced to the maximum performance mode, so a standby failure does not cause the primay to become unavailable. After the problem is corrected, Standby resynchronizes with the main database, and even if at least one standby is available, even the primary down machine can guarantee no data loss. However, when the problem is fixed and FAILOVER is necessary before resynchronizing, then some data may be lost. The maximum availability mode Standby must be configured with Standby Redo log, and Oracle recommends that the maximum available mode be transmitted in LGWR ASYNC (Asynchronous) mode.

Using the maximum available data guard mode, the master database transfers online log (online redo log) information to the standby database, and the online log information is written to the standby redo log of the standby database. After these standby redo log are archived, the standby library applies archived logs.

LGWR is also divided into two types: LGWR ASYNC (asynchronous) and LGWR SYNC (synchronous).

Maximum protection

Maximum available

Maximum performance

Process

LGWR

LGWR

LGWR or ARCH

Network transmission mode

SYNC

SYNC

Set ASYNC when LGWR

Disk write operation

AFFIRM

AFFIRM

NOAFFIRM

Alternate log

YES

Physical backup requirement

Required for LGWR and physical backup

Alternate library type

Physical Standby

Physics or logic

Physics or logic

Maximum protection (maximize protection): the highest protection mode. Transactions on primay must confirm that redo has been passed to at least one standby before commit, and if all standby is not available, primary will hang. This mode can guarantee zero data loss. For maximum protection and maximum availability mode, Standby databases must be configured with standby redo log, and oracle recommends that all databases be transferred in LGWR ASYNC mode.

LGWR ASYNC:-

Asynchronously archiving with the LGWR process in

Conjunction with SSH port forwarding showed the following characteristics when

Compared to the baseline:-Significant reduction in network traffic-

Slight increase in primary database throughput-Minimal increase in cpu usage

When using LGWR to remotely archive in ASYNC mode, the LGWR process does not

Wait for each network I/O to complete before proceeding. This behavior. Is made

Possible by the use of an intermediate process, known as a LGWR network server

Process (LNS), that performs the actual network that performs the actual network O and waits for each network

I/O to complete. Each LNS has a user configurable buffer that is used to

Accept outbound redo data from the LGWR. This is configured by specifying the

Size in 512 byte blocks on the ASYNC attribute in the archivelog destination

Parameter. For example ASYNC=2048 indicates a 1Mb buffer. As long as the

LNS process is able to empty this buffer faster than the LGWR can fill it, the

LGWR will never stall. If the LNS cannot keep up, then the buffer will become

Full and the LGWR will stall until either sufficient buffer space is freed up

By a successful network transmission or a timeout occurs. Reducing network

Traffic in a network with high round trip times (RTT) reduces network server

Timeouts due to buffer full conditions, thus reducing the impact to the

Primary database throughput. ASYNC can improve the primary database throughput

Due to the fact that by compressing the redo traffic, the transfer (in 1 MB

Chunks) is quicker and thus the ASYNC buffer doesn't reach full capacity as

Often, thereby avoiding the wait that can occur when the buffer is full.

What are the concepts in the database Standby? have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report