当前位置:网站首页>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
边栏推荐
- [XJTU計算機網絡安全與管理]第二講 密碼技術
- Parental delegation model [understanding]
- Get together to watch (detailed version) eat a few cents a day
- Slave should be able to synchronize with the master in tests/integration/replication-psync. tcl
- The penultimate K nodes in jz22 linked list
- JDBC JDBC
- Solve the problem that PowerShell mining occupies 100% of cpu7 in win7
- Classification and regression tree of machine learning
- [wechat applet] set the bottom menu (tabbar) for the applet
- Looking for a job, writing a resume to an interview, this set of information is enough!
猜你喜欢

基于Scrum进行创新和管理

Flink learning (XI) watermark

Web learning record (medium)

下载正版Origin Pro 2022 教程 及 如何 激 活
![[XJTU computer network security and management] Lecture 2 password technology](/img/b0/263e8dcbfeb2ce9f504a9c8eb76b07.png)
[XJTU computer network security and management] Lecture 2 password technology

The way to conquer C language

JVM运行时数据区(一)

Airtrack cracking wireless network password (Dictionary running method)

Those years can not do math problems, using pyhon only takes 1 minute?

Android high-level interview must ask: overall business and project architecture design and reconstruction
随机推荐
[suggestion collection] hematemesis sorting out golang interview dry goods 21 questions - hanging interviewer-1
Rhcsa day 3 operation
Codeforces round 784 (Div. 4) (a - H)
基于ele封装下拉菜单等组件
TypeScript(1)
OCR识别PDF文件
JDBC JDBC
Devil cold rice 𞓜 078 devil answers the market in Shanghai and Nanjing; Communication and guidance; Winning the country and killing and screening; The purpose of making money; Change other people's op
The way to conquer C language
Source code and some understanding of employee management system based on polymorphism
Renesas electronic MCU RT thread development and Design Competition
How can enterprises with major hazard installations ensure the completion of the digital construction task of double prevention mechanism by the end of the year
Yes, from today on, our fans can participate in Netease data analysis training camp for free!
Codeforces Round #784 (Div. 4) (A - H)题解
Get together to watch (detailed version) eat a few cents a day
leetcode 烹饪料理
Niuke hand speed monthly race 48 C (I can't understand the difference. It belongs to yes)
leetcode 烹飪料理
The penultimate K nodes in jz22 linked list
Log4j knowledge point record