当前位置:网站首页>Oracle common SQL
Oracle common SQL
2022-07-02 03:33:00 【Tiantian code code Tiantian】
1. View servers IP
select UTL_INADDR.get_host_address() from dual;
2. Current session host IP
select sys_context('USERENV', 'IP_ADDRESS') from dual
3. Server hostname
SELECT host_name from v$instance;
4. Current session hostname
select sys_context('USERENV', 'HOST') from dual;
5. Query server platform information
SELECT * FROM DBA_REGISTRY_DATABASE;
6. Query the memory size of the server
SELECT value / 1024 / 1024 / 1024 G
FROM v$osstat
where stat_name = 'PHYSICAL_MEMORY_BYTES'
7. View control information
select name from v$controlfile;
8. View data files
select file_name from dba_data_files;
9. view log file
select member from v$logfile;
10. View temporary files
select file_name from Dba_temp_files;
11. see archive log
select name from v$archived_log
12. Query current user
show user
13. Query all tables of the current user
select unique tname from col;
-- perhaps
select * from user_tables;
-- perhaps
select * from tab;
14. Check the database creation time
SELECT TO_CHAR(CREATED, 'YYYY-MM-DD,HH24:MI:SS'), LOG_MODE FROM V$DATABASE;
15. View data objects
select owner, object_type, status, count(*) count#
from all_objects
group by owner, object_type, status;
16. Check the number of connections for different users
select username, count(username)
from v$session
where username is not null
group by username;
边栏推荐
- In depth analysis of C language - variable error prone knowledge points # dry goods inventory #
- [untitled] basic operation of raspberry pie (2)
- JS generate random numbers
- Knowing things by learning | self supervised learning helps improve the effect of content risk control
- Unity脚本的基础语法(6)-特定文件夹
- uniapp 使用canvas 生成海报并保存到本地
- 《MATLAB 神经网络43个案例分析》:第41章 定制神经网络的实现——神经网络的个性化建模与仿真
- Screenshot literacy tool download and use
- Basic syntax of unity script (8) - collaborative program and destruction method
- Kotlin基础学习 15
猜你喜欢
This article describes the step-by-step process of starting the NFT platform project
ThreadLocal详解
Account management of MySQL
焱融看 | 混合雲時代下,如何制定多雲策略
Detailed explanation of ThreadLocal
Verilog 状态机
Unity脚本的基础语法(6)-特定文件夹
傅里叶级数
MySQL advanced (Advanced) SQL statement (II)
One of the future trends of SAP ui5: embrace typescript
随机推荐
Kotlin basic learning 15
Custom classloader that breaks parental delegation
Qt的网络连接方式
Intersection of Venn graph
verilog REG 寄存器、向量、整数、实数、时间寄存器
Uniapp uses canvas to generate posters and save them locally
Global and Chinese markets for electronic laryngoscope systems 2022-2028: Research Report on technology, participants, trends, market size and share
Continuous assignment of Verilog procedure
初出茅庐市值1亿美金的监控产品Sentry体验与架构
Sentry experience and architecture, a fledgling monitoring product with a market value of $100million
Basic syntax of unity script (7) - member variables and instantiation
Unity脚本的基础语法(6)-特定文件夹
Global and Chinese market of handheld ultrasonic scanners 2022-2028: Research Report on technology, participants, trends, market size and share
知物由学 | 自监督学习助力内容风控效果提升
Verilog 线型wire 种类
Gradle foundation | customize the plug-in and upload it to jitpack
VS2010插件NuGet
Global and Chinese markets for ultrasonic probe disinfection systems 2022-2028: Research Report on technology, participants, trends, market size and share
[数据库]JDBC
Getting started with MQ