---
title: "ORACLE 表空间大小更改"
author: "jslfl"
date: "2012-09-06T11:37:18Z"
tags: ["Oracle"]
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2012-09-06T11:37:18Z"
id: 1672583
url: "https://jslfl.iteye.com/blog/1672583"
---

创建表时,提示Oracle 异常：ORA-01658:unable to create INITIAL extent for segmnet in tablespace,google一番,解决方法都是更改表空间大小或重建表空间,下面是我操作过程记录

进入命令状态

dba登陆:
sqlplus sys/sys@TESTDBM as sysdba;

查询表空间的文件
select file_id, tablespace_name from dba_data_files;
 FILE_ID TABLESPACE_NAME
---------- ------------------------------
         1 SYSTEM
         2 UNDOTBS1
         3 SYSAUX
         4 TESTDBM_DB

修改表空间文件大小
alter database datafile 4 resize 2G;
Database altered.

完成,开始我直接用alter tablespace TESTDBM_DB resize 2G,进行修改,报ORA-32773: operation not supported for smallfile tablespace TESTDBM_DB错,再google,根据上面的方法成功.