Answers

Question and Answer:

  Home  Oracle Database

⟩ How To Set a Transaction To Be READ ONLY in Oracle?

If you want a transaction to be set as READ ONLY, you need to the transaction with the SET TRANSACTION READ ONLY statement. Note that a DML statement will start the transaction automatically. So you have to issue the SET TRANSACTION statement before any DML statements. The tutorial exercise below shows you a good example of READ ONLY transaction:

SQL> connect HR/globalguideline

SQL> SET TRANSACTION READ ONLY;

Transaction set.

SQL> SELECT * FROM ggl_links;

  ID URL   NOTES  COUNTS CREATED

------- ---------------- ---------- ---------- ---------

101 globalguideline.COM 07-MAY-06

110 globalguideline.COM 07-MAY-06

112 oracle.com 07-MAY-06

113 sql.com 07-MAY-06

 167 views

More Questions for you: