匿名用户oracle表空间可以在线resize吗?
oracle表空间可以在线resize吗?
我来答
添加附件
收藏
复制链接
微信扫码分享
在小程序上查看
分享
添加附件
问题补充
4条回答
默认
最新
可以,确保resize后的大小,不小于现在使用的空间。
评论
有用 0表空间扩容,在线完全没问题,如下:
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 只能调大不能调小。
评论
有用 012.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回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
墨值悬赏


