当前位置:网站首页>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;
边栏推荐
- Eight steps of agile development process
- [database]jdbc
- Download and use of the super perfect screenshot tool snipaste
- Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes
- UI (New ui:: MainWindow) troubleshooting
- Verilog 过程赋值 区别 详解
- West digital decided to raise the price of flash memory products immediately after the factory was polluted by materials
- NLog使用
- 微信小程序中 在xwml 中使用外部引入的 js进行判断计算
- /silicosis/geo/GSE184854_scRNA-seq_mouse_lung_ccr2/GSE184854_RAW/GSM5598265_matrix_inflection_demult
猜你喜欢

SAML2.0 笔记(一)

Eight steps of agile development process

Kubernetes cluster storageclass persistent storage resource core concept and use

MySQL之账号管理

Oracle的md5
![[yolo3d]: real time detection of end-to-end 3D point cloud input](/img/5e/f17960d302f663db75ad82ae0fd70f.jpg)
[yolo3d]: real time detection of end-to-end 3D point cloud input

Getting started with MQ

Large screen visualization from bronze to the advanced king, you only need a "component reuse"!

High performance and low power cortex-a53 core board | i.mx8m Mini

Introduction to Robotics II. Forward kinematics, MDH method
随机推荐
表单自定义校验规则
数据库文件逻辑结构形式指的是什么
Intersection vengraph
[mv-3d] - multi view 3D target detection network
verilog REG 寄存器、向量、整数、实数、时间寄存器
知物由学 | 自监督学习助力内容风控效果提升
< job search> process and signal
Go执行shell命令
In depth analysis of C language - variable error prone knowledge points # dry goods inventory #
One of the future trends of SAP ui5: embrace typescript
Global and Chinese markets for welding equipment and consumables 2022-2028: Research Report on technology, participants, trends, market size and share
Intersection of Venn graph
Verilog 过程连续赋值
ORA-01547、ORA-01194、ORA-01110
venn圖取交集
[HCIA continuous update] overview of dynamic routing protocol
Continuous assignment of Verilog procedure
Load different fonts in QML
Analyse de 43 cas de réseaux neuronaux MATLAB: Chapitre 42 opérations parallèles et réseaux neuronaux - - opérations parallèles de réseaux neuronaux basées sur CPU / GPU
Kotlin基础学习 17