Oracle中的Autonomous Transaction 1. 解释什么是Oracle中的Autonomous Transaction Oracle中的Autonomous Transaction(自治事务)是一种特殊的事务类型,它允许在PL/SQL程序内部创建一个与主事务(Main Transaction)完全隔离的子事务。这个子事务可以独立地提交(COMMIT)或回滚(ROLLBACK),而不会影响到主事务的执行和状态。 2....
ID PRAGMA_VALUE--- ---1autonomous 3.5.注释过程中自治事物 createorreplaceprocedurepro_pragma_programis--pragma autonomous_transaction; --自治事物begininsertintot_pragma_empvalues(1,'autonomous');commit;endpro_pragma_program;truncatetablet_pragma_emp;begininsertintot_pragma_empvalues(2,'plsqlblock')...
3.package不能被声明为AT,只有package所拥有的function和procedure才能声明 AT 4.AT程序必须以commit或rollback结尾,否则会产生Oracle错误ORA-06519:active autonomous_transaction detected and rolled back 在程序开发中,如果充分运用autonomous transaction的特性,一定能取得事半功倍的效果。
Oracle Autonomous Transaction Processing 附带 Oracle Flashback,可立即回退针对应用架构的意外更改,轻松防范人为错误。该技术支持在所有级别执行恢复操作,包括行、事务、表乃至整个数据库。 Oracle Autonomous Database 的可用性度量 * 使用 Autonomous Data Guard 时,服务级别协议 (SLA) 可达到 99.995% 的可用性。未启...
create or replace procedure sfis1.autonomous_insert_goal as pragma autonomous_transaction; begin insert into t values('AUTONOMOUS INSERT','1','1'); commit; end; 當執行如下(插入兩行): begin insert into t values ('AUTONOMOUS INSERT','1','1'); ...
Oracle Autonomous Transaction Processing est un service de base de données entièrement automatisé, optimisé pour exécuter simultanément des workloads transactionnels, analytiques et par lots. Pour améliorer les performances, il est préconfiguré pour le format de ligne, les index et la mise en...
被我们当前事务插入的2行数据被回滚了,而被自治事务插入的数据继续存在。编译描述符 PRAGMA AUTONOMOUS_TRANSACTION 使得自治块在自己的事务里运行,所以内部的提交语句不会影响调用方的事务。 Autonomous transactions are commonly used by error logging routines, where the error messages must be preserved, regardless...
create or replace procedure sfis1.autonomous_insert_goal as pragma autonomous_transaction; begin insert into t values(AUTONOMOUS INSERT,1,1); commit; end; 當執行如下(插入兩行): begin insert into t values (AUTONOMOUS INSERT,1,1); NONAUTONOMOUS_INSERT_GOAL; ...
您可以创建与 Oracle Autonomous Transaction Processing 的连接,并使用该连接访问数据。 在创建与 Oracle Autonomous Transaction Processing 的连接之前,您必须获取包含可信证书的客户端身份证明 zip 文件。这些证书使 Oracle Analytics 能够连接到 Oracle Autonomous Transaction Processing。 请参见Using Oracle Autonomous Dat...
PRAGMA AUTONOMOUS_TRANSACTION中文翻译过来叫“自治事务”(翻译的还算好理解),对于定义成自治事务的Procedure,实际上相当于一段独立运行的程序段,这段程序不依赖于主程序,也不干涉主程序 自治事务的特点 第一,这段程序不依赖于原有Main程序,比如Main程序中有未提交的数据,那么在自治事务中是查找不到的。