Re: create a database link without modifying tnsnames.ora

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 23 Jan 2002 02:08:40 -0800
Message-ID: <a20d28ee.0201230208.55dbc41b_at_posting.google.com>


MJWood <maryjanewood_at_hotmail.com> wrote in message news:<k7ns4u40gqmg9rl4vddrrp2egulp5bgl1l_at_4ax.com>...
> Hi all,
>
> I have the ip address, port number, database name, login name and
> password of several Oracle databases. I usually write java program to
> do all my job bacause a simple url can connect all these databases
> easily, e.g. DriverManager.getConnection
> ('jdbc:oracle:thin:_at_123.123.123.123:1521:ORCL', 'name', 'pwd')
> will be enough to create a connection. Then I can get data from one
> database, modify it and transfer to another database. It is slow, but
> always works.
>
> Now I am asked to write some PL/SQL for similar batch processing. I
> need to create some database links but I want to do it dynamically. I
> don't want to modify the tnsnames.ora nor bother our DBA to create a
> link for me (it will take forever to wait...).
>
> Anyone knows a convenient way to do it ? Any suggestion is welcome !

Using hardcoded ip adresses is not recommended. As the *database server* is handling database links there is *NO WAY AT ALL* you can do this *WITHOUT* involving your DBA. Developers usually never plan anything, so why do you think you have to wait?

Regards

Sybrand Bakker
Senior Oracle DBA Received on Wed Jan 23 2002 - 11:08:40 CET

Original text of this message