前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【OCP最新题库解析(052)--题49】Examine these facts about a database.

【OCP最新题库解析(052)--题49】Examine these facts about a database.

作者头像
小麦苗DBA宝典
发布2019-09-29 16:33:28
4130
发布2019-09-29 16:33:28
举报

该系列专题为2018年4月OCP-052考题变革后的最新题库。题库为小麦苗解答,若解答有不对之处,可留言,也可联系小麦苗进行修改。

注:OCP-052最新题库完整详细解答版请联系小麦苗私聊。解题不易,请大家尊重原创。

QQ:646634621

QQ群:547200174、618766405

微信号:lhrbestxh

Q

题目

Examine these facts about a database.

1. The database default tabpespace is tuue.

2. DEFERRED_SEGMENT_CREATION is TRUE.

3. The default tablespace of USER1 is tbs1.

4. USER1 has only these privileges:

· CREATE SESSION

· CREATE TABLE

· UNLIMITED quota on tbs1

Examine these commands executed by USER1:

SQL> CREATE TABLE emp (eno NUMBER, ename VARCHAR2(20)) TABLESPACE TBS1;

Table created.

SQL> CREATE INDEX emp_inx ON emp(eno) TABLESPACE USERS;

Index created.

SQL> INSERT INTO emp VALUES (NULL,'Alan');

What will be the outcome of the INSERT operation and why?

A. It will fail because an indexed column cannot have NULL values.

B. A row will be inserted into EMP and an index entry will be made into EMP_IDX.

C. It will fail because USER1 has no quota on USERS.

D. A row will be inserted into EMP and an index entry will be inserted into a virtual column of EMP because USER1 has no quota an USERS.

E. A row will be inserted into EMP but no index entry will be made into EXP_IDX.

A

答案

Answer:C

SYS@OCPLHR1> create tablespace tuue datafile '/u01/app/oracle/oradata/OCPLHR1/tuue01.dbf' size 10m;

Tablespace created.

SYS@OCPLHR1> alter database default tablespace tuue;

Database altered.

SYS@OCPLHR1> show parameter DEFERRED_SEGMENT_CREATION

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

deferred_segment_creation boolean TRUE

SYS@OCPLHR1>

SYS@OCPLHR1> create tablespace tbs1 datafile '/u01/app/oracle/oradata/OCPLHR1/tbs101.dbf' size 10m;

Tablespace created.

SYS@OCPLHR1> create user user1 identified by lhr default tablespace tbs1 quota UNLIMITED on tbs1;

User created.

SYS@OCPLHR1> grant create session,create table to user1;

Grant succeeded.

SYS@OCPLHR1> conn user1/lhr

Connected.

USER1@OCPLHR1> CREATE TABLE emp (eno NUMBER, ename VARCHAR2(20)) TABLESPACE TBS1;

Table created.

USER1@OCPLHR1> CREATE INDEX emp_inx ON emp(eno) TABLESPACE USERS;

Index created.

USER1@OCPLHR1> select * from user_segments;

no rows selected

USER1@OCPLHR1> INSERT INTO emp VALUES (NULL,'Alan');

INSERT INTO emp VALUES (NULL,'Alan')

*

ERROR at line 1:

ORA-01950: no privileges on tablespace 'USERS'

USER1@OCPLHR1>

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2018-08-12,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 DB宝 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Examine these facts about a database.
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档