listener.ora, tnsnames.ora

listener.ora, tnsnames.ora

Post by Ivan Andon » Tue, 05 Mar 2002 18:38:02



How can I add entries for new database in listener.ora and tnsname.ora
with command line tool??

I am building Installshield setup for database for Oracle 9.
I can create instance with .bat file using ORADIM, and I can create
the database with SQLPLUS scripts, but I cannot add entries in
LISTENER.ORA and TNSNAMES.ORA

Please HELP!!

Thanks
Ivan Andonov

 
 
 

listener.ora, tnsnames.ora

Post by Howard J. Roger » Tue, 05 Mar 2002 18:44:36


What's wrong with notepad?  All you do is find your existing listener.ora
and tnsnames.ora in ORACLE_HOME\network\admin, and open them up in notepad
and start typing.

Regards
HJR
--
----------------------------------------------
Resources for Oracle: http://www.hjrdba.com
===============================


Quote:> How can I add entries for new database in listener.ora and tnsname.ora
> with command line tool??

> I am building Installshield setup for database for Oracle 9.
> I can create instance with .bat file using ORADIM, and I can create
> the database with SQLPLUS scripts, but I cannot add entries in
> LISTENER.ORA and TNSNAMES.ORA

> Please HELP!!

> Thanks
> Ivan Andonov


 
 
 

listener.ora, tnsnames.ora

Post by Sebastian Reh » Tue, 05 Mar 2002 21:43:56


For TNSNAMES.ORA
you can use the ECHO command to add lines in the ASCII-File

TNSNAMES=c:\orant\network\admin\tnsnames.ora

echo #New Database Comment >>$TNSNAMES
echo SEBASTIAN.world = >>$TNSNAMES
echo   (DESCRIPTION =  >>$TNSNAMES
echo    (ADDRESS_LIST = (ADDRESS = (COMMUNITY =
TCP.world)(PROTOCOL=TCP)(Host=151.1.3.102)(Port=1521)))  >>$TNSNAMES
echo   (CONNECT_DATA = (SID=O10A)))  >>$TNSNAMES

Sebastian


Quote:> How can I add entries for new database in listener.ora and tnsname.ora
> with command line tool??

> I am building Installshield setup for database for Oracle 9.
> I can create instance with .bat file using ORADIM, and I can create
> the database with SQLPLUS scripts, but I cannot add entries in
> LISTENER.ORA and TNSNAMES.ORA

> Please HELP!!

> Thanks
> Ivan Andonov

 
 
 

listener.ora, tnsnames.ora

Post by Ivan Andon » Tue, 05 Mar 2002 23:19:15



> What's wrong with notepad?  All you do is find your existing listener.ora
> and tnsnames.ora in ORACLE_HOME\network\admin, and open them up in notepad
> and start typing.

> Regards
> HJR
> --
> ----------------------------------------------
> Resources for Oracle: http://www.hjrdba.com
> ===============================



> > How can I add entries for new database in listener.ora and tnsname.ora
> > with command line tool??

> > I am building Installshield setup for database for Oracle 9.
> > I can create instance with .bat file using ORADIM, and I can create
> > the database with SQLPLUS scripts, but I cannot add entries in
> > LISTENER.ORA and TNSNAMES.ORA

> > Please HELP!!

> > Thanks
> > Ivan Andonov

You do not understand the situation:

I am building Setup for an Oracle database.
I call ORADIM and SQLPLUS from InstallShield script - I have templates
for .bat files and .slq scripts and when I want to add
programmatically entries for my database in LISTENER.ORA and
TNSNAMES.ORA, I cannot do it.

I must ask 'end user' to open this files and write in it.
This is not good.
This is absurd!
And this is only Oracle!

Thanks
Ivan Andonov

 
 
 

listener.ora, tnsnames.ora

Post by Marcin Goralsk » Wed, 06 Mar 2002 00:31:06




Quote:> This is not good.
> This is absurd!
> And this is only Oracle!

Go for MS then and stop complaining.  And by the way, read some about awk,
sed and similar tools - they also exist on WIN platform, also read about
pipes and streams.

Or, as an alternative, create Your own java.class or VB program or C++
program that would handle this

marcin

 
 
 

listener.ora, tnsnames.ora

Post by tojo » Wed, 06 Mar 2002 02:07:14


InstallShield is perfectly capable of adding lines of text to a text
file. I've done this many times using WISE Setup.




> > What's wrong with notepad?  All you do is find your existing listener.ora
> > and tnsnames.ora in ORACLE_HOME\network\admin, and open them up in notepad
> > and start typing.

> > Regards
> > HJR
> > --
> > ----------------------------------------------
> > Resources for Oracle: http://www.hjrdba.com
> > ===============================



> > > How can I add entries for new database in listener.ora and tnsname.ora
> > > with command line tool??

> > > I am building Installshield setup for database for Oracle 9.
> > > I can create instance with .bat file using ORADIM, and I can create
> > > the database with SQLPLUS scripts, but I cannot add entries in
> > > LISTENER.ORA and TNSNAMES.ORA

> > > Please HELP!!

> > > Thanks
> > > Ivan Andonov

> You do not understand the situation:

> I am building Setup for an Oracle database.
> I call ORADIM and SQLPLUS from InstallShield script - I have templates
> for .bat files and .slq scripts and when I want to add
> programmatically entries for my database in LISTENER.ORA and
> TNSNAMES.ORA, I cannot do it.

> I must ask 'end user' to open this files and write in it.
> This is not good.
> This is absurd!
> And this is only Oracle!

> Thanks
> Ivan Andonov

 
 
 

listener.ora, tnsnames.ora

Post by Yong Hua » Wed, 06 Mar 2002 03:56:15


Or create a workstation-specific file called meonly.txt and
COPY TNSNAMES.ORA+MEONLY.TXT MYTMP
DEL TNSNAMES.ORA
REN MYTMP TNSNAMES.ORA

Or better
TYPE MEONLY.TXT >> TNSNAMES.ORA

Or even better is to use IFILE directive in tnsnames.ora:
IFILE=C:\MEONLY.TXT

Yes, ifile works in tnsnames.ora and listener.ora, not just init.ora.

A minor correction to Sebastian's code: use %tnsnames% instead of
$TNSNAMES under DOS.

Yong Huang


> For TNSNAMES.ORA
> you can use the ECHO command to add lines in the ASCII-File

> TNSNAMES=c:\orant\network\admin\tnsnames.ora

> echo #New Database Comment >>$TNSNAMES
> echo SEBASTIAN.world = >>$TNSNAMES
> echo   (DESCRIPTION =  >>$TNSNAMES
> echo    (ADDRESS_LIST = (ADDRESS = (COMMUNITY =
> TCP.world)(PROTOCOL=TCP)(Host=151.1.3.102)(Port=1521)))  >>$TNSNAMES
> echo   (CONNECT_DATA = (SID=O10A)))  >>$TNSNAMES

> Sebastian

 
 
 

listener.ora, tnsnames.ora

Post by RSH » Wed, 06 Mar 2002 10:22:38


Ivan, you got a perfectly good answer from someone who knows what they are
talking about, specific to the question you asked, and that's more than a
lot of people here ever get.

If you don't like Oracle, you can always have fun with SYBASE,  or Informix
or DB/2 (both owned by IBM now), or whatever you please.

You asked, you were answered; don't go dumping on Oracle because it turns
out the answer isn't a quick, instant easy thing, nor the person that
offered honest help to you who has nothing to gain from it.

Try building an "Installshield" (tm) script for a TOTAL IS/ATHENA database
on CDC NOS and then complain.

The only thing that ticks me off more than people making of others who know
less than they, are people who bite the hand that feeds them when the owner
of said hand is only trying to help.

No wonder USENET is still a pain.

Have a nice day and good luck.

RSH.



> > What's wrong with notepad?  All you do is find your existing
listener.ora
> > and tnsnames.ora in ORACLE_HOME\network\admin, and open them up in
notepad
> > and start typing.

> > Regards
> > HJR
> > --
> > ----------------------------------------------
> > Resources for Oracle: http://www.hjrdba.com
> > ===============================



> > > How can I add entries for new database in listener.ora and tnsname.ora
> > > with command line tool??

> > > I am building Installshield setup for database for Oracle 9.
> > > I can create instance with .bat file using ORADIM, and I can create
> > > the database with SQLPLUS scripts, but I cannot add entries in
> > > LISTENER.ORA and TNSNAMES.ORA

> > > Please HELP!!

> > > Thanks
> > > Ivan Andonov

> You do not understand the situation:

> I am building Setup for an Oracle database.
> I call ORADIM and SQLPLUS from InstallShield script - I have templates
> for .bat files and .slq scripts and when I want to add
> programmatically entries for my database in LISTENER.ORA and
> TNSNAMES.ORA, I cannot do it.

> I must ask 'end user' to open this files and write in it.
> This is not good.
> This is absurd!
> And this is only Oracle!

> Thanks
> Ivan Andonov

 
 
 

listener.ora, tnsnames.ora

Post by Ivan Andon » Wed, 06 Mar 2002 21:45:48


RSH, if I think something is not right, I say it.

I do not complain against the people in this newsgroup.
I don't like the style of doing things in Oracle's way: 'Sell your
database with an administrator included'.

If I wrote to this newsgroup this is only because I spent a week
trying to solve a problem that must be solved by Oracle programmers in
first place.

If someone takes so much money they must try to do the thinks so good
as are they in the other products (MS SQL Server for example) in
administration at least.

And again I want to thank all the guys who answered me and wanted to
help me.

One think I cannot deny to Oracle is that they create work for more
programmers trying to solve the problems their software creates.
Thanks guys!

If someone wants a working lexical parser with normalization support,
tree representation of these files written in InstallShield script
please call me. (Our company may arrange something on this matter ;).

Thank you for your help.

Ivan Andonov

 
 
 

listener.ora, tnsnames.ora

Post by Ganesh Ra » Thu, 07 Mar 2002 18:13:53



> RSH, if I think something is not right, I say it.

> I do not complain against the people in this newsgroup.
> I don't like the style of doing things in Oracle's way: 'Sell your
> database with an administrator included'.

> If I wrote to this newsgroup this is only because I spent a week
> trying to solve a problem that must be solved by Oracle programmers in
> first place.

> If someone takes so much money they must try to do the thinks so good
> as are they in the other products (MS SQL Server for example) in
> administration at least.

Have you used the Enterprise manager of MS Sql Server  !!! ... I have
Worked on Oracle for Quite a Long time and due to unavoidable
circumstances i am sitting in front of this enterprise manager console
.. Which is so dumb and that makes my life more miserable. I agree
that there is a Lot of UI on these products but they fail to achieve
what is actually required.

For instance i am importing data into various tables i am using the
Import data from MMC ... That thing cannot even remeber the place from
where he took the last CSV or the table from which i came thru to the
utility ... Simple things that all Tools these days provide. I was
desperatley searching for a Command Line tool to do this and failed to
get it ... [ Maybe i did not know the name of this] I feel it is more
comfortable to work on Oracle Command Line SQL Ldr then the Import
Data Wizard.

Now u will say we have DTS .. What do i achieve... Every time my file
name changes and all so have to sit and keep clicking next !!!

And oh... Forgot to mention the MMC.exe has voilated Memory Bounds and
is Closing Error... ;-)

Sigh... Life goes On....

Quote:

> And again I want to thank all the guys who answered me and wanted to
> help me.

> One think I cannot deny to Oracle is that they create work for more
> programmers trying to solve the problems their software creates.
> Thanks guys!

What Problems... U will Create Databases in SQL Server thru the
Installation... I have done a Lot Of Installation but no where is the
Oracle Database Created By The Install Script. There should be a DBA
for a Database if not how do u expect to solve the problems u will be
facing during runtime. BTW Does SQl Server Run without any DBA. If the
DBA does not know how to create a Database and Pls ask your clients to
start recv resumes for that post.

Quote:

> If someone wants a working lexical parser with normalization support,
> tree representation of these files written in InstallShield script
> please call me. (Our company may arrange something on this matter ;).

> Thank you for your help.

> Ivan Andonov

Just vented out ... I felt u'r putting False Claims Against oracle.

Regards,
Ganesh R