Let me try to explain : (And we already have a couple of "work in progress" TARs open with Oracle @ this)
Two servers (S1 and S2), one database running on each of them (D1 and D2 respectively) and a Pro*C program (P1) is what the setup and origin of problem is.
The program is configured to be able run from S1 as well as S2. The program basically needs to make a connection to database D1 on server S1. Now, if the job is fired from server S1, the job can identify that and decides to make a BEQ connection. If its fired from server S2, it connects to database D1 using SQL*Net (TCP/IP) connection.
After connecting, the job does DMLs on tables in database D1 as well as on tables in database D2. The tables in database D2 are available to the userid (that is used by the job to establish connection to database D1) by synonyms defined over a database link.
The problem is as follows :
When the job makes a BEQ connection, it sometimes fails due to "ORA-12571 TNS packet writer failure" error. When it makes a TCP/IP connection(irrespective of which server it is running on), it never fails.
We have traced the sessions and found nothing except a "err=1013". How do we determine whether this caused the other error (12571) to occur or the 12571 caused this 1013 ro occur ?