User SCOTT executes the following command on the EMP table b

题目
多选题
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?()
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;

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

第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题:

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

第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题:

User A executes the following command to drop a large table in your database:SQL> DROP TABLE trans; While the drop table operation is in progress, user B executes the following command on the same table:SQL> DELETE FROM trans WHERE tr_type=’SL’; Which statement is true regarding the DELETE command()

  • A、It fails to delete the records because the records are locked in SHARE mode.
  • B、It deletes the rows successfully because the table is locked in SHARE mode
  • C、It fails to delete the records because the table is locked in EXCLUSIVE mode.
  • D、It deletes the rows successfully because the table is locked in SHARE ROW EXCLUSIVE mode.

正确答案:C

第5题:

User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, orany data definition language (DDL) command: SQL> SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database instance.  Which three operations would waitwhen 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=ANAGER?UPDATE emp SET sal=sal*1.2 WHERE job=?ANAGER?
  • D、INSERT INTO emp(empno,ename) VALUES (1289,’Harry’);
  • E、SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno

正确答案:A,B,E

第6题:

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

第7题:

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

第8题:

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

第9题:

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.

正确答案:C

第10题:

The user HR owns the EMP table. The user HR grants privileges to the user SCOTT by using this command:  SQL> GRANT SELECT,INSERT,UPDATE ON emp TO scott WITH GRANT OPTION; The user SCOTT executes this command to grant privileges to the user JIM: SQL> GRANT SELECT,INSERT,UPDATE ON hr.emp TO jim;  Now, the user HR decides to revoke privileges from JIM using this command: SQL> REVOKE SELECT,INSERT,UPDATE ON emp FROM jim; Which statement is true after HR issues the REVOKE command()

  • A、The command fails because SCOTT still has privileges.
  • B、The command succeeds and privileges are revoked from JIM.
  • C、The command fails because HR cannot revoke the privileges from JIM.
  • D、The command succeeds and only HR has the privilege to perform the SELECT, INSERT, and UPDATEoperations on the EMP table.

正确答案:C

更多相关问题