《【CUUG内部资料】OCP最新考试题库-1Z0-062(5)》由会员分享,可在线阅读,更多相关《【CUUG内部资料】OCP最新考试题库-1Z0-062(5)(10页珍藏版)》请在金锄头文库上搜索。
1、【CUUG内部资料】OCP讨论群:1015267481【CUUG内部资料】OCP 最新考试题库-1Z0-062(1)序:OCP 认证是 Oracle 的一个中级认证,对于升职加薪跳槽都有很大的帮助,但是想考 OCP 证书其实有一定的难度,比如考试题的内容全部都是英文题、考题的内容会有稍微修改、考题的答案顺序并不固定、不定时的出现新考题等。这些都增加了考试的难度,所以我们收集了一些考试题并进行了讲解,这部分内容是关于 12c-062的考试解析,希望对广大考生有帮助。QUESTION 61You create a new pluggable database, HR_PDB, from t he
2、seed database. Which threetablespaces are created by default in HR_PDB?A. SYSTEMB. SYSAUXC. EXAMPLED. UNDOE. TEMPF. USERSCorrect Answer: ABESection: (none)ExplanationExplanation/Reference:* A PDB would have its SYSTEM,SYSAUX, TEMP tablespaces.It canalso contains other user createdtablespaces in it.
3、* Oracle Database creates both t he SYSTEM and SYSAUX tablespaces as part of everydatabase.* tablespace_datafile_clausesUse these clauses to specify attributes for all data files comprising the SYSTEM and SYSAUXtablespaces in the seed PDB.Incorrect:Not D: a PDB can not have an undo tablespace. Inste
4、ad, it uses the undo tablespace belongingto the CDB.QUESTION 62Which two statements are true about variable extent size support for large ASM files?A. The metadata used to track extents in SGA is reduced.B. Rebalance operations are completed faster than with a fixed extent sizeC. An ASM Instance aut
5、omatically allocates an appropriate extent size.D. Resync operations are completed faster when a disk comes online after being taken offline.E. Performance improves in a stretch cluster configuration by reading from a local copy of anextent.Correct Answer: ACSection: (none)ExplanationExplanation/Ref
6、erence:A: Variable size extents enable support for larger ASM datafiles, reduce SGA memoryrequirements for very large databases (A), and improve performance for filecreate and open operations.C: You dont have to worry about the sizes; the ASM instance automatically allocates theappropriate extent si
7、ze.QUESTION 63You executed a DROP USER CASCADE on an Oracle 11g release 1 database and immediatelyrealized that you forgot to copy the OCA.EXAM_RESULTS table to the OCP schema.The RECYCLE_BIN enabled before the DROP USER was executed and the OCP user hasbeen granted the FLASHBACK ANY TABLE system pr
8、ivilege.What is the quickest way to recover the contents of the OCA.EXAM_RESULTS table to the OCPschema?A. Execute FLASHBACK TABLE OCA.EXAM_RESULTS TO BEFORE DROP RENAME TOOCP.EXAM_RESULTS; connected as SYSTEM.B. Recover the table using traditional Tablespace Point In Time Recovery.C. Recover the ta
9、ble using Automated Tablespace Point In Time Recovery.D. Recovery the table using Database Point In Time Recovery.E. Execute FLASHBACK TABLE OCA.EXAM_RESULTS TO BEFORE DROP RENAME TOEXAM_RESULTS; connected as the OCP user.Correct Answer: CSection: (none)Explanation(验证过)(解析:因为是删除了用户,而且数据库版本是 11g,没有表恢
10、复功能,但是从恢复工作量来考虑,选择表空间的时间点恢复是最好的方式。)QUESTION 64In your multitenant container database (CDB) containing pluggable database (PDBs), t he HRuser executes the following commands to create and grant privileges ona procedure:CREATE OR REPLACE PROCEDURE create_test_v(v_emp_id NUMBER, v_ename VARCHAR2, v_SAL
11、ARYNUMBER, v_dept_id NUMBER) IS BEGINI/NSERT INTO hr.test VALUES (V_emp_id, V_ename, V_salary, V_dept_id); END;GRANT EXECUTE ON CREATE_TEST TO john, jim, smith, king;How can you prevent users having the EXECUTE privilege on t he CREATE_TEST procedurefrom inserting values into tables on which they do
12、 not have any privileges?A. Create the CREATE_TEST procedure with definers rights.B. Grant the EXECUTE privilege to users with GRANT OPTION on t he CREATE_TESTprocedure.C. Create the CREATE_TEST procedure with invokers rights.D. Create the CREATE_TEST procedure as part of a package and grant users t
13、he EXECUTEprivilege the package.Correct Answer: CSection: (none) Explanation: 题目的意思是创建了一个存储过程,需要有其它用户能够执行这个存储过程,可是他们没有权限对存储过程中访问到的表没有访问权限,但是这些用户又要能够执行这个存储过程,所以如果是 definers rights 的话,执行就会出错,因为该模式下只能对HR.DEPARTMENTS 的表进行操作;可能的情况下是这些用户自己有跟 HR 用户相同的表名字也叫 DEPARTMENTS,所以当执行这个存储过程的时候,修改的是自己的表,可以实现一个存储过程被多个用
14、户共享,但是修改的却是各自用户下的自己的表,这时候需要invokers rights来实现这种调用者的权限子程序不绑定到特定的模式。以下版本的过程 create_dept 以调用用户的权限执行,并将行插入到该用户的 departments 表中:1、 以 scott 用户创建表和存储过程:create table departments (v_deptno number,v_dname varchar2(40),v_mgr number, CREATE OR REPLACE PROCEDURE create_dept (v_deptno NUMBER,v_dname VARCHAR2,v_mg
15、r NUMBER,v_loc NUMBER)AUTHID CURRENT_USER ASBEGININSERT INTO departments VALUES (v_deptno, v_dname, v_mgr, v_loc);END;2、 调用该存储过程:CALL create_dept(44, Information Technology, 200, 1700);3、 把可执行权限授权给 sh 用户:SQL grant execute on CREATE_DEPT to sh;4、 以 sh 用户执行该存储过程:SQL call scott.create_dept(44, Information Technology, 200, 1700);call scott.create_dept(44, Information Technology, 200, 1700)*ERROR at line 1:ORA-00942: table or view does not existORA-06512: at SCOTT.CREATE_DEPT, line 85、 在 sh 用户下创建 departments 表,语法如上。6、 再执行该存储过程成功: