当前位置:网站首页>Oracle 常用SQL
Oracle 常用SQL
2022-07-02 03:27:00 【天天代码码天天】
1.查看服务器IP
select UTL_INADDR.get_host_address() from dual;
2.当前会话主机IP
select sys_context('USERENV', 'IP_ADDRESS') from dual3.服务器主机名
SELECT host_name from v$instance;
4.当前会话主机名
select sys_context('USERENV', 'HOST') from dual;5.查询服务器平台信息
SELECT * FROM DBA_REGISTRY_DATABASE;6.查询服务器内存大小
SELECT value / 1024 / 1024 / 1024 G
FROM v$osstat
where stat_name = 'PHYSICAL_MEMORY_BYTES'
7.查看控制信息
select name from v$controlfile;
8.查看数据文件
select file_name from dba_data_files;
9.查看日志文件
select member from v$logfile;
10.查看临时文件
select file_name from Dba_temp_files;11.查看archive log
select name from v$archived_log12.查询当前用户
show user13.查询当前用户所有表
select unique tname from col;
--或者
select * from user_tables;
--或者
select * from tab;14.查看数据库创建时间
SELECT TO_CHAR(CREATED, 'YYYY-MM-DD,HH24:MI:SS'), LOG_MODE FROM V$DATABASE;15.查看数据对象
select owner, object_type, status, count(*) count#
from all_objects
group by owner, object_type, status;16.查看不同用户的连接数
select username, count(username)
from v$session
where username is not null
group by username;
边栏推荐
- Competition and adventure burr
- Verilog 过程连续赋值
- Kubernetes cluster storageclass persistent storage resource core concept and use
- Retrofit's callback hell is really vulnerable in kotlin synergy mode
- Global and Chinese market of bone adhesives 2022-2028: Research Report on technology, participants, trends, market size and share
- 高性能 低功耗Cortex-A53核心板 | i.MX8M Mini
- JS generate random numbers
- Unity脚本的基础语法(6)-特定文件夹
- Kotlin basic learning 15
- halcon图像矫正
猜你喜欢
![[HCIA continuous update] overview of dynamic routing protocol](/img/03/83c883afb63b7c63f6879b5513bac3.jpg)
[HCIA continuous update] overview of dynamic routing protocol

Halcon image rectification

Form custom verification rules
On redis (II) -- cluster version

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

Introduction to Robotics II. Forward kinematics, MDH method

Which of PMP and software has the highest gold content?
![[C Advanced] brother Peng takes you to play with strings and memory functions](/img/95/ab1bb0b3fa0b99e32233a5ca5d42a4.jpg)
[C Advanced] brother Peng takes you to play with strings and memory functions

Verilog timing control

C reflection practice
随机推荐
Grpc快速实践
Global and Chinese markets for welding equipment and consumables 2022-2028: Research Report on technology, participants, trends, market size and share
What is the binding path of SAP ui5
NLog使用
跟着CTF-wiki学pwn——ret2shellcode
C # joint halcon out of halcon Environment and various Error Reporting and Resolution Experiences
Verilog wire type
Pointer array & array pointer
[数据库]JDBC
/silicosis/geo/GSE184854_scRNA-seq_mouse_lung_ccr2/GSE184854_RAW/GSM5598265_matrix_inflection_demult
QT environment generates dump to solve abnormal crash
【DesignMode】建造者模式(Builder model)
在QML中加载不同字体
Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
Pycharm2021 delete the package warehouse list you added
Review materials of project management PMP high frequency examination sites (8-1)
halcon图像矫正
JS <2>
JDBC details
IPhone 6 plus is listed in Apple's "retro products" list