当前位置:网站首页>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;
边栏推荐
- KL divergence is a valuable article
- MSI announced that its motherboard products will cancel all paper accessories
- 初出茅庐市值1亿美金的监控产品Sentry体验与架构
- Kotlin basic learning 17
- 高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
- Form custom verification rules
- Global and Chinese markets for electronic laryngoscope systems 2022-2028: Research Report on technology, participants, trends, market size and share
- Kotlin基础学习 16
- 命名块 verilog
- On redis (II) -- cluster version
猜你喜欢

高性能 低功耗Cortex-A53核心板 | i.MX8M Mini

MySQL index, transaction and storage engine

Gradle foundation | customize the plug-in and upload it to jitpack

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

MySQL connection query and subquery

halcon图像矫正

Basic syntax of unity script (6) - specific folder

ThreadLocal详解

Form custom verification rules

How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
随机推荐
Global and Chinese market of handheld ultrasonic scanners 2022-2028: Research Report on technology, participants, trends, market size and share
ORA-01547、ORA-01194、ORA-01110
Kotlin基础学习 17
PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
What is the logical structure of database file
[punch in] flip the string (simple)
Intersection of Venn graph
How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
Download and use of the super perfect screenshot tool snipaste
命名块 verilog
Aaaaaaaaaaaa
JIT deep analysis
JS generate random numbers
Detailed explanation of the difference between Verilog process assignment
[designmode] builder model
Discrimination between sap Hana, s/4hana and SAP BTP
MySQL advanced (Advanced) SQL statement (II)
Kotlin basic learning 17
West digital decided to raise the price of flash memory products immediately after the factory was polluted by materials
Exchange rate query interface