当前位置:网站首页>Oracle增加表空间解决ORACLE ORA-01653: unable to extend table报错
Oracle增加表空间解决ORACLE ORA-01653: unable to extend table报错
2022-08-04 21:47:00 【李长渊哦】
一、查看表空间的名字及文件所在位置
select tablespace_name, file_id, file_name, round(bytes/(1024*1024),0) total_space from dba_data_files order by tablespace_name

二、增加所需表空间大小
1、方法一
alter database datafile '表空间位置' resize 新的尺寸
例如
alter database datafile '/opt/oracle/oradata/ewell/BLZK.dbf' resize 4000m
2、方法二
对于oracle数据库的表空间,除了用手动增加大小外,还可以增加数据文件等方式扩展表空间大小。
alter tablespace 表空间名称 add datafile '新的数据文件地址' size 数据文件大小
alter tablespace BLZK add datafile '/opt/oracle/oradata/ewell/BLZK_ADD.dbf' size 1000m
3、方法三
alter database datafile '数据文件位置' autoextend on next 自动扩展大小 maxsize 最大扩展大小
alter database datafile '/opt/oracle/oradata/ewell/BLZK_ADD.dbf' autoextend on next 100m maxsize 10000m
三、查询表空间使用情况
SELECT
a.tablespace_name,
a.bytes / 1024 / 1024 "sum MB",
( a.bytes - b.bytes ) / 1024 / 1024 "used MB",
b.bytes / 1024 / 1024 "free MB",
round( ( ( a.bytes - b.bytes ) / a.bytes ) * 100, 2 ) "used%"
FROM
( SELECT tablespace_name, sum( bytes ) bytes FROM dba_data_files GROUP BY tablespace_name ) a,
( SELECT tablespace_name, sum( bytes ) bytes, max( bytes ) largest FROM dba_free_space GROUP BY tablespace_name ) b
WHERE
a.tablespace_name = b.tablespace_name
ORDER BY
( ( a.bytes - b.bytes ) / a.bytes ) DESC;

边栏推荐
猜你喜欢

LeetCode 199: 二叉树的右视图

Flutter 实现背景图片毛玻璃效果

PMP证书在哪些行业有用?

AXI interface application of Zynq Fpga image processing - the use of axi_lite interface

mysql基础

docker 搭建mysql 主从复制

PRIMAL: Pathfinding via Reinforcement and Imitation Multi-Agent Learning Code Analysis

Spss-系统聚类软件实操

大势所趋之下的nft拍卖,未来艺术品的新赋能

unity2D横版游戏教程9-对话框dialog
随机推荐
27. Dimensionality reduction
EasyGBS接入最新版海康摄像头后无法传递告警信息该如何解决?
Spss-系统聚类手算实操
8 年产品经验,我总结了这些持续高效研发实践经验 · 协同篇
js data type, throttling/anti-shake, click event delegation optimization, transition animation
打卡第 2 天: urllib简记
如何将二叉搜索树转化为一个有序的双向链表(原树上修改)
七夕,当爱神丘比特遇上牛郎和织女
"Jianzhi offer" brush title classification
[Linear Algebra 02] 2 interpretations of AX=b and 5 perspectives of matrix multiplication
数电快速入门(三)(卡诺图化简法的介绍)
Yolov7:Trainable bag-of-freebies sets new state-of-the-art for real-time objectdetectors
JWT actively checks whether the Token has expired
数电快速入门(一)(BCD码和三种基本逻辑运算的介绍)
如何根据“前序遍历,中序遍历”,“中序遍历,后序遍历”构建按二叉树
Exploration and Practice of Database Governance
LayaBox---TypeScript---Problems encountered at first contact
Altium Designer 19.1.18 - draw polygons copper hollow out, for the cursor just capture solutions
中大型商业银行堡垒机升级改造方案!必看!
In which industries is the PMP certificate useful?