Home » RDBMS Server » Networking and Gateways » extract tnsnames.ora path using SQLPlus (Oracle 10g, Solaris 10)
extract tnsnames.ora path using SQLPlus [message #503674] Tue, 19 April 2011 00:20 Go to next message
reym21
Messages: 241
Registered: February 2010
Location: Philippines
Senior Member

Good day!

We are preparing a script for purposes of cold backup.
We have already listed the Oracle binary files except for
the tnsnames.ora and the password file.

Can someone help me show tnsnames.ora path using SQLPlus?

Thanks in advance.
Re: extract tnsnames.ora path using SQLPlus [message #503675 is a reply to message #503674] Tue, 19 April 2011 00:38 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
You Can`t.
As it will reside on both client and Server side of the Database.
You can find the path @ %ORACLE_HOME%\network\admin\

You can have one chance.

execute the following ...
step 1) Using SQL*PLUS
select '&_connect_identifier' from dual;
SQL> select '&_connect_identifier' from dual;
old   1: select '&_connect_identifier' from dual
new   1: select 'SATYA' from dual

'SATY
-----
SATYA


Step 2
go to command prompt and type tnsping <result of the step 1>
ex: sql> ! tnsping satya


Just tried to help you.

Good luck

Sriram
Re: extract tnsnames.ora path using SQLPlus [message #503676 is a reply to message #503675] Tue, 19 April 2011 00:39 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
By looking into it one more time ...
Quote:
We are preparing a script for purposes of cold backup.


Do you really need this for cold backup ?

Sriram
Re: extract tnsnames.ora path using SQLPlus [message #503679 is a reply to message #503676] Tue, 19 April 2011 00:45 Go to previous messageGo to next message
reym21
Messages: 241
Registered: February 2010
Location: Philippines
Senior Member

Thanks for this info.

Actually, one of our outsourcers recommend inclusion of tnsnames and password file.

Again, thank you very much!




Re: extract tnsnames.ora path using SQLPlus [message #503689 is a reply to message #503679] Tue, 19 April 2011 01:01 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Though: if there is more than one Oracle software product installed on your computer, there's a good chance that you'll have multiple TNSNAMES.ORA files. Which one do you need? One of them? All of them? Some of them?

Moreover: \network\admin is the default location. TNSNAMES.ORA can be located anywhere (mine is, for example, in "c:\oralib" directory (MS Windows)). Its location can be defined by the TNS_ADMIN environment variable, so all my Oracle products use that TNSNAMES.ORA (and not the ones located in their \network\admin directories).

So, consider that fact as well.
Re: extract tnsnames.ora path using SQLPlus [message #503701 is a reply to message #503689] Tue, 19 April 2011 01:29 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Ofcourse But if you ping the TNS Entry it will give you the path no matter where it resides...

Sriram
Re: extract tnsnames.ora path using SQLPlus [message #503702 is a reply to message #503701] Tue, 19 April 2011 01:36 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Right; didn't read your message carefully enough, sorry. TNSPING will display it under "Used parameter files".
Previous Topic: Database gateways vs Transparent gateways
Next Topic: Problem to connect from client to server
Goto Forum:
  


Current Time: Fri Mar 29 07:02:08 CDT 2024