Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Oracle 8.1.7: Changing TNS name configuration (Read 9452 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Oracle 8.1.7: Changing TNS name configuration
13.04.06 at 14:22:20
Changing a TNS name configuration in Oracle 8.1.7
I had to change the computer name of the Oracle database server. This made the TNS name invalid and connections fail with:
ORA-12545: Connect failed because target host or object does not exist.
In this topic I will show you how you can repair the TNS names configuration in Oracle 8.1.7. to overcome this problem.
First locate and view the tnsnames.ora file. It is located in the folder:
Here is the section that describes my database:
ORA817 =
     (ADDRESS = (PROTOCOL = TCP)(HOST = vm-winxp-vs6)(PORT = 1521))
     (SERVICE_NAME = ora817)

You can see I have called the tns name ora817, equally named to the actual service name (database name) of the database itself. The change I need to make is that the database server was renamed from vm-winxp-vs6 to vm-ora817.
I suggest you use the configuration tools provided by Oracle to change the configuration of the TNS name. There may be additional files that need tweaking.
When you installed Oracle a new program group was created in your Start menu: Oracle - OracleHome817. In this group you will find a group called Network Administration. In this group you find a shortcut to the Net8 Configuration Assistant.
If you don't have all these shortcuts, try to locate the following program on your PC:
<<ORACLE_HOME>>\bin\launch.exe "C:\oracle\ora817\network\tools"
When you start the Net8 Configuration Assistant you can choose to change the Local Net Service Name Configuration.
Then select reconfigure to change an existing configuration.
Select the service name (TNS name) from the dropdown list that you want to reconfigure.
Then you need to tell whether it is an Oracle 8.0 or Oracle 7 database service or whether it is an Oracle 8i (or later) service.
Now enter the Oracle service name. In my case this is ora817
Then specify through which protocol you want to connect to it. Usually this is TCP/IP. In my case it is.
In the next step you specify the host name and port number. I leave the port number to the default and type as host name vm-ora817. This is the new name for my machine.
Testing the new configuration, the assistant tells me: ORA-12541: TNS:no listener.
Now we seem to have to change the database listener too!
To this end I restart the Net8 Configuration Assistant and choose Listener Configuration at startup.
I next select the reconfigure option to change the configuration of an existing listener.
From the dropdown, select the listener you want to change. In my case there is only 1 listener called... listener.
In the next page choose the protocol to use. Mine is set to TCP which I leave unchanged.
I press next only to leave the standard port number configured of 1521.
Now I need to do a quick test to test the new configurations. I decided to use the DOS tnsping command. In the Start menu I choose run and type cmd. A DOS window opens where I tested the new service name:
C:\>tnsping ora817
TNS Ping Utility for 32-bit Windows: Version - Production on 13-APR-20
06 14:20:32
(c) Copyright 1997 Oracle Corporation.  All rights reserved.
Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=vm-ora817)(PORT=1521))
OK (80 msec)

Back to top

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1