当前位置:操作系统 > Unix/Linux >>

[每日一题]OCP1z0-047 :2013-07-17基本概念:同义词、动态性能视图、数据字典视图

[每日一题]OCP1z0-047 :2013-07-17基本概念:同义词、动态性能视图、数据字典视图
 
 
答案A是对的,来自己官方的解释:
USER_SYNONYMS
USER_SYNONYMS describes theprivate synonyms (synonyms owned by the current user). Its columns () are thesame as those in ALL_SYNONYMS.
测试如下:创建两个同义词:一个是公共的,一个是私有的,然后再查询
gyj@OCM> createsynonym emp1 for hr.employees;
 
Synonym created.
 
gyj@OCM> createpublic synonym emp2 for hr.employees;
 
Synonym created.
gyj@OCM> select *from  user_synonyms;
 
SYNONYM_NAME                   TABLE_OWNER                    TABLE_NAME            DB_LINK
------------------------------------------------------------ --------------------------------------------------------------------------------------------------------------------------------------------------------------
EMP1                           HR                             EMPLOYEES
 
 
答案B是错的,测试如下:
gyj@OCM> conn system/oracle
Connected.
system@OCM> select * from tab$;
select * from tab$
              *
ERROR at line 1:
ORA-00942: table or view does not exist
除了sys用户能访问基表,其它用户不可以。。。
 
 
 
答案C也是错的,除了sys能访问数据库所有用户,其它的不能。。。
来自官方文档:
About Dynamic Performance Views
Oracle contains a setof underlying views that are maintained by the database server and accessibleto the database administrator user SYS. These views are called dynamicperformance views because they are continuously updated while a database isopen and in use, and their contents relate primarily to performance.
Although these viewsappear to be regular database tables, they are not. These views provide data oninternal disk structures and memory structures. You can select from theseviews, but you can never update or alter them.
 
V$ Views
The actual dynamic performance views are identified bythe prefix V_$. Public synonyms for these views have theprefix V$. Database administrators and other users should access only the V$objects, not the V_$ objects.
 
答案D也是错的,来自官方解释:
USER_OBJECTS
USER_OBJECTS describes all objects owned by the current user. Its columns are the sameas those in "ALL_OBJECTS".
 
答案E是对的,来自官方解释:
About Static Data Dictionary Views
Data dictionary tables are not directly accessible, butyou can access information in them through data dictionary views. To list thedata dictionary views available to you, query the view DICTIONARY.
Many data dictionary tables have three correspondingviews:
·        An ALL_view displays all the information accessible to the current user, includinginformation from the current user's schema as well as information from objectsin other schemas, if the current user has access to those objects by way ofgrants of privileges or roles.
·        A DBA_view displays all relevant information in the entire database. DBA_ views are intended only for administrators. They can be accessed only byusers with the SELECT ANY TABLE privilege. This privilege is assigned to theDBA role when the system is initially installed.
·        A USER_view displays all the information from the schema of the current user. Nospecial privileges are required to query these views.
The columns of the ALL_, DBA_, and USER_ views corresponding to a single data dictionary table are usually nearlyidentical. Therefore, these views are described in full only once in thischapter, at their first occurrence alphabetically, and are listed without fulldescriptions at their other occurrences.
 
答案:AE
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,