oracle 表空間不足解決辦法

2022-08-18 00:12:16 字數 1760 閱讀 6991

問題:在對某一表空間進行新建表的時候,出現ora-01658的錯誤。

create 語句:

create table oa_orgconfig

(oaoc_unid      integer not null,

oaoc_uuid      varchar2(32) not null,

oaoc_cdate     date,

oaoc_udate     date,

oaoc_cusr      varchar2(32),

oaoc_remark    varchar2(2000),

oaoc_status    varchar2(10),

oaoc_orguuid   varchar2(2000),

oaoc_orgname   varchar2(2000),

oaoc_configxml clob

)tablespace ywgov

pctfree 10

initrans 1

maxtrans 255

storage

(initial 128k

next 128k

minextents 1

maxextents unlimited

);問題分析:

問題初步判斷是因為表空間大小不夠才造成在建表或則其他需要占用表空間大小的時候報錯,包括建立索引等操作。

首先,我們先分析我們對應的表空間大小有多少:

1、檢視表空間總大小sql:select tablespace_name,sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;

2、檢視表空間已使用大小及分配情況:

select segment_type,owner,sum(bytes)/1024/1024 from  dba_segments  where tablespace_name='ywgov' group by segment_type,owner

3、準備增加表空間大小:

檢視表空間路徑:select  * from dba_data_files

增加表空間大小:alter tablespace ywgov add datafile 'd:\oracle\product\10.2.0\oradata\dbf\ywgov1.ora' size 10m

(這裡注意我們在建立表空間的時候採用的是dbf格式的檔案,但是修改表空間採用的是ora,原理不懂,先mark等後續學習)

select tablespace_name,sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;

經過上訴處理,檢視表空間大小,確實增大,並且能夠支援create table的操作。

oracle查詢資料庫中儲存過程、索引、檢視等的數量

select count(1) from user_objects where object_type = 'procedure'

select count(1) from user_objects where object_type = 'index'

select count(1) from user_objects where object_type = 'view'

select count(1) from user_objects where object_type = 'sequence'

查詢表空間路徑:

select * from dba_data_files

oracle 表空間不足解決辦法大全

oracle表空間不足,一般有兩個原因 一,原表空間太小,沒有自增長 二,表空間已自增長,而且表空間也已足夠大,對於這兩種原因分別有各自的解決辦法。檢查原因 1 檢視表在那個表空間 select tablespace name,table name from user talbes where ta...

oracle 表空間不足解決辦法大全

oracle表空間不足,一般有兩個原因 一,原表空間太小,沒有自增長 二,表空間已自增長,而且表空間也已足夠大,對於這兩種原因分別有各自的解決辦法。檢查原因 1 檢視表在那個表空間 select tablespace name,table name from user talbes where ta...

system表空間空間不足解決辦法

場景描述 系統表空間空間不足,導致應用無法正常連線!環境描述 oracle 11g 檢視當前表空間的整體使用情況,以及有沒有開啟自動擴充套件,以及擴充套件的最大限制!tablespace status 表空間使用情況 set pages 12222 lines 132 set serveroutpu...