多选题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 ename FROM emp  2 WHERE job=’CLERK’ FOR UPDATE OF empno;  SCOTT has opened another session to work

题目
多选题
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 ename FROM emp  2 WHERE job=’CLERK’ FOR UPDATE OF empno;  SCOTT has opened another session to work with the database instance.  Which three operations wouldwait when issued in SCOTT’s second session()
A

LOCK TABLE emp IN SHARE MODE;

B

LOCK TABLE emp IN EXCLUSIVE MODE;

C

UPDATE emp SET sal=sal*1.2 WHERE job=MANAGER;

D

INSERT INTO emp(empno,ename) VALUES (1289,’Harry’);

E

SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;

参考答案和解析
正确答案: A,B,E
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Your database is running in ARCHIVELOG mode. The SCOTT.EMP table belongs to the DATA1 tablespace. The junior DBA erroneously runs a script that executes the following statement:   SQL> DROP TABLE SCOTT.EMP PURGE;   After one hour, you are performing the user managed incomplete recovery. Which datafiles will you restore from the last full backup?()

  • A、 the datafiles associated with the SYSTEM tablespace
  • B、 the datafiles associated to the DATA1 tablespace
  • C、 the datafiles associated to the SYSTEM and DATA1 tablespaces
  • D、 all the datafiles in the database

正确答案:D

第2题:

The session of user SCOTT receives the following error after executing an UPDATE command onthe EMP table:  ERROR at line 1:  ORA-00060: deadlock detected while waiting for resource  On investigation, you find that a session opened by user JIM has a transaction that caused the deadlock.  two statements are true regarding the session of SCOTT in this scenario()

  • A、The session is terminated after receiving the error and JIM can continue with his transaction.
  • B、SCOTT should perform a COMMIT or ROLLBACK to allow JIM to continue with his transaction.
  • C、The session is rolled back after receiving the error and JIM can continue with his transaction.
  • D、SCOTT has to reexecute the last command in the transaction after he commits the transaction.

正确答案:B,D

第3题:

View the Exhibit for some of the current parameter settings. A user logs in to the HR schema and issues the following commands:SQL> CREATE TABLE emp(empno NUMBER(3),ename VARCHAR2(20),sal NUMBER(8,2));SQL> INSERT INTO emp(empno,ename) VALUES(1,‘JAMES‘);At this moment, a second user also logs in to the HR schema and issues the following command:SQL> ALTER TABLE emp MODIFY sal NUMBER(10,2);What happens in the above scenario?()

A. The second user‘s session immediately produces the resource busy error.

B. The second user‘s command executes successfully.

C. The second user‘s session waits for a time period before producing the resource busy error.

D. A deadlock is created.


参考答案:C

第4题:

You issued the following command to analyze the SCOTT.EMP table for block corruption:   ANALYZE TABLE SCOTT.EMP VALIDATE STRUCTURE;  You received the following error:   ORA-01578: ORACLE data block corrupted  (file # %s, block # %s)   How will you resolve the block corruption problem?()

  • A、 by using the DBMS_REPAIR package
  • B、 by using the DB_BLOCK_CHECKING parameter
  • C、 by using the DBVERIFY utility
  • D、 will not be completely resolved until the hardware fault is corrected

正确答案:D

第5题:

You execute the following piece of code with appropriate privileges: User SCOTT has been granted theCREATE SESSION privilege and the MGR role.Which two statements are true when a session logged in as SCOTT queries the SAL column in the viewand the table?()

  • A、Data is redacted for the EMP.SAL column only if the SCOTT session does not have the MGR role set.
  • B、Data is redacted for EMP.SAL column only if the SCOTT session has the MGR role set.
  • C、Data is never redacted for the EMP_V.SAL column.
  • D、Data is redacted for the EMP_V.SAL column only if the SCOTT session has the MGR role set.
  • E、Data is redacted for the EMP_V.SAL column only if the SCOTT session does not have the MGR role set.

正确答案:A,C

第6题:

You execute the following command to audit database activities: SQL> AUDIT DROP ANY TABLE BY scott BY SESSION WHENEVER SUCCESSFUL; What is the effect of this command()

  • A、One audit record is created for every successful DROP TABLE command executed in the session of SCOTT.
  • B、One audit record is generated for the session when SCOTT grants the DROP ANY TABLE privilege to otherusers.
  • C、One audit record is created for the whole session if user SCOTT successfully drops one or more tables inhis session.
  • D、One audit record is created for every session of any other user in which a table owned by SCOTT isdropped successfully.
  • E、One audit record is created for every successful DROP TABLE command executed by any user to drop Tables owned by SCOTT

正确答案:C

第7题:

The HR user creates a view with this command:  SQL> CREATE VIEW emp_v AS SELECT * FROM scott.emp;  Now HR wants to grant the SELECT privilege on the EMP_V view to the JIM user.  Which statement is true in this scenario?()

  • A、HR can grant the privilege to JIM but without GRANT OPTION.
  • B、HR can grant the privilege to JIM because HR is the owner of the view.
  • C、SCOTT has to grant the SELECT privilege on the EMP table to JIM before this operation.
  • D、HR needs the SELECT privilege on the EMP table with GRANT OPTION from SCOTT for this operation.

正确答案:D

第8题:

The EMP table has these columns:ENAME VARCHAR2(35)SALARY NUMBER(8,2)HIRE_DATE DATEManagement wants a list of names of employees who have been with the company for more than five years. Which SQL statement displays the required results? ()

A. SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE >5;

B. SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE >5;

C. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 >5;

D. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 >5;


参考答案:C

第9题:

You execute the following command to audit the database activities:   SQL> AUDIT DROP ANY TABLE BY scott BY SESSION WHENEVER SUCCESSFUL;  What is the effect of this command?()

  • A、One audit record is created for the whole session if user SCOTT successfully drops one or more tables in his session.
  • B、One audit record is created for every session when any user successfully drops a table owned by SCOTT.
  • C、One audit record is created for each successful DROP TABLE command executed by any user to drop tables owned by SCOTT.
  • D、One audit record is generated for the session when SCOTT grants the DROP ANY TABLE privilege to other users in his session.
  • E、One audit record is created for each successful DROP TABLE command executed in the session of SCOTT.

正确答案:A

第10题:

The EMP table has these columns: ENAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants a list of names of employees who have been with the company for more than five years. Which SQL statement displays the required results? ()

  • A、SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE >5;
  • B、SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE >5;
  • C、SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 >5;
  • D、SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 >5;

正确答案:C

更多相关问题