在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




