当前位置:网站首页>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;
边栏推荐
- PY3 link MySQL
- Oracle的md5
- Kotlin basic learning 14
- Global and Chinese markets for hand hygiene monitoring systems 2022-2028: Research Report on technology, participants, trends, market size and share
- Haute performance et faible puissance Cortex - A53 Core Board | i.mx8m mini
- [golang] leetcode intermediate bracket generation & Full Permutation
- Spark Tuning
- Learn PWN from CTF wiki - ret2shellcode
- Eight steps of agile development process
- leetcode-1380. Lucky number in matrix
猜你喜欢

Oracle的md5

Verilog 过程赋值 区别 详解

【DesignMode】建造者模式(Builder model)

微信小程序中 在xwml 中使用外部引入的 js进行判断计算

Unity脚本的基础语法(6)-特定文件夹

知物由学 | 自监督学习助力内容风控效果提升

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

"Analysis of 43 cases of MATLAB neural network": Chapter 41 implementation of customized neural network -- personalized modeling and Simulation of neural network

ThreadLocal详解

Continuous assignment of Verilog procedure
随机推荐
Global and Chinese markets for ultrasonic probe disinfection systems 2022-2028: Research Report on technology, participants, trends, market size and share
Generate random numbers that obey normal distribution
表单自定义校验规则
KL divergence is a valuable article
Detailed explanation of the difference between Verilog process assignment
Use blocking or non blocking for streamline
[HCIA continuous update] working principle of OSPF Protocol
venn图取交集
ORA-01547、ORA-01194、ORA-01110
Kotlin basic learning 17
SAML2.0 笔记(一)
Xlwings drawing
[数据库]JDBC
Oracle的md5
/silicosis/geo/GSE184854_ scRNA-seq_ mouse_ lung_ ccr2/GSE184854_ RAW/GSM5598265_ matrix_ inflection_ demult
Go执行shell命令
PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
In depth interpretation of pytest official documents (26) customized pytest assertion error information
The page in H5 shows hidden execution events
Unity脚本的基础语法(7)-成员变量和实例化