If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Perl and the DBI > With out perl DBI module

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-17-08, 00:17
Srezee Srezee is offline
Registered User
 
Join Date: Apr 2008
Posts: 2
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
Reply With Quote
  #2 (permalink)  
Old 04-19-08, 13:11
sco08y sco08y is offline
Registered User
 
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?
Reply With Quote
  #3 (permalink)  
Old 05-09-08, 02:03
Srezee Srezee is offline
Registered User
 
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..
Reply With Quote
  #4 (permalink)  
Old 05-11-08, 00:22
sco08y sco08y is offline
Registered User
 
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?
Reply With Quote
  #5 (permalink)  
Old 01-27-09, 13:00
sonu2die4 sonu2die4 is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On