当前位置:网站首页>Table space capacity query and expansion of Oracle Database
Table space capacity query and expansion of Oracle Database
2022-04-23 02:47:00 【XL's Princess】
-- Querying table space usage ( Company :M)
SELECT a.tablespace_name " Table space name ",
total / (1024 * 1024) " Table space size (M)",
free / (1024 * 1024) " Table space remaining size (M)",
(total - free) / (1024 * 1024) " Table space usage size (M)",
round((total - free) / total, 4) * 100 " Usage rate %"
FROM (SELECT tablespace_name, SUM(bytes) free
FROM dba_free_space
GROUP BY tablespace_name) a,
(SELECT tablespace_name, SUM(bytes) total
FROM dba_data_files
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name
-- Extended table space
-- Query table space and path
select * from dba_data_files;
-- Method 1 : Specify tablespace size
alter database datafile '/u01/oracle/oradata/orcl/estamp.dbf' resize 1024m;
-- Method 2 : New table space file
alter tablespace estamp add datafile '/u01/oracle/oradata/orcl/estamp01.dbf' size 500m
-- Method 3 : Turn on auto expansion
-- Turn on auto grow off To turn off automatic expansion
ALTER DATABASE DATAFILE '/u01/oracle/oradata/orcl/grp.dbf' AUTOEXTEND ON;
-- Every time automatic growth 200m
ALTER DATABASE DATAFILE '/u01/oracle/oradata/orcl/estamp01.dbf' AUTOEXTEND ON NEXT 200M ;
-- Every time automatic growth 200m, The maximum table space is no more than 1G
ALTER DATABASE DATAFILE '/u01/oracle/oradata/orcl/grp.dbf' AUTOEXTEND ON NEXT 200M MAXSIZE 1024M;
版权声明
本文为[XL's Princess]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220741454583.html
边栏推荐
- Airtrack cracking wireless network password (Dictionary running method)
- ROP Emporium x86_ 64 7 ~ 8 questions
- 接口请求时间太长,jstack观察锁持有情况
- OCR识别PDF文件
- Android high-level interview must ask: overall business and project architecture design and reconstruction
- Rhcsa day 1 operation
- [suggestion collection] hematemesis sorting out golang interview dry goods 21 questions - hanging interviewer-1
- How big the program development of single chip microcomputer project can be, it represents your level of knocking code
- Parental delegation model [understanding]
- @Usage and difference between mapper and @ repository
猜你喜欢
Parental delegation model [understanding]
windows MySQL8 zip安装
Target narak
Modification du contenu de la recherche dans la boîte déroulante par PHP + MySQL
[wechat applet] set the bottom menu (tabbar) for the applet
Android 高阶面试必问:全局业务和项目的架构设计与重构
JVM运行时数据区(一)
定了,今日起,本号粉丝可免费参与网易数据分析培训营!
SQL server2019 cannot download the required files, which may indicate that the version of the installer is no longer supported. What should I do
Hack the box optimum
随机推荐
Solve the problem that PowerShell mining occupies 100% of cpu7 in win7
Understanding process (multithreading primary)
Leangoo brain map - shared multi person collaborative mind mapping tool
解决win7 中powershell挖矿占用CPU100%
leangoo脑图-共享式多人协作思维导图工具分享
Codeforces round 784 (Div. 4) (a - H)
基于多态的职工管理系统源码与一些理解
期中汇总(概论+应用层+运输层)
机器学习(周志华) 第十四章概率图模型
Navicat failed to connect to Oracle Database: cannot load OCI DLL, 87: instant client package is
How to build an integrated industrial Internet plus hazardous safety production management platform?
JS using the parameters of art template
JVM runtime data area (I)
Learn regular expression options, assertions
The express project changes the jade template to art template
Actual combat of industrial defect detection project (IV) -- ceramic defect detection based on hrnet
Practice of industrial defect detection project (III) -- Based on FPN_ PCB defect detection of tensorflow
MySQL JDBC programming
C language 171 Number of recent palindromes
Modification du contenu de la recherche dans la boîte déroulante par PHP + MySQL