博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
052(十九)
阅读量:7210 次
发布时间:2019-06-29

本文共 6955 字,大约阅读时间需要 23 分钟。

91、View the Exhibit and examine the user information

The user has been granted CONNECT and RESOURCE roles and no individual system privileges. The SL_REP user executes this command to create a table:SQL> CREATE TABLE orders (oid number(6),odate date,ccode number(4),oamt number(10,2)) TABLESPACE purchase_space; The PURCHASE_SPACE tablespace already exists in the database. Which statement describes the effect of the command? A. The command executes successfully and creates the table in the USERS tablespace. B. The command executes successfully and creates the table in the PURCHASE_SPACE tablespace. C. The command produces an error because the user does not have the privilege to createthe table. D. The command produces an error because the user does not have quota in the PURCHASE_SPACE tablespace.

 

 

Answer: B系统权限unlimited tablespace是隐含在dba, resource角色中的一个系统权限. 当用户得到dba或resource的角色时, unlimited tablespace系统权限也隐式受权给用户UNLIMITED TABLESPACEUse an unlimited amount of any tablespace. This privilege overrides any specific quotas assigned. If you revoke this privilege from a user, then the user's schema objects remain but further tablespace allocation is denied unless authorized by specific tablespace quotas. You cannot grant this system privilege to roles
View Code

 

 

92、

92.A constraint in a table is defined with the INITIALLY IMMEDIATE clause. You executed the ALTER TABLE command with the ENABLE VALIDATE option to enable the constraint that was disabled. What are the two effects of this command? (Choose two.) A. It fails if any existing row violates the constraint. B. It does not validate the existing data in the table. C. It enables the constraint to be enforced at the end of each transaction. D. It prevents insert, update, and delete operations on the table while the constraint is in the process of being enabled.

 

Answer: AD 启用约束:enable( validate) :启用约束,创建索引,对已有及新加入的数据执行约束.enable novalidate :启用约束,创建索引,仅对新加入的数据强制执行约束,而不管表中的现有数据. 禁用约束:disable( novalidate):关闭约束,删除索引,可以对约束列的数据进行修改等操作.disable validate :关闭约束,删除索引,不能对表进行 插入/更新/删除等操作.和94题类似
View Code

 

93、

93.The session of user SCOTT receives the following error after executing an UPDATE command on the EMP table:ERROR at line 1:ORA-00060: deadlock detected while waiting for resourceOn investigation, you find that a session opened by user JIM has a transaction that caused the deadlock. Which two statements are true regarding the session of SCOTT in this scenario? (Choose two.) 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

 

Answer: BD测试:session 1:update test_xxxx set name='11' where id=1session 2:update test_xxxx set name='22' where id=2session 1:update test_xxxx set name='222' where id=2session 2:update test_xxxx set name='111' where id=1session 1报错:1    1    8    ORA-00060: deadlock detected while waiting for resource
View Code

 

 

94、

94.Examine the following statement that is used to modify the primary key constraint on the SALES table:SQL> ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE;Which three statements are true regarding the above command? (Choose three.)A. The constraint remains valid. B. The index on the constraint is dropped. C. It allows the loading of data into the table using SQL *Loader. D. New data conforms to the constraint, but existing data is not checked. E. It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.

 

Answer: ABC参考:SQL Language Reference关闭约束,删除索引,不能对表进行 插入/更新/删除等操作DISABLE VALIDATE disables the constraint and drops the index on the constraint, but keeps the constraint valid. This feature is most useful in data warehousing situations, because it lets you load large amounts of data while also saving space by not having an index. This setting lets you load data from a nonpartitioned table into a partitioned table using the exchange_partition_subpart clause of the ALTER TABLE statement or using SQL*Loader.All other modifications to the table (inserts, updates, and deletes) by other SQL statements are disallowed.测试:create table test_xxxx(id number(12),name varchar2(20))/ALTER TABLE test_xxxx add  constraint  pk primary key(id)/ALTER TABLE test_xxxx MODIFY CONSTRAINT pk DISABLE VALIDATE;insert into test_xxxxvalues(1,'1');1    1    1    ORA-25128: No insert/update/delete on table with constraint (EDU.PK) disabled and validated/ALTER TABLE test_xxxx MODIFY CONSTRAINT pk enable validate/insert into test_xxxxvalues(1,'1');
View Code

 

 

95、

95.You execute the following command to change the status of the SALES tablespace:SQL> ALTER TABLESPACE sales OFFLINE;Which statements describe the effect of the command? (Choose all that apply.) A. The tablespace would require recovery to go back online. B. A checkpoint is taken on all data files that are associated with the SALES tablespace. C. The sessions that subsequently try to access the objects in the SALES tablespace receive an error. D. The new status of the SALES tablespace is recorded in the control file when the database instance is closed.

 

Answer: BC参考文档:Administrator's Guide'Taking Tablespaces Offlinethose users will not be able to access objects in the tablespace while it is offlineALTER TABLESPACE...OFFLINEIf you must take a tablespace offline, use the NORMAL clause (the default) if possible. This setting guarantees that the tablespace will not require recovery to come back online, even if after incomplete recovery you reset the redo log sequence using an ALTER DATABASE OPEN RESETLOGS statement. NORMAL   When you specify OFFLINE NORMAL, the database takes a checkpoint for all data files of the tablespace as it takes them offline. NORMALis the defaultTEMPORARYIf no files are offline, but you use the temporary clause, media recovery is not required to bring the tablespace back online. However, if one or more files of the tablespace are offline because of write errors, and you take the tablespace offline temporarily, the tablespace requires recovery before you can bring it back onlineIMMEDIATEA tablespace can be taken offline immediately, without the database taking a checkpoint on any of the data files. When you specify OFFLINE IMMEDIATE, media recovery for the tablespace is required before the tablespace can be brought online. You cannot take a tablespace offline immediately if the database is running in NOARCHIVELOG mode.Specify TEMPORARY only when you cannot take the tablespace offline normally. In this case, only the files taken offline because of errors need to be recovered before the tablespace can be brought online. Specify IMMEDIATE only after trying both the normal and temporary settings.
View Code

 

转载于:https://www.cnblogs.com/huanhuanang/p/5358286.html

你可能感兴趣的文章
Webpack 最佳实践总结(一)
查看>>
【138天】尚学堂高淇Java300集视频精华笔记(84)
查看>>
docker与git实现push-to-deploy
查看>>
vue2.0 与 bootstrap datetimepicker的结合使用
查看>>
ant design后台模板-1.前端环境搭建
查看>>
什么是npm ?
查看>>
php 中continue break exit return 的区别
查看>>
敏捷爽畅模型及其演变——Diana Larsen专访
查看>>
Bootstrap 4 正式发布,却可能生不逢时
查看>>
PWA即将推向所有Chrome平台
查看>>
修复.NET的HttpClient
查看>>
服务应该去版本化,不管是微服务还是SOA
查看>>
GitHub Draft Pull请求支持新的协作流程
查看>>
JShell:Java REPL综合指南
查看>>
为你的组织设计自己的障碍消除流程
查看>>
为什么你写的代码糟透了?
查看>>
使用Flutter一年后,这是我得到的经验
查看>>
滴滴进入寒冬期,将裁员2000人
查看>>
被批伪开源!刚刚融资6千万美元的Redis怎么了?
查看>>
专访刘刚:360手机卫士的性能监控与优化
查看>>