db links not working [message #389820] |
Tue, 03 March 2009 12:27 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mfergi
Messages: 7 Registered: January 2009 Location: Cincinnati, OH
|
Junior Member |
|
|
can create db links, but due to the network administrator changing the domain to include a dash, get a variety of errors that lead back to the illegal character. pasting below some examples. would appreciate any help or thoughts on this.
SQL> select owner, db_link, substr(host,1,20)
2 from all_db_links;
OWNER
------------------------------
DB_LINK
--------------------------------------------------------------------------------
SUBSTR(HOST,1,20)
--------------------
PRODSYS
REMOTE2DEV1.CIN.L-3COM.COM
dev1
SQL> select * from bnftdate@'REMOTE2DEV1.CIN.L-3COM.COM';
select * from bnftdate@'REMOTE2DEV1.CIN.L-3COM.COM'
*
ERROR at line 1:
ORA-01729: database link name expected
SQL> select * from bnftdate@remote2dev1.cin.l-3com.com;
select * from bnftdate@remote2dev1.cin.l-3com.com
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
SQL> select * from bnftdate@"REMOTE2DEV1";
select * from bnftdate@"REMOTE2DEV1"
*
ERROR at line 1:
ORA-02085: database link REMOTE2DEV1.CIN.L-3COM.COM connects to
DEV1.CIN.L-3COM.COM
SQL> select * from global_name;
GLOBAL_NAME
--------------------------------------------------------------------------------
prod.cin.l-3com.com
SQL> select * from bnftdate@REMOTE2DEV1;
select * from bnftdate@REMOTE2DEV1
*
ERROR at line 1:
ORA-02085: database link REMOTE2DEV1.CIN.L-3COM.COM connects to
DEV1.CIN.L-3COM.COM
SQL> create table mfergus as (select * from bnftdate@remote2dev1);
create table mfergus as (select * from bnftdate@remote2dev1)
*
ERROR at line 1:
ORA-02085: database link REMOTE2DEV1.CIN.L-3COM.COM connects to
DEV1.CIN.L-3COM.COM
SQL> create table mfergus as (select * from bnftdate@'REMOTE2DEV1');
create table mfergus as (select * from bnftdate@'REMOTE2DEV1')
*
ERROR at line 1:
ORA-01729: database link name expected
SQL> create table mfergus as (select * from bnftdate@"REMOTE2DEV1");
create table mfergus as (select * from bnftdate@"REMOTE2DEV1")
*
ERROR at line 1:
ORA-02085: database link REMOTE2DEV1.CIN.L-3COM.COM connects to
DEV1.CIN.L-3COM.COM
|
|
|
|
Re: db links not working [message #389980 is a reply to message #389829] |
Wed, 04 March 2009 07:27 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mfergi
Messages: 7 Registered: January 2009 Location: Cincinnati, OH
|
Junior Member |
|
|
global_names = false already. created the link using the same name as the connect string, still no luck using the links. any one else have any ideas? the dash is not by choice, company mandated so will need work around for the invalid character too.
thanks in advance for any help,
m
SQL> create database link "dev1.cin.l-3com.com" using 'dev1.cin.l-3com.com';
Database link created.
SQL> create table mferg as (select * from bnftdate@'dev1.cin.l-3com.com';
create table mferg as (select * from bnftdate@'dev1.cin.l-3com.com'
*
ERROR at line 1:
ORA-01729: database link name expected
SQL> create table mferg as (select * from bnftdate@"dev1.cin.l-3com.com");
create table mferg as (select * from bnftdate@"dev1.cin.l-3com.com")
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name
SQL>
|
|
|
|
Re: db links not working [message #391543 is a reply to message #389829] |
Thu, 12 March 2009 08:50 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mfergi
Messages: 7 Registered: January 2009 Location: Cincinnati, OH
|
Junior Member |
|
|
thanks for the email, but i had already read the documentaion and recreated the links using the naming convention as suggested. still does not work. tnsping does work with same name for both instances. if link used without the " " around the domain name (company mandated number-(dash)-letter part), ERROR at line 1: ORA-01729: database link name expected.
if don't use the " says ERROR at line 1: ORA-12154: TNS:could not resolve service name. anyone with any other ideas? and please keep the sarcasm at a minimum. most people don't appreciate it. i know i need help, and not as experienced as most, but i am trying and would welcome any real assistance. that is why i joined this forum and am posting a question. thanks in advance,
m
|
|
|
|
Re: db links not working [message #391548 is a reply to message #391543] |
Thu, 12 March 2009 08:54 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mfergi
Messages: 7 Registered: January 2009 Location: Cincinnati, OH
|
Junior Member |
|
|
sorry for the typo, meant if DO use the " says ERROR at line 1: ORA-12154: TNS:could not resolve service name. anyone with any other ideas? and please keep the sarcasm at a minimum. most people don't appreciate it. i know i need help, and not as experienced as most, but i am trying and would welcome any real assistance. that is why i joined this forum and am posting a question. thanks in advance,
m
|
|
|
Re: db links not working [message #391563 is a reply to message #391547] |
Thu, 12 March 2009 10:29 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
mfergi
Messages: 7 Registered: January 2009 Location: Cincinnati, OH
|
Junior Member |
|
|
yes, i have read a lot of documentation that states it over and over again -- NO DASHES. however, since it is company mandated, the domain name was decided for me. i have to find a work around to this. using quotes, single and double, i can create the link but cannot get it to work. any ideas?????? would really, really appreciate any help getting this to work.
|
|
|
Re: db links not working [message #391572 is a reply to message #389820] |
Thu, 12 March 2009 10:50 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/136107.jpg) |
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
You have been handed a pig & instructed to teach it to fly.
Good Luck.
Oracle does not know or care what the actual Domain Name (DNS) is.
The string which follows USING is just a pointer used to access the tnsnames.ora file.
It could just as easily be foo_bar.com & work fat, dumb, & happy for you.
Now take a deep breath, relax & explain why the string inside the database must EXACTLY match the results from DNS.
|
|
|