-
I have 2 different servers with Oracle 8.1.7.2 on both.
I have a NT workstation with the same version of Oracle installed.
In my tnsnames.ora, I declare the alias as follow to connect to DB1 on server 1 :
DB1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DB1)
)
)
I can not connect to DB2 doing the same way, I HAVE to add the name of the server in the section SERVICE_NAME, like this :
DB2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME =DB2.server2)
)
)
Any clue why ?
Another question :
In 8i, when you declare an alias with the assistant, now you have to specify wherever you connect to a 8i DB or not.
I can not see any differences made in the tnsnames.ora wherever you select 8i or 8 or 7 as version of the DB.
Then, what does this option do ?
Thanks in advance.
-
Actually, I got confused : one of the 2 server has Oracle 8. And I have to add the name of the server when connecting to the 8i one.
Does it mean that to create an alias to connect to a 8i DB you need to manually change your tnsnames ?
-
I get the same thing sometimes. For some reason, the network_domain found in your sqlnet.ora file sometimes does not get appended to the tnsnames entry in which you will need to add it to your tnsnames entry. I found this behaviour particularly quirky under Linux. You may also want to check how the listener was set up for either instance as well. Does one instance have the Oracle 8 Release 8.0 compatible identification set and the other does not? Some thing to check.
In terms of the 8i setting when creating a new entry - you do not "necessarily" see it in the tnsnames.ora file until you dig deep into it. For example, SID is an Oracle 7 and 8 construct (in the Connect_data portion of the tnsnames.ora file) whereas SERVICE_NAME is an Oracle8i and above setting. This allows you to add things like INSTANCE_NAME (when in an OPS and RAC enviroment), and what not.
HOH
-
Check the listeners are configured in both servers..and please post the error what u are getting while connecting to the 2 nd server.
-
The error when connected was the famous ORA 12514 can not resolve service name.
I have checked few more things and :
- In init file for the DB I have the pb, there is a line with :
service_names = [service].[server's name]
This is the raison why I can not connect if I specify only "service" in my tnsnames.ora.
I guess this is new to 8I.
- by the way, if I change my tnsnames.ora to following, then it works ( with SID instead of SERVICE_NAME).
DB2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = server2)(PORT = 1521))
)
(CONNECT_DATA =
(SID =DB2.server2)
)
)
- Still, I do not know why my server's name is not indicated by itself when using the assistant. I will leave it like this as I can not check everything ( rights on the servers and so on...)
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|