为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:
【操作系统】:
【CPU】:
【问题描述】*:
system和temp表空间不能关闭自动扩展?
select 'alter tablespace '||tablespace_name||' datafile ' ||''''||file_name ||''''|| ' autoextend off;' from dba_data_files
2 order by tablespace_name,file_name;
LINEID 'altertablespace'||tablespace_name||'datafile'||''''||file_name||''''||'autoextendoff;'
---------- ---------------------------------------------------------------------------------------
1 alter tablespace MAIN datafile '/wwmhdata/MAIN.DBF' autoextend off;
2 alter tablespace ROLL datafile '/wwmhdata/ROLL.DBF' autoextend off;
3 alter tablespace SYSTEM datafile '/wwmhdata/SYSTEM.DBF' autoextend off;
4 alter tablespace TEMP datafile '/wwmhdata/TEMP.DBF' autoextend off;
5 alter tablespace WWMH datafile '/wwmhdata/wwmh01.DBF' autoextend off;
used time: 8.878(ms). Execute id is 810.
alter tablespace MAIN datafile '/wwmhdata/MAIN.DBF' autoextend off;
alter tablespace ROLL datafile '/wwmhdata/ROLL.DBF' autoextend off;
alter tablespace SYSTEM datafile '/wwmhdata/SYSTEM.DBF' autoextend off;
alter tablespace TEMP datafile '/wwmhdata/TEMP.DBF' autoextend off;
alter tablespace WWMH datafile '/wwmhdata/wwmh01.DBF' autoextend off;
executed successfully
used time: 6.791(ms). Execute id is 811.
SQL> executed successfully
used time: 5.216(ms). Execute id is 812.
SQL> alter tablespace SYSTEM datafile '/wwmhdata/SYSTEM.DBF' autoextend off;
[-3447]:Alter system tablespace autoextend off not supported.
used time: 2.953(ms). Execute id is 0.
SQL> alter tablespace TEMP datafile '/wwmhdata/TEMP.DBF' autoextend off;
[-3411]:Error in line: 1
Try to set file autoextend property in tablespace [TEMP] .
used time: 0.152(ms). Execute id is 0.
SQL> executed successfully
used time: 5.404(ms). Execute id is 814.
SQL> select tablespace_name, file_name, status,autoextensible,bytes/1024/1024/1024, maxbytes/1024/1024/1024 from dba_data_files order by 1,2
2 ;
LINEID tablespace_name file_name status autoextensible bytes/1024/1024/1024 maxbytes/1024/1024/1024
---------- --------------- -------------------- --------- -------------- -------------------- -----------------------
1 MAIN /wwmhdata/MAIN.DBF AVAILABLE NO 0 0
2 ROLL /wwmhdata/ROLL.DBF AVAILABLE NO 0 0
3 SYSTEM /wwmhdata/SYSTEM.DBF AVAILABLE YES 0 16383.9990234375
4 TEMP /wwmhdata/TEMP.DBF AVAILABLE YES 1 16383.9990234375
5 WWMH /wwmhdata/wwmh01.DBF AVAILABLE NO 1 0
used time: 16.053(ms). Execute id is 815.
temp表空间比较特殊。在dm.ini里面设置最大值
TEMP_SIZE 和 TEMP_SPACE_LIMIT
数据库每次重启,都会新建temp表空间的
SYSTEM 是固定扩展,无法改变。
TEMP 即使扩展也有一个固定的上限 TEMP_SPACE_LIMIT
1、一般创建用户前都会先创建自己需要的表空间,如果没有创建,默认使用MAIN表空间。
2、SYSTEM是数据库系统自己使用的表空间,不用担心,一般不会增长很大。
3、TEMP表空间可以设定上线。
修改参数:TEMP_SPACE_LIMIT(动态参数)
sp_set_para_value(1,'TEMP_SPACE_LIMIT',102400); --限制为100G
其他:
参数TEMP_SIZE,数据库启动时临时表空间数据文件的初始大小。每次重启都会重新创建。最大增长到TEMP_SPACE_LIMIT。
system和temp数据文件的上限是16383G,如果磁盘空间满了,怎么弄?