This discussion is archived
5 Replies Latest reply: Mar 12, 2013 2:15 PM by Christian Erlinger RSS

pinging ip's with oracle developer 10g

newbi_egy Explorer
Currently Being Moderated
db and dev 10g rel2 ,
hi all,
i want to ping some ip's through a form built with oracle developer 10g rel2 ,
- i have two choices here ,
-there is an application can ping a lot of ip's automatically , it has options to load a file in which ip's are stored , and another option to save the result into a .csv file ,
so i am searching for a way to control that application , i want a way to do these tasks through a button on my form :
1- open that application .
2 -load the ip's .
3- save the result to a .csv file .
4- transferring the .csv data to a block on my form . -- and this is the simple step which i can do individually , but i do not know how to deal with the steps previously mentioned .


2- the second choice is to open the os command prompt through a button , and ping through it , but the problem is the result would not be displayed in columns , and i do not know a way to load the result into a block on the form.


if you could help me with any of these choices , or if you have another one , i would appreciate that .

thanks in advance
  • 1. Re: pinging ip's with oracle developer 10g
    Christian Erlinger Guru
    Currently Being Moderated
    Points 2-3 have to be done within your pinging application. I don't know what it is; if it is a commercial solution ask support on how to do that; if it is open source you might ask the developers etc.

    cheers
  • 2. Re: pinging ip's with oracle developer 10g
    newbi_egy Explorer
    Currently Being Moderated
    thanks man for you reply ,
    but
    is not there any other solution ? , a package for pinging ? or subprogram ? ,

    i heard that utl_tcp can do this ? and one of it's functions or procedures like open connection func ?

    thanks
  • 3. Re: pinging ip's with oracle developer 10g
    Christian Erlinger Guru
    Currently Being Moderated
    i heard that utl_tcp can do this ? and one of it's functions or procedures like open connection func ?
    If you heard it from somewhere why didn't you go ahead and try it yourself (maybe look it up in the documentation fist) and see if it suits you instead of posting incomplete informations on what/how you want to do?!?
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/u_tcp.htm

    utl_tcp will establish a connection to a specific port; if you are sure you have an application answering on a specific port (e.g. SMB should be available on most windows hosts: http://en.wikipedia.org/wiki/Server_Message_Block) it might suit you. However; if the database server resides in a different network then your clients this might not be what you want. There are other options like java beans, using the java importer,...

    cheers
  • 4. Re: pinging ip's with oracle developer 10g
    newbi_egy Explorer
    Currently Being Moderated
    i've tried to use it like it is in the example : , i used only the first two parameters
    DECLARE
      c  utl_tcp.connection;  -- TCP/IP connection to the Web server
    BEGIN
      c := utl_tcp.open_connection(remote_host => 'www.acme.com',
                                   remote_port =>  80);  
    end ; 
    by the way , before i posted the thread , i've tried it , but i faced problems while executing it , that's why i asked if it is
    suitable for me or not .

    when i execute it by the above code , the engine tells me that "procedure successfully completed , but without any result .

    2- if you could tell me what does "remote_port" means , because i posted the number in the example as it is .
    i do not know what is port ?

    3- do you know about a jave bean can do my requirements ?

    thanks a lot
  • 5. Re: pinging ip's with oracle developer 10g
    Christian Erlinger Guru
    Currently Being Moderated
    I suspect there is nothing running on port 80 (a HTTP Server by default).

    http://en.wikipedia.org/wiki/Port_%28computer_networking%29

    I don't know about a ready to use java bean, either you google for it, or you build it on your own.

    cheers

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points