Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: script

Re: script

From: Pons <pons_at_gmx.li>
Date: Tue, 28 Jan 2003 11:07:49 +0200
Message-ID: <b15gu9$vfrku$1@ID-172702.news.dfncis.de>


I doing it in another via remote ftp ... I have created batch file batch.bat and placed this inside ECHO OPEN 10.5.1.100 >> junk.ftp
ECHO USERNAME ftp >> junk.ftp
ECHO PASSWORD ftp >> junk.ftp
ECHO CD /var/ftp/incoming >> junk.ftp
ECHO ascii >> junk.ftp
ECHO get installPrep.sh >> junk.ftp
ECHO BYE >> junk.ftp
FTP -s:junk.ftp

When I try to run this i get the following G:\>FTP -s:junk.ftp
ftp> OPEN 10.5.1.100
Connected to 10.5.1.100.
220 bsd.sdcdomain.com FTP server (Version 6.00LS) ready. User (10.5.1.100:(none)):
331 Password required for USER ftp .
530 Login incorrect.
Login failed.

any help

-Pons
pons_at_gmx.li

> > I am gonna switch to new Orcale system with load balance,
> > due to that I have to change the Alias and HOST IP in all
> > tnsnames of my remote users, I do not want to do it manually.
> > I want to write a script to search for tnsnames file in a remote
> > local machines C: and D: and replace it with a new tnsnames,
> > then I am going place this script on my Intranet web page so
> > by double click the script can execute this take automatically
> > and place the file with a new one.
> >
> > any help in this issue.
> >
> > -Pons
> > pons_at_gmx.li
> >
> > old tnsnames
> > ......
> > ora.world =
> > (DESCRIPTION =
> > (ADDRESS_LIST =
> > (ADDRESS =
> > (PROTOCOL = TCP)
> > (Host = A.B.C.D)
> > (Port = 1521)
> > )
> > )
> > (CONNECT_DATA = (SID = COMPANY)
> > )
> > )
> >
> > new alias
> > risc.world =
> > (DESCRIPTION=
> > (load_balance=on)
> > (ADDRESS=
> > (PROTOCOL=TCP)
> > (Host=X.X.X.X)
> > (Port=1521)
> > )
> > (ADDRESS=
> > (PROTOCOL=TCP)
> > (Host=Y.Y.Y.Y)
> > (Port=1521)
> > )
> >
> > (CONNECT_DATA=
> > (SERVICE_NAME=COMPANY)
> >
> > )
> > )

>
>
> And how do you expect Oracle server/Sqlplus/PLSQL to handle this? You
> might want to post it in some scripting language NG like Perl,
> WinBatch etc. But since you are here, I'll take a stab at it.
>
> Approach 1:
> Just the way you want to do it. Write a script which connects to
> client machine, finds correct tnsnames.ora file, replaces the entry.
> Doable but bit of a scripting work. I use WinBatch
> http://www.winbatch.com scripting tool a lot on Windoze and I have not
> seen a more powerfull tool to do stuff like this. A while back I wrote
> a tnsnames.ora parser in Java and Winbatch. The one in Winbatch does
> almost the same thing except replace the entry. Sorry can't share the
> code...company property.
>
> Approach 2:
> Assuming all clients have identical tnsnames.ora files. Write a new
> tnsnames.ora file and put it in everyone's logon script. Next time
> they logon to the network, let the script replace the file.
>
> Approach 3:
> Use TNS_ADMIN system variable to point all client machines to one
> central location where you can have one copy of all configuration
> files (sqlnet.ora, tnsnames.ora) files. No fuss, no hassles. Modify
> one file and all clients use same file to connect.
>
> Take your pick but I personally like Approach 3.
>
> Regards
> /Rauf Sarwar
Received on Tue Jan 28 2003 - 03:07:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US