Oracle Built−in Packages- P48

Oracle Built−in Packages- P48: Ah, for the good old days of Version 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 , and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk where xid identifies the transaction s local or global transaction ID. To find these transaction IDs query the data dictionary view DBA_2PC_PENDING. Any decisions to force in-doubt transactions should be made after consulting with the database administrator s at the remote database location s . If the decision is made to locally force any transactions the database administrator should either commit or roll back such transactions as was done by nodes that successfully resolved the transactions . Otherwise the administrator should query the DBA_2PC_PENDING view s ADVICE and TRAN_COMMENT columns for further insight. For more information on this topic see Manually Overriding In-Doubt Transactions in the Oracle Corporation document Oracle8 Server Distributed Systems. The procedure The SAVEPOINT procedure is equivalent to the SAVEPOINT command which is already implemented as part of PL SQL. The header for this procedure is PROCEDURE savept IN VARCHAR2 where savept specifies the savepoint. Why would you use this procedure and not simply rely on the SAVEPOINT command When you use SAVEPOINT you must use an undeclared identifier for the savepoint BEGIN SAVEPOINT right_here do_my_stuff EXCEPTION WHEN OTHERS THEN ROLLBACK TO right_here END The right_here identifier is not declared anywhere it is simply hard-coded into your application. With the DBMS_TRANSACTION programs you can soft code these savepoint names as you can see from the following block DECLARE v_sp VARCHAR2 30 right_here BEGIN v_sp do_my_stuff EXCEPTION WHEN OTHERS THEN Soft-coded rollback to as well v_sp END The procedure The ROLLBACK_SAVEPOINT procedure is equivalent to the ROLLBACK TO command in PL SQL. The header for this procedure is PROCEDURE savept IN VARCHAR2 where

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.