暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

oradebug释放空间

DB小榴莲 2018-12-27
645

在ORACLE后台进程还在工作时,在操作系统上rm掉该进程的trace文件,但是该trace文件所在的目录空间并没有被释放,也就是文件句柄没有被释放。

 

文件句柄

 

操作系统打开以及维护文件时给每个文件的标识,这个标识是一个非零整数,这个非零整数就是文件句柄。文件句柄还能用来定位文件在内存中的位置。

 

如果rm进程的trace文件不能释放空间,可以使用oradebug来释放

 

$ ps -ef|grep lgwr

oracle    10831  10780  0 12:53 pts/2    00:00:00 grep --color=auto lgwr

oracle   24499      1  0 Dec26 ?        00:00:03 ora_lgwr_ora12c

 

SQL> oradebug setospid 24499

Oracle pid: 20, Unix process pid: 24499, image: oracle@host-192-168-132-143 (LGWR)

 

SQL> oradebug tracefile_name

/oravl01/app/oracle/diag/rdbms/ora12c/ora12c/trace/ora12c_lgwr_24499.trc

 

SQL> oradebug flush; 

Statement processed.

SQL> oradebug close_trace;

Statement processed.

 

oradebug flush

To flush the current contents of the trace buffer to the trace file use

 

oradebug close_trace

To close the current trace file use

 


最后修改时间:2020-01-04 19:35:42
文章转载自DB小榴莲,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论