Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Why domain name appended to database link name?

Re: Why domain name appended to database link name?

From: JustAnotherDBA <burttemp1REMOVE_THIS_at_bellsouth.net>
Date: Sun, 30 Mar 2003 23:42:17 -0600
Message-ID: <TqQha.889$dh2.253@fe07.atl2.webusenet.com>


The init.ora specifies a default domain for the database . This is used to create the default domain of the database (at least at create database time - not sure about after that), which is appended to the end of db links when created.

If the init.ora default domain is different from the sqlnet.ora on the server, you get strange-looking things (strange depends on how you look at it).

I think you can also query a catalog named something like "global_name" to find the database default domain and you can alter it (I think) without a restart.

Note: I wish we were enforcing global_names = true. It sure would make life simpler since database links are not needed, assuming you can (is ok with all apps especially off the shelf ones) use the name of the service in tnsnames.ora as a database link name.

--

"Dino Hsu-®}¶}©ú" <dino1.nospam_at_ms1.hinet.net> wrote in message
news:b66hhq$6o1_at_netnews.hinet.net...

> Dear all,
>
> This seems a simple question, but I am sorry I cannot find the answer from
> document or news posts, yet. If you know where I can find it, please point
> me to, thanks a lot.
>
> I want to create mutual database links for two related databases, say:
> db1: SID=orc1, host=svr, connect string=ecdb_orc1
> db2: SID=orc2, host=svr, connect string=ecdb_orc2
>
> These two databases are connected with SID instead of service_name, but I
> think this doesn't matter.
>
> sqlplusw userid/passwd_at_ecdb_orc1
>
> SQL> show parameter global_name
>
> NAME TYPE VALUE
> ------------------------------------ ------- -----------------------------
-
> global_names boolean FALSE
>
> SQL> create database link ecdb_orc2 connect to userid identified by passwd
> using 'ecdb_orc2';
>
> Database link created.
>
> SQL> select object_name from user_objects where object_type='DATABASE
LINK';
>
> OBJECT_NAME
> --------------------------------------------------------------------------
--
> ----
> ECDB_ORC2
>
> SQL> desc dict_at_ecdb_orc2
> Name Null? Type
> ----------------------------------------- -------- ----------------------
--
> ----
> TABLE_NAME VARCHAR2(30)
> COMMENTS VARCHAR2(4000)
>
> exit
>
> sqlplusw userid/passwd_at_ecdb_orc2
>
> SQL> show parameter global_name
>
> NAME TYPE VALUE
> ------------------------------------ ------- -----------------------------
-
> global_names boolean FALSE
>
> SQL> create database link ecdb_orc1 connect to speed identified by speed
> using 'ecdb_orc1';
>
> Database link created.
>
> SQL> select object_name from user_objects where object_type='DATABASE
LINK';
>
> OBJECT_NAME
> --------------------------------------------------------------------------
--
> ----
> ECDB_ORC1.SVR.DOMAIN
>
> SQL> desc dict_at_ecdb_orc1
> ERROR:
> ORA-02019: connection description for remote database not found
>
> SQL> desc dict_at_orc1
> ERROR:
> ORA-02019: connection description for remote database not found
>
> SQL> desc dict_at_ecdb_orc1.svr.domain
> ERROR:
> ORA-02019: connection description for remote database not found
>
>
> SQL> desc dict_at_orc1.svr.domain
> ERROR:
> ORA-02019: connection description for remote database not found
>
> exit
>
> I have used svr, domain, userid, passwd in place of the real names in the
> above example, but I think that doesn't matter, either. The wierd thing is
> in db2, where I created a database link called 'ecdb_orc1', but I got one
> called 'ecdb_orc1.svr.domain', and I cannot really use it.
>
> Regards,
> Dino
>
>
Received on Sun Mar 30 2003 - 23:42:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US