[Translated from mos] Enable oraclenettrace/tracing of dblink-Method for tracking dblink

Source: Internet
Author: User

[Translated from mos] Enable oraclenettrace/tracing of dblink-Method for tracking dblink


Enable dblink's oracle net trace/tracing -- Method for tracking dblink.

Reference Original:
DBLINK: How to Enable Oracle Net Tracing for Database links (Doc ID 746917.1)

Applicable:
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 the Oracle Net server code. Therefore, when tracing (TRACE) dblink, Oracle Net server tracing must be enabled. 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 is required for version 11g onwards

The preceding content must be added to the server created by dblink. If the tracing requires dblink at both ends, Oracle Net server tracing must be enabled at both ends.
If dblink uses the VPC connection mode, the trail starts immediately (effective for all connections using the db ). For the Shared Server mode, you need to restart the dispatcher to take effect.
For more information about the Shared Server mode, see Note 1005259.6 Shared Server (MTS) Diagnostics

To locate the Oracle Net server trace file generated by dblink, search for the dblink name or the error code generated when dblink is used.

Sqlplus scott/tiger
SQL * Plus: Release 10.2.0.4.0-Production on Mon Nov 3 12:33:39 2008
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
With the Partitioning and Data Mining options

SQL> select sysdate from dual @ test;

SYSDATE
---------
03-NOV-08

SQL>

Cd to TRACE_DIRECTORY_SERVER
Cd $ ORACLE_HOME/network/trace

Search for dblink name, SQL used, error code, and so on.

Grep date *. trc
Svr_3229.trc: [03-NOV-2008 12: 33: 48: 476] nsprecv: 64 61 74 65 20 66 72 6F | date. fro |

The trace svr_3229.trc file on the Server is generated when the session uses dblink. The trace file on the server will display two Connection ID values.
The first value is the initial connection to the local database.
The second value is the connection to the remote database.

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

Go to the remote server and search with 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 trace file successfully matched by this session is svr_3229.trc and svr_3243.trc.

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.