Which statement is true regarding the effect of this command on the transaction in Scott’s session?

The user SCOTT owns the CUST table that is placed in the SALES tablespace. The user SCOTT opens a session and executes commands as follows:
SQL> INSERT INTO cust VALUES(101, ‘JACK’); 1 row created.
SQL> INSERT INTO cust VALUES(102, ‘SMITH’); 1 row created.
As a DBA, you execute the following command from another session:
ALTER TABLESPACE sales READ ONLY;
Which statement is true regarding the effect of this command on the transaction in Scott’s session?
A. The command fails as a transaction is still pending.
B. The transaction in Scott’s session is rolled back and the tablespace becomes readonly.
C. The command waits and the user SCOTT can execute data manipulation language (DML) statements only as part of the current transaction.
D. The command hangs until all transactions on the objects in the tablespace commit or rollback, and then the tablespace is placed in readonly mode.

Download Printable PDF. VALID exam to help you PASS.

One thought on “Which statement is true regarding the effect of this command on the transaction in Scott’s session?

  1. The right answer is D

    The following statement makes the flights tablespace read-only:

    ALTER TABLESPACE flights READ ONLY;

    You can issue the ALTER TABLESPACE…READ ONLY statement while the database is processing transactions. After the statement is issued, the tablespace is put into a transitional read-only state. No transactions are allowed to make further changes (using DML statements) to the tablespace. If a transaction attempts further changes, it is terminated and rolled back. However, transactions that already made changes and that attempt no further changes are allowed to commit or roll back.

    When there are transactions waiting to commit, the ALTER TABLESPACE…READ ONLY statement does not return immediately. It waits for all transactions started before you issued the ALTER TABLESPACE statement to either commit or rollback.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.