当前位置:网站首页>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;
边栏推荐
- Array,Date,String 对象方法
- Kubedm series-00-overview
- TF coordinate transformation of common components of ros-9 ROS
- C language data type replacement
- [daily training] 1200 Minimum absolute difference
- Business modeling of software model | overview
- Explore the authentication mechanism of StarUML
- 我从技术到产品经理的几点体会
- 猜谜语啦(7)
- MATLAB小技巧(28)模糊綜合評價
猜你喜欢

猜谜语啦(10)

Lori remote control commissioning record

Typical low code apaas manufacturer cases

It cold knowledge (updating ing~)

Illustration of eight classic pointer written test questions

Meizu Bluetooth remote control temperature and humidity access homeassistant

Old Wang's esp8266 and old Wu's ws2818 light strip

L298N module use

Beautiful soup parsing and extracting data

Arduino+a4988 control stepper motor
随机推荐
Ros-11 common visualization tools
golang 基础 ——map、数组、切片 存放不同类型的数据
[daily training] 1200 Minimum absolute difference
猜谜语啦(5)
Guess riddles (7)
微信H5公众号获取openid爬坑记
C#【必备技能篇】ConfigurationManager 类的使用(文件App.config的使用)
猜谜语啦(11)
696. 计数二进制子串
Guess riddles (3)
golang 基础 —— golang 向 mysql 插入的时间数据和本地时间不一致
C语言标准函数scanf不安全的原因
Arduino+a4988 control stepper motor
TypeScript手把手教程,简单易懂
LLVM之父Chris Lattner:为什么我们要重建AI基础设施软件
Halcon shape_ trans
STM32 lights up the 1.8-inch screen under Arduino IDE
Halcon Chinese character recognition
Halcon clolor_ pieces. Hedv: classifier_ Color recognition
Guess riddles (4)