142.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 read-only.
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 read-only mode.
答案:D
解析:参考58题
我们测试一下
SQL> conn scott/tiger
Connected.
SQL> select * from dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> select TABLE_NAME,TABLESPACE_NAME from user_tables where TABLE_NAME='DEPT';
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
DEPT USERS
SQL> insert into dept values(11,'ACCOUNTING','ACCOUNTING');
1 row created.
--另外开一个crt窗口
SQL> ALTER TABLESPACE users READ ONLY;
.......这里一直等待...............
参考:https://docs.oracle.com/cd/B28359_01/server.111/b28310/tspaces006.htm
所以选择D
但是这里有一个疑问,那就是参考58题,为啥设置了DDL_LOCK_TIMEOUT后不起作用,按理说
alter tablespace user read only 应该也是ddl
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 read-only.
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 read-only mode.
答案:D
解析:参考58题
我们测试一下
SQL> conn scott/tiger
Connected.
SQL> select * from dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> select TABLE_NAME,TABLESPACE_NAME from user_tables where TABLE_NAME='DEPT';
TABLE_NAME TABLESPACE_NAME
------------------------------ ------------------------------
DEPT USERS
SQL> insert into dept values(11,'ACCOUNTING','ACCOUNTING');
1 row created.
--另外开一个crt窗口
SQL> ALTER TABLESPACE users READ ONLY;
.......这里一直等待...............
参考:https://docs.oracle.com/cd/B28359_01/server.111/b28310/tspaces006.htm
所以选择D
但是这里有一个疑问,那就是参考58题,为啥设置了DDL_LOCK_TIMEOUT后不起作用,按理说
alter tablespace user read only 应该也是ddl