当前位置:网站首页>Oracle advanced (III) detailed explanation of data dictionary
Oracle advanced (III) detailed explanation of data dictionary
2022-07-05 08:48:00 【InfoQ】
One 、Oracle The data dictionary
OracleOracle1.1 Static data dictionary
user_*all_*dba_*user_*: This view stores information about the objects owned by the current user .( That is, all objects in the user mode )
all_*: This attempt stores information about objects that the current user can access .( Anduser_*comparison ,all_*You don't need to own the object , You just need to have access to the object )
dba_*: This view stores information about all objects in the database .( The premise is that the current user has access to these databases , Generally speaking, you must have administrator rights )
SYSuser_*all_*SELECTdba_*user_user_usersView : It mainly describes the information of the current user , It mainly includes the current user name 、 account id、 Account status 、 Table space name 、 Creation time, etc . For example, execute the following command to return this information .
select * from user_users
user_tablesView : It mainly describes the information of all tables owned by the current user , It mainly includes table name 、 Table space name 、 Cluster name, etc . Through this view, you can clearly understand which tables the current user can operate . The execution order is :select * from user_tables
user_objectsView : It mainly describes the information of all objects owned by the current user , Objects include tables 、 View 、 stored procedure 、 trigger 、 package 、 Indexes 、 Sequence, etc . This view is better thanuser_tablesThe view is more comprehensive . for example , You need to get a file named “package1” Information about the object type and its state , You can execute the following command :select object_type,status from user_objects where object_name=upper(‘package1’);
user_tab_privsView : This view mainly stores the permission information of all tables under the current user . such as , In order to understand the current user's response to table1 Permission information of , You can execute the following command :
select * from user_tab_privs where table_name=upper('table1')
1.2 Dynamic data dictionary
v$v$accessv$access: This view shows the database objects locked in the database and the session objects accessing these objects (session object ).
select * from v$access
SID
OWNER OBJECT TYPE
27 DKH V$ACCESS CURSOR
27 PUBLIC V$ACCESS SYNONYM
27 SYS DBMS_APPLICATION_INFO PACKAGE
27 SYS GV$ACCESS VIEW
v$session: This view lists the details of the current session . Because there are many fields in this view , No detailed fields are listed here , For more information , Can be directly in sql*plus Type... At the command line :desc v$sessionthat will do .
v$active_instance: This view mainly describes the information of the active instances under the current database . Still usable select Statement to observe the information .
v$context: This view lists the attribute information of the current session . For example, the namespace 、 Property value, etc .
1.3 Summary
Two 、Oracle Data dictionary commonly used in
--- Basic information of database instances
desc v$instance;
select * from v$instance;
-- Basic information of data file
desc v$datafile;
select * from v$datafile;
desc dba_data_files;
select file_name,file_id,tablespace_name,bytes,blocks, tatus,online_status from dba_data_files;
-- Basic information of temporary files
desc dba_temp_files;
select file_name,file_id,tablespace_name,status, from dba_temp_files;
-- Basic information of control document
desc v$controlfile;
select name,status,is_recovery_dest_file, block_size,file_size_blks from v$controlfile;
-- Basic information of log file
desc v$logfile;
select group#,status,type,member,is_recovery_dest_file from v$logfile;
边栏推荐
- Business modeling of software model | stakeholders
- 696. Count binary substring
- Infix expression evaluation
- Program error record 1:valueerror: invalid literal for int() with base 10: '2.3‘
- Basic number theory - factors
- Redis实现高性能的全文搜索引擎---RediSearch
- 资源变现小程序添加折扣充值和折扣影票插件
- Solutions of ordinary differential equations (2) examples
- [daily training -- Tencent selected 50] 557 Reverse word III in string
- [牛客网刷题 Day4] JZ32 从上往下打印二叉树
猜你喜欢

Solutions of ordinary differential equations (2) examples

319. 灯泡开关

Count of C # LINQ source code analysis

我从技术到产品经理的几点体会

深度学习模型与湿实验的结合,有望用于代谢通量分析

Meizu Bluetooth remote control temperature and humidity access homeassistant

RT-Thread内核快速入门,内核实现与应用开发学习随笔记

STM32 lights up the 1.8-inch screen under Arduino IDE

Halcon Chinese character recognition

Ros-11 common visualization tools
随机推荐
容易混淆的基本概念 成员变量 局部变量 全局变量
Kubedm series-00-overview
暑假第一周
ABC#237 C
图解八道经典指针笔试题
How can fresh students write resumes to attract HR and interviewers
EA introduction notes
Illustration of eight classic pointer written test questions
[牛客网刷题 Day4] JZ35 复杂链表的复制
多元线性回归(梯度下降法)
[formation quotidienne - Tencent Selection 50] 557. Inverser le mot III dans la chaîne
猜谜语啦(8)
Yolov4 target detection backbone
Business modeling of software model | stakeholders
【日常训练】1200. 最小绝对差
Halcon affine transformations to regions
Hello everyone, welcome to my CSDN blog!
C# LINQ源码分析之Count
Count of C # LINQ source code analysis
How many checks does kubedm series-01-preflight have