"Translated from MoS article" Open Dblink Oracle Net Trace/tracing-method for tracking Dblink

Source: Internet
Author: User


Turn on Dblink's Oracle Net Trace/tracing-a way to track dblink.

Reference text:
Dblink:how to Enable the Oracle Net tracing for Database links (Doc ID 746917.1)

Suitable for:
Oracle Net services-version 9.2.0.1.0 to 11.2.0.3 [Release 9.2 to 11.2]
Information in this document applies to any platform.
Checked for relevance on 24-jan-2013***

Solution:

Database link uses Oracle NET Server code, so when tracing (trace) Dblink, the Oracle NET Server tracing needs to be turned on. Add the following content to the Sqlnet.ora file:
Trace_level_server = 16
Trace_directory_server = DIRECTORY #eg/u01/oracle/trace
Trace_timestamp_server = On

Diag_adr_enabled=off # This parameter was required for version 11g onwards

The above content needs to be added on the server that Dblink was created on. If the trace requires dblink on both ends, then the Oracle Net Server tracing needs to be turned on at both ends.
If Dblink is using a proprietary server connection mode, the trace is started immediately (all connections using DB are in effect). For shared server mode, dispatcher restart is required to take effect.
For information about shared server mode, see note 1005259.6 shared Server (MTS) diagnostics

In order to locate the Oracle Net server trace file generated by Dblink, search for the Dblink name or the error code generated when using Dblink

Sqlplus Scott/tiger
Sql*plus:release 10.2.0.4.0-production on Mon Nov 3 12:33:39 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
With the partitioning and Data Mining options

Sql> Select sysdate from [email protected];

Sysdate
---------
03-nov-08

Sql>

CD to Trace_directory_server
CD $ORACLE _home/network/trace

Find Dblink name, use the Sql,error code, and more.

grep date *.trc
svr_3229.trc:[03-nov-2008 12:33:48:476] nsprecv:64 6F |date.fro|

The Server-side trace svr_3229.trc This file is generated when the session uses Dblink. This server-side trace file will display 2 Connection ID values.
The first value is the initial connection to the local library
The second value is a connection to the remote library.

grep Connection ID SVR_3229.TRC
[03-nov-2008 12:33:39:915] Nas_scn:connection id:00c9c89d59c3
[03-nov-2008 12:33:49:093] Nas_ccn:connection id:00c9d89d59f9d

To a remote server, search for the second value:
CD to Trace_directory_server
CD $ORACLE _home/network/trace

Grep the connection ID

grep 00c9d89d59f9d *.trc
svr_3243.trc:[03-nov-2008 12:33:49:170] Nas_scn:connection id:00c9d89d59f9d

Therefore, the session matches a successful trace file of Svr_3229.trc and SVR_3243.TRC.

"Translated from MoS article" Open Dblink Oracle Net Trace/tracing-method for tracking Dblink

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.