Linux表空间扩容,linux下oracle表空间导致磁盘空间不足
今天在執行oracle存儲過程的時候報錯,錯誤信息:"01652? 無法通過128(在表空間temp中)擴展temp段"。
在linux中執行df命令后發現表空間由于autoextend的原因,導致磁盤已用空間為100%。
[root@localhost ~]# df -h
文件系統 容量 已用 可用 已用% 掛載點
/dev/sda1 9.5G 8.6G 439M 96% /
/dev/sda3 119G 52G 61G 46% /home/sis
tmpfs 2.0G 0 2.0G 0% /dev/shm
(上面的sd1磁盤可用空間是刪除了一些臨時文件的顯示結果)
解決辦法是在另外一個磁盤開辟新的表空間,語句如下:
[root@localhost sis]# mkdir oracle_tmp
[root@localhost sis]# chown -R oracle /home/sis/oracle_tmp
//給EP表空間添加新的dbf文件
[root@localhost sis]# su -l oracle
[oracle@localhost ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Nov 10 11:35:35 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> alter tablespace EP add datafile
2 '/home/sis/oracle_tmp/EP02.dbf' size 500M autoextend on next 100M;
Tablespace altered.
SQL> alter database datafile '/home/oracle/app/oracle/oradata/orcl/EP01.dbf'
2 autoextend off;
Database altered.
新建好的數據文件,貌似oracle會自動隨機的寫到以后的數據文件中去。
新建臨時表空間:
SQL> create temporary tablespace TEMP2 tempfile
2 '/home/sis/oracle_tmp/TEMP2.dbf' size 500m reuse autoextend on next 100m;
Tablespace created.
SQL> alter database default temporary tablespace "TEMP2";
Database altered.
總結
以上是生活随笔為你收集整理的Linux表空间扩容,linux下oracle表空间导致磁盘空间不足的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PPT怎么在线转视频?
- 下一篇: 如何突破百度云下载速度限制