Ed,
how about:
tnsping {sid} 1000 > ping.lis
will tnsping the {sid} 1000 times, with the result being placed in a file
created named ping.lis
changing it to
*** file name pingtest.bat
tnsping %1 1000 > ping.lis
Can be executed as pingtest {sid}
Another way to do this using a loop within the .bat file follows.
This would execute the tnsping command 1000 times:
*** file name pingtest1.bat
echo TnsPing Test > ping.lis
echo date /T >> ping.lis
for /L %I in (1,1,1000) do tnsping r816 >> ping.lis
And a third way, using goto looping:
*** file name pingtest2.bat
@rem
@rem Loop through a counter searching for the RunDaily.{seq} file
@rem
@set /A ctr=0
:again
echo TnsPing Test > ping.lis
echo date /T >> ping.lis
set /A ctr=ctr+1
if (%ctr%) == (1000) goto endloop
tnsping r816 >> ping.lis
goto again
:endloop
hope these help.
Tom Mercadante
Oracle Certified Professional
-----Original Message-----
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 2:37 PM
To: Multiple recipients of list ORACLE-L
Can anyone help me with a simple .bat script for NT that will run a TNSPING
against a certain connect descriptor and write the results to a file. I
need to have the TNSPING run for say 1000 loops. Once complete, I can
search through the file for errors.
Thanks,
Ed
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mercadante, Thomas F
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).