暂无图片
oracle表空间可以在线resize吗?
我来答
分享
暂无图片 匿名用户
oracle表空间可以在线resize吗?

oracle表空间可以在线resize吗?

我来答
添加附件
收藏
分享
问题补充
4条回答
默认
最新
刘浩

可以在线resize数据文件的。

暂无图片 评论
暂无图片 有用 0
打赏 0
薛晓刚

可以,确保resize后的大小,不小于现在使用的空间。

暂无图片 评论
暂无图片 有用 0
打赏 0
JiekeXu
暂无图片

表空间扩容,在线完全没问题,如下:

select file_id,file_name,bytes/1024/1024,AUTOEXTENSIBLE from dba_data_files  where tablespace_name='&tabs_name';

   FILE_ID
----------
FILE_NAME
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BYTES/1024/1024 AUT
--------------- ---
         2
/oracle/data_test/test/sysaux01.dbf
           4000 YES

如上 4000M 扩容至 6G

SQL> alter database datafile 2 resize 6G;

Database altered.

Elapsed: 00:00:05.88
复制

说明: datafile 2 指上面查到的 file_id 为 2 。 resize 只能调大不能调小。

暂无图片 评论
暂无图片 有用 0
打赏 0
流星
2022-04-15
resize怎么不能调小了?截止到最后一个数据块位置的大小,resize到超过这个值都可以
lscomeon
12.3.2 Manually Resizing a Data File
You can manually increase or decrease the size of a data file using the ALTER
DATABASE statement.
Therefore, you can add more space to your database without adding more data files.
This is beneficial if you are concerned about reaching the maximum number of data
files allowed in your database.
For a bigfile tablespace, you can use the ALTER TABLESPACE statement to resize a data
file. You are not allowed to add a data file to a bigfile tablespace.
Manually reducing the sizes of data files enables you to reclaim unused space in the
database. This is useful for correcting errors in estimates of space requirements.
In the following example, assume that the data file /u02/oracle/rbdb1/stuff01.dbf
has extended up to 250M. However, because its tablespace now stores smaller
objects, the data file can be reduced in size.
The following statement decreases the size of data file /u02/oracle/rbdb1/
stuff01.dbf:
ALTER DATABASE DATAFILE '/u02/oracle/rbdb1/stuff01.dbf'
 RESIZE 100M;
Note:
It is not always possible to decrease the size of a file to a specific value. It
could be that the file contains data beyond the specified decreased size, in
which case the database will return an error
复制
暂无图片 评论
暂无图片 有用 0
打赏 0
回答交流
Markdown


请输入正文
提交
相关推荐
生产上都在用什么软件监控Oracle ?
回答 5
已采纳
您好,最好的就是官方出品的,OEM老中青各个对应版本。免费的就是些三方开源的,如zabbix、prometheus普罗米修斯Grafana(参考链接:https://blog.csdn.net/wei
oracle 增量数据采集cdc 功能中的DBMS_CDC_PUBLISH 包编译有误
回答 5
组件状态如下都是正常
oracle ora-12154问题如何处理?
回答 2
已采纳
一、监听器介绍1、概念      监听器直接面向用户,也就是客户端程序。监听器启动时,负责打开监听端口,等待客户端连接。当有客户端连接时,在
触发器 or replace 关键字的含义
回答 1
orreplace就是如果存在这个名字触发器的话就替换掉原触发器内容。
oracle 查询dba_free_space报错,ORA-00600: internal error code, arguments: [ktsxtffs-3], [8], [0], [], [], [], [], [], [], [], [], []
回答 4
ts$与数据文件查询不匹配,已经解决了
单实例遇到 ORA-27300 ORA-27301 ORA-27302 故障。
回答 6
看一下系统日志,系统日志应该有可用的信息,也有可能遇上bug了,不好确定。
12.2的库正常关闭一直卡住
回答 13
看56681进程是啥,localno的话就杀掉
使用OracleBulkCopy批量插入数据是乱码,这是为什么?
回答 2
已采纳
检查客户端环境变量NLSLANG是否对应数据库的字符集
Oracle 用expdp 导出test 用户下的表结构, 命令行还需要加上 schema 吗?
回答 3
已采纳
如果是使用test用户执行导出的话,那么不需要再加上schemas参数如果是使用的不是test,而是system或其它用户,那么就需要加上schemas参数进行指定了
Oracle-dblink远程插入数据报-ORA-03150:数据库链接的通信通道的文件结尾
回答 2
看一下数据库连接超时的配置