当前位置:网站首页>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 dual3. 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_log12. Query current user
show user13. 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;
边栏推荐
- 蓝桥杯单片机省赛第十二届第二场
- Global and Chinese market of X-ray detectors 2022-2028: Research Report on technology, participants, trends, market size and share
- [yolo3d]: real time detection of end-to-end 3D point cloud input
- Verilog avoid latch
- Apple added the first iPad with lightning interface to the list of retro products
- C # joint Halcon's experience of breaking away from Halcon environment and various error reporting solutions
- 【DesignMode】原型模式(prototype pattern)
- Learn PWN from CTF wiki - ret2shellcode
- Go execute shell command
- < job search> process and signal
猜你喜欢

NLog使用

Verilog timing control

Knowing things by learning | self supervised learning helps improve the effect of content risk control

Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes

蓝桥杯单片机省赛第十一届第一场

JIT deep analysis

Getting started with MQ

halcon图像矫正

Haute performance et faible puissance Cortex - A53 Core Board | i.mx8m mini

《MATLAB 神經網絡43個案例分析》:第42章 並行運算與神經網絡——基於CPU/GPU的並行神經網絡運算
随机推荐
Gradle notes
Global and Chinese markets for ultrasonic probe disinfection systems 2022-2028: Research Report on technology, participants, trends, market size and share
Apple added the first iPad with lightning interface to the list of retro products
高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
[golang] leetcode intermediate bracket generation & Full Permutation
Sentry experience and architecture, a fledgling monitoring product with a market value of $100million
Xlwings drawing
Verilog avoid latch
Detailed explanation of the difference between Verilog process assignment
What do you know about stock selling skills and principles
ORA-01547、ORA-01194、ORA-01110
【DesignMode】建造者模式(Builder model)
《MATLAB 神經網絡43個案例分析》:第42章 並行運算與神經網絡——基於CPU/GPU的並行神經網絡運算
Kotlin basic learning 17
[yolo3d]: real time detection of end-to-end 3D point cloud input
NLog使用
Verilog 状态机
Global and Chinese markets for electronic laryngoscope systems 2022-2028: Research Report on technology, participants, trends, market size and share
Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes
Global and Chinese market of handheld ultrasonic scanners 2022-2028: Research Report on technology, participants, trends, market size and share