Re: db link
Date: Fri, 30 Oct 2009 09:56:31 -0400
I always create my database links using the full TNS definition as Mindaugas Navickas suggested. It makes the link TNSNAMES independent. I don't have to worry about what the tnsnames.ora or sqlnet.ora on the server has. You can even create them with a failover -
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xx.x.xx.x)(PORT=xxxx))) (CONNECT_DATA=(SID=database1)(failover_mode=(type=SESSION)(method=BASIC)))) (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xx.x.xx.y)(PORT=xxxx))) (CONNECT_DATA=(SID=database2)(failover_mode=(type=SESSION)(method=BASIC)))))
There is an upper limit to how long the description can be so I always remove any white space.
On Thu, Oct 29, 2009 at 8:28 PM, Mercadante, Thomas F (LABOR) < Thomas.Mercadante_at_labor.state.ny.us> wrote:
> What you really proved was that the tnsnames.ora file on your database
> server where your database link and database lives was the problem. By
> putting onames in the sqlnet.ora (I am assuming you are running onames) you
> fixed the problem.