User SCOTT executes the following command on the EMP table but has not issued COMMIT,
ROLLBACK, or any data definition language (DDL) command:
SQL> SELECT job FROM emp
2 WHERE job='CLERK' FOR UPDATE OF empno;
SCOTT has opened another session to work with the database. Which three operations would wait when
issued in SCOTT's second session? (Choose three.)
A. LOCK TABLE emp IN SHARE MODE;
B. LOCK TABLE emp IN EXCLUSIVE MODE;
C. DELETE FROM emp WHERE job='MANAGER';
D. INSERT INTO emp(empno,ename) VALUES (1289,'Dick');
E. SELECT job FROM emp WHERE job='CLERK' FOR UPDATE OF empno;
Answer: ABE
User Scott has updated the salary of one of the employees in the EMPLOYEES table and has not
committed the transaction. What are the two types of locks that this scenario would lead to? (Choose
two.)
A. null lock on the row being updated
B. null lock on the table containing the row
C. ROW SHARE lock for the row being updated
D. ROW EXCLUSIVE lock for the row being updated
E. shared rowexclusive lock for the row being updated
F. a shareable table lock for the table containing the row
G. exclusive tablelevel lock for the table containing the row
Answer: DF
The session of user SCOTT receives the following error after executing an UPDATE command on the EMP table: ERROR at line 1: ORA00060: deadlock detected while waiting for resource On investigation, you find that a session opened by user JIM has a transaction that caused the deadlock. Which two statements are true regarding the session of SCOTT in this scenario? (Choose two.) A. It is terminated after receiving the error and JIM can continue with his transaction. B. The transaction in it is terminated after receiving the error and JIM can continue with his transaction. C. SCOTT should perform a COMMIT or ROLLBACK to allow JIM to continue with his transaction. D. SCOTT has to reexecute the last command in the transaction after he commits the transaction. Answer: CD User A executes the following command to update the TRANS table: SQL> UPDATE B. trans SET tr_amt=tr_amt+500 WHERE c_code='C005'; Before user A issues a COMMIT or ROLLBACK command, user B executes the following command on the TRANS table: SQl> ALTER TABLE trans MODIFY (tr_type VARCHAR2(3)); What would happen in this scenario? A. The transaction for user A is rolled back. B. The ALTER TABLE command modifies the column successfully. C. The ALTER TABLE command fails due to the resource being busy. D. The ALTER TABLE command waits until user A ends the transaction. Answer: C