How to generate Oracle Net tracing for a DBMS_JOB using a database link

Problem Description
-------------------
A job that is scheduled via the DBMS_JOB system fails with a general error
returned from the network layer. The job makes use of distributed transactions
(i.e a Database Lin)..

You wish to determine the underlying cause by activating Oracle Net tracing
on the Data Server, where the job was executed. However, no Oracle Net trace
files are created upon job failure.


Solution Description
--------------------

DBMS_JOBs are executed by the SNP background processes which are automatically
started  when the database is started. No new client process/session is
created to serve the communication over the database link. Instead, the SNP
process acts as a client on behalf of the database link session.

Therefore, you must trace the SNP background process/es by enabling Oracle Net
server-side tracing for the database where the job is executed.


Solution Explanation
--------------------

1. Enable server-side sqlnet tracing where the job is executed as follows:

   # Data Server SQLNET.ORA file:
   SQLNET_LEVEL_SERVER=16
   SQLNET_FILE_SERVER=server
   SQLNET_DIRECTORY_SERVER=/tmp/tns_trace
         

2. Restart the Listener and Database for the Oracle Net tracing parameters to
   take effect.

3. Determine the process id's (PID) for the SNP background process/es as
   follows:
 
  SQL> select spid from v$process where program like '%SNP%';
 
  SPID
  ----------
  4894
  4896

4. Verify the trace files are created.
   Note that the file location and format depends on the Oracle Net trace
   parammeters defined in the SQLNET.ORA file.

   Based on the above configuration, trace files would have the following
   format:

   /tmp/tns_trace/server_<spid>.trc


5. Either execute the job manually using 'dbms_job.run(jobno)' or wait until
   the job is next executed automatically. Then, determine which of the above
   trace files represents your job for further analysis.


References
----------

Note:16658.1 : Tracing SQL*Net/Net8


Additional Search Words
-----------------------

DATABASE; DBLINK; DBMS_JOB; DISTRIBUTED; JOB; LINK; NET; SNP; SQLNET; TRACE;
NET8; NETWORK;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值