【翻译自mos文章】在/tmp/.oracle目录下的文件是什么?

本文解析了Oracle数据库在/tmp/.oracle目录下创建的各种临时文件的作用,包括它们如何与监听器及IPC连接相关联,并提供了清理这些文件的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在/tmp/.oracle目录下的文件是什么?

来源于:
What Are The Files In The /tmp/.oracle Directory? (文档 ID 1050601.6)

问题描述:
在/tmp/.oracle目录下有很多临时文件,比如:

   s#1571.1
   s#1753.1
   s#3246.1

用操作系统的file命令来看这些文件的类型:

[oracle@rhel63single .oracle]$ file s#3710.2
s#3710.2: socket
[oracle@rhel63single .oracle]$ ps -ef |grep lsnr
oracle    3710     1  0 15:20 ?        00:00:00 /u02/app/oracle/product/11.2.0.4/db_1/bin/tnslsnr LISTENER -inherit ----->>>注意进程号
oracle    8290  3205  0 15:45 pts/0    00:00:00 grep lsnr
[oracle@rhel63single .oracle]$ 

对于 Oracle 7.1.X RDBMS版本:

The files are in /tmp/o  OR  /var/tmp/o

对于Oracle 7.2.2 RDBMS以及更新版本:

The files are in /tmp/.oracle  OR  /var/tmp/.oracle

 

问题解释:
The files that are created are named pipes of the form s{IPC_KEY} and s#{PID of listener}

s{IPC_KEY} files are generated from IPC connections. 
s#{PID of listener} files are listener connections to the network.  When the listener is started, it creates a new socket file.

Oracle不会自动remove掉这些文件

方案描述:

如果这些文件是 IPC connection files,如果重启操作系统不会自动清理这些文件,那么就手工remove掉这些文件

如果这些文件是 listener connection files,在remove掉这些文件之前,你应该停止掉监听器。这会保证你不会kill掉监听器连接( kill the listener connections)

 

方案解释:

有些操作系统配置了在shutdown 或者startup时清理/tmp。

为什么这些文件依然在?有如下的原因:

- The system is configured to clean out /tmp and the files will be removed 
  upon reboot and the system has not been rebooted recently.

- The system is making a lot of IPC connections and/or the listener has been 
  restarted many times since the last reboot.

- The system is NOT configured to clean out /tmp directory.


You may wish to setup a cron job to clean out the /tmp directory regularly if
your system is not configured to clean out /tmp directory.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值