日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
oracle的臨時(shí)表空間寫滿磁盤空間解決改問題的步驟

oracle的臨時(shí)表空間寫滿磁盤空間,解決改問題的具體步驟,以下的操作是用數(shù)據(jù)庫(kù)的sys超級(jí)用戶操作

創(chuàng)新互聯(lián)專注于灣里網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠(chéng)為您提供灣里營(yíng)銷型網(wǎng)站建設(shè),灣里網(wǎng)站制作、灣里網(wǎng)頁設(shè)計(jì)、灣里網(wǎng)站官網(wǎng)定制、成都微信小程序服務(wù),打造灣里網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供灣里網(wǎng)站排名全網(wǎng)營(yíng)銷落地服務(wù)。

剛開始打算把臨時(shí)表空間的數(shù)據(jù)文件重新縮小就好了

執(zhí)行:

SQL> alter database tempfile

2 '/oracle/oms/oradata/temp/temp01.dbf' resize 10240M;

數(shù)據(jù)庫(kù)報(bào)錯(cuò),重新設(shè)置的空間大小不能滿足需要。

看來需要重新建立新的臨時(shí)表空間替換當(dāng)前的表空間了

1、首先查看當(dāng)前的數(shù)據(jù)庫(kù)默認(rèn)表空間:

SQL>select * from database_properties

where property_name='DEFAULT_TEMP_TABLESPACE';

確認(rèn)當(dāng)前的臨時(shí)表空間為TEMP

2、查看目前臨時(shí)表空間的大?。?/p>

SQL>select file_name,tablespace_name,bytes/1024/1024 "MB",autoextensible from dba_temp_files;

3、創(chuàng)建新的臨時(shí)表空間:(先在其他的磁盤空間借用一下空間)

SQL> create temporary tablespace temp02

2 tempfile '/oracle/oms/oradata/undo/temp02.dbf'

3 size 512M;

4、把新建的臨時(shí)表空間卻換成數(shù)據(jù)庫(kù)的默認(rèn)臨時(shí)表空間

SQL> alter database default temporary tablespace temp02;

5、確認(rèn)目前數(shù)據(jù)庫(kù)的默認(rèn)臨時(shí)表空間

SQL>select * from database_properties

where property_name='DEFAULT_TEMP_TABLESPACE';

6、在刪除temp臨時(shí)表空間之前,先把運(yùn)行在temp臨時(shí)表空間的sql語句kill掉,這樣的sql語句多為排序的語句

SQL>Select se.username,se.sid,se.serial#,su.extents,su.blocks*to_number(rtrim(p.value))as Space,

tablespace,segtype,sql_text

from v$sort_usage su,v$parameter p,v$session se,v$sql s

where p.name='db_block_size' and su.session_addr=se.saddr and s.hashvalue=su.sqlhash

and s.address=su.sqladdr

order by se.username,se.sid;

查詢出來之后,kill掉這些sql語句:

SQL>alter system kill session '524,778'; (假如某一條運(yùn)行的sql語句的SID為524,serial#為778)

確認(rèn)在temp臨時(shí)表空間中沒有運(yùn)行的sql語句之后,則可以刪除temp臨時(shí)表空間數(shù)據(jù)文件了

7、刪除temp臨時(shí)表空間

SQL> drop tablespace temp including contents and datafiles;

這樣很快就可以刪除了臨時(shí)表空間的數(shù)據(jù)文件

8、現(xiàn)在temp02臨時(shí)表空間占據(jù)了別人的磁盤空間,需要重新把臨時(shí)表空間建立在原來的位置,重新建立temp臨時(shí)表空間

SQL> create temporary tablespace temp

2 tempfile '/oracle/oms/oradata/temp/temp01.dbf'

3 size 512M autoextend on maxsize 15G;

新建一個(gè)512M的自動(dòng)擴(kuò)展臨時(shí)表空間,***的擴(kuò)展為15G。

查看新建的temp臨時(shí)表空間是否正確:

SQL>select file_name,tablespace_name,bytes/1024/1024,maxbytes/1024/1024,autoextensible from dba_temp_files;

9、把新建的temp臨時(shí)表空間卻換成數(shù)據(jù)庫(kù)的默認(rèn)臨時(shí)表空間

SQL> alter database default temporary tablespace temp;

10、確認(rèn)目前數(shù)據(jù)庫(kù)的默認(rèn)臨時(shí)表空間

SQL>select * from database_properties

where property_name='DEFAULT_TEMP_TABLESPACE';

確認(rèn)temp為當(dāng)前的數(shù)據(jù)庫(kù)默認(rèn)表空間

11、目前把原來的temp臨時(shí)表空間變成了512M,把剩余的磁盤空間空了出來,temp02臨時(shí)表空間就沒有用了,刪除temp02臨時(shí)表空間

SQL> drop tablespace temp02 including contents and datafiles;

通過上文中介紹的方法,關(guān)于oracle的臨時(shí)表空間寫滿磁盤空間的問題就能夠輕松解決了,同時(shí)也避免了oracle的臨時(shí)表空間寫滿磁盤空間帶來的麻煩,希望大家通過上文的學(xué)習(xí)都能夠從中有所收獲。


本文標(biāo)題:oracle的臨時(shí)表空間寫滿磁盤空間解決改問題的步驟
網(wǎng)站路徑:http://www.5511xx.com/article/dhgeesj.html