Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2008
    Posts
    2

    Unanswered: With out perl DBI module

    Hi ,

    How to write a programme to connect to oracle database without using PERL DBI module. The programme is to calculate ASM disk space in oracle database.plz reply...

    Regards
    srezee

  2. #2
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    How to write a programme to connect to oracle database without using PERL DBI module.

    Any reason why you don't want to use DBI? Do you have the Oracle client installed? Are you connecting to a local or remote server? Which version of Perl? Oracle? What OS and version? Are there other modules you can't install, e.g. IO? Can you shell to other processes?

    The programme is to calculate ASM disk space in oracle database.

    How is it going to do this? Can it simply look at the filesystem, or does it need to execute a stored procedure?

  3. #3
    Join Date
    Apr 2008
    Posts
    2
    The client actually wants not to use DBI module.

    Through ASM disk space i want the total free MB for the disk group name specified in the command line..

  4. #4
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    Do you have the Oracle client installed? Are you connecting to a local or remote server? Which version of Perl? Oracle? What OS and version? Are there other modules you can't install, e.g. IO? Can you shell to other processes?

  5. #5
    Join Date
    Oct 2008
    Posts
    7
    This is a rough framework how you will do it...If you use oracle then this might me the case

    $IPAddress = "10.24.30.1";
    $Login = "root";
    $password = "root";
    $Node = "hostname";

    use Net::Telnet();
    $t= new Net::Telnet (Timeout => 3000 , Prompt => '/[%#\$>?:] $/' );
    $t->open("$IPAddress");
    print "\nConected!";
    $t->waitfor('/login: $/i');
    $t->print($Login);
    print "\nEntered the Username\n";
    $t->waitfor('/assword: $/i');
    $t->print($Password);
    print "\nEntered the Password!\n";
    @output=$t->cmd("export ORACLE_SID=$Node\n");
    print @output;

    Hope it helps
    Vivek

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •