当前位置:网站首页>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
Oracle
Oracle
1.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 )
SYS
user_*
all_*
SELECT
dba_*
user_
user_users
View : 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_tables
View : 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_objects
View : 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_tables
The 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_privs
View : 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$access
v$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$session
that 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;
边栏推荐
- Low code platform | apaas platform construction analysis
- Halcon Chinese character recognition
- Bit operation related operations
- Install the CPU version of tensorflow+cuda+cudnn (ultra detailed)
- MATLAB skills (28) Fuzzy Comprehensive Evaluation
- ORACLE进阶(三)数据字典详解
- 多元线性回归(梯度下降法)
- 猜谜语啦(10)
- Numpy 小坑:维度 (n, 1) 和 维度 (n, ) 数组相加运算后维度变为 (n, n)
- 319. 灯泡开关
猜你喜欢
Digital analog 1: linear programming
Business modeling of software model | overview
Shift operation of complement
Programming implementation of ROS learning 2 publisher node
Programming implementation of ROS learning 6 -service node
C#【必备技能篇】ConfigurationManager 类的使用(文件App.config的使用)
猜谜语啦(9)
深度学习模型与湿实验的结合,有望用于代谢通量分析
猜谜语啦(142)
Beautiful soup parsing and extracting data
随机推荐
Typical low code apaas manufacturer cases
[Niuke brush questions day4] jz55 depth of binary tree
Arduino+a4988 control stepper motor
Digital analog 2: integer programming
猜谜语啦(2)
猜谜语啦(8)
JS asynchronous error handling
Old Wang's esp8266 and old Wu's ws2818 light strip
Apaas platform of TOP10 abroad
Wheel 1:qcustomplot initialization template
My university
Guess riddles (3)
[牛客网刷题 Day4] JZ32 从上往下打印二叉树
Yolov4 target detection backbone
Low code platform | apaas platform construction analysis
【日常训练】1200. 最小绝对差
GEO数据库中搜索数据
RT-Thread内核快速入门,内核实现与应用开发学习随笔记
Arrangement of some library files
Explore the authentication mechanism of StarUML