Đang chuẩn bị liên kết để tải về tài liệu:
Oracle Built−in Packages- P49
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Oracle Built−in Packages- P49: Ah, for the good old days of Version 1.0 of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms 3.0, and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk In this case the DBA may use the DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY procedure to clean up any entries whose state is not prepared. The following table indicates what the various states indicate about the transaction and what the DBA actions should be. State Column State of Global Transaction State of Local Transaction Normal DBA Action Alternative DBA Action Collecting Rolled back Rolled back None PURGE_LOST_DB_ENTRY 1 Committed Committed Committed None PURGE_LOST_DB_ENTRY Prepared Unknown Unknown None COMMIT_FORCE or ROLLBACK_FORCE Forced commit Unknown Committed None PURGE_LOST_DB_ENTRY Forced rollback Unknown Rolled back None PURGE_LOST_DB_ENTRY Forced commit mixed Mixed Committed 2 Forced rollback mixed Mixed Rolled back 1 Use only if significant reconfiguration has occurred so that automatic recovery cannot resolve the transaction. Examples are total loss of the remote database reconfiguration in software resulting in loss of two-phase commit capability or loss of information from an external transaction coordinator such as a TP monitor. 2 Examine manual action to remove inconsistencies then use the PROCEDURE_PURGE_MIXED. The xid argument must be set to the value of the LOCAL_TRAN_ID column in the DBA_2PC_PENDING table. For more information on this topic see Manually Overriding In-Doubt Transactions in the Oracle Corporation document Oracle8 Server Distributed Systems and the dbmsutil file under comments for PURGE_LOST_DB_ENTRY. 4.2.7 Returning Transaction Identifiers The functions described in this section return indentifiers used by DBMS_TRANSACTION. 4.2.7.1 The DBMS_TRANSACTION.LOCAL_TRANSACTION_ID function The LOCAL_TRANSACTION_ID function returns the unique identifier for the current transaction. The specification for the function follows FUNCTION DBMS_TRANSACTION.LOCAL_TRANSACTION_ID create_transaction IN BOOLEAN FALSE RETURN VARCHAR2 The create_transaction parameter specifies whether to create a new transaction