LOCK TABLE emp IN SHARE MODE;
LOCK TABLE emp IN EXCLUSIVE MODE;
UPDATE emp SET sal=sal*1.2 WHERE job=MANAGER;
INSERT INTO emp(empno,ename) VALUES (1289,’Harry’);
SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;
第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?()
第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()
第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.
第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?()
第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?()
第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()
第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?()
第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;
第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?()
第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? ()