User pagh
SQL> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; Transaction set. SQL> CREATE TABLE Primes (p INT); Table created. SQL> GRANT SELECT, UPDATE, INSERT ON Primes to pagh2; Grant succeeded. SQL> SELECT * FROM Primes; no rows selected SQL> INSERT INTO Primes VALUES (41); 1 row created. SQL> SELECT * FROM Primes; P ---------- 41 SQL> COMMIT; Commit complete. SQL> SELECT * FROM pagh.Primes; P ---------- 41 43 SQL> SET TRANSACTION ISOLATION LEVEL READ COMMITTED; Transaction set. SQL> INSERT INTO Primes VALUES (2); 1 row created. SQL> COMMIT; Commit complete. SQL> SELECT * FROM Primes; P ---------- 41 43 2 SQL> SELECT * FROM Primes; P ---------- 41 43 2 2003 SQL> INSERT INTO Primes VALUES (3); 1 row created. SQL> ROLLBACK; Rollback complete. SQL> SELECT * FROM Primes; P ---------- 41 43 2 2003 |
User pagh2
SQL> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; Transaction set. SQL> SELECT * FROM pagh.Primes; no rows selected SQL> INSERT INTO pagh.Primes VALUES (43); 1 row created. SQL> SELECT * FROM pagh.Primes; P ---------- 43 SQL> SELECT * FROM pagh.Primes; P ---------- 43 SQL> COMMIT; Commit complete. SQL> SELECT * FROM pagh.Primes; P ---------- 41 43 SQL> SET TRANSACTION ISOLATION LEVEL READ COMMITTED; Transaction set. SQL> SELECT * FROM pagh.Primes; P ---------- 41 43 SQL> INSERT INTO pagh.Primes VALUES (2003); 1 row created. SQL> SELECT * FROM pagh.Primes; P ---------- 41 43 2003 SQL> SELECT * FROM pagh.Primes; P ---------- 41 43 2 2003 SQL> COMMIT; Commit complete. |
User pagh
SQL> CREATE TABLE doedlaas ( pk INT PRIMARY KEY ); Table created. SQL> INSERT INTO doedlaas VALUES (1); 1 row created. commit; SQL> INSERT INTO doedlaas VALUES (2); 1 row created. SQL> INSERT INTO doedlaas VALUES (3); INSERT INTO doedlaas VALUES (3) * ERROR at line 1: ORA-00060: deadlock detected while waiting for resource SQL> rollback; Rollback complete. |
User pagh, transaction 2
INSERT INTO doedlaas VALUES (1); INSERT INTO doedlaas VALUES (1) * ERROR at line 1: ORA-00001: unique constraint (PAGH.SYS_C0030509) violated SQL> INSERT INTO doedlaas VALUES (3); 1 row created. SQL> INSERT INTO doedlaas VALUES (2); 1 row created. |