Oracle returning segment management

zhaozj2021-02-16  95

Rolling segment management has always been a problem for Oracle database management, and this article introduces the concept, usage and planning and problem solving of Oracle returns. Roll Rolling Segments Overview Rollback Segments The values ​​used to store data modifications (including the positions and values ​​before data modification). The head of the roll band contains information that is being used. A transaction can only use a rollover segment to store its rollback information, and a rollback segment can store the rollback information of multiple transactions. The role of the rollback segment rolls back: When the transaction modifies the data in the table, the value before the data is modified (ie, the front image) will be placed in the rollback segment, and when the user rolls back the transaction (ROLLBACK), Oracle will Restore the modified data to the original value by using the data before the rollover segment. Transaction Recovery: When the transaction is being processed, the routine fails, the information of the rollback segment is saved in the redo log file, and Oracle will use the rollback to recover uncommitted data when the next time the database is turned on next time. Read consistency: When a session is modifying data, other sessions will not see the modifications of the session. Moreover, when a statement is being executed, the statement will not see uncommitted modifications (statement level readability) from the statement start execution. When Oracle executes the SELECT statement, Oracle ensures that any changes that are not submitted before the previous SCN are not processed by the statement in accordance with the current system change number (SYSTEM CHANGE-SCN). It can be imagined: When a long query is being executed, if other sessions change the query to query a data block to query, Oracle will use the data front image of the rollback segment to construct a read consistency view. Transaction-level read-consistency Oracle typically provides readability of SQL Statement Level, and you can use the following statements to achieve transaction-level read-consistency. SET Transaction Read Only; or: set tannsaction serializable; The above two statements will provide read consistency after the transaction begins. It should be noted that the use of the second statement on the concurrency and performance of the database will affect. Rollback segments: After the database is created, a system rollback segment will be automatically created, which is only used to store the front image of the object in the system table space. Non-system rollback segments: The database with multiple tablespace should have at least one non-system returning segment that stores the data before the object in the system tablespace. Non-system returns are divided into private returns and public returns, and private returns should be listed in the ROLLBACK Segments parameter of the parameter file so that it is automatically enabled when the routine starts. The public returns typically appears in the OPS (Oracle Parallel Server), which will automatically online when the routine is started. DEFERED rollback segment: This split segment is automatically created by the system when the table space is offline (OFFLINE). When the table space is online (online), the system is automatically deleted, and the rollove information generated when the table space is deployed. The use assignment of the rollback segment: When the transaction begins, Oracle will assign a rollback segment for the transaction and assign a returning segment with the minimum transaction to the transaction. The transaction can be applied for a specified rollback segment in the following statement: Set TransTraction Use Rollback Segment Rollback_SEGMENT transaction will use the rollback segment in order, looping, and move to the next area after the current area is over.

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

New Post(0)