Connecting Tech Pros Worldwide Help | Site Map

Calling Sql from Perl

Newbie
 
Join Date: Sep 2007
Posts: 5
#1: Oct 10 '07
Hi,

I want to execute plsql codes from perl script without using the DBI module.
I am abale to connect to Sql.But not able to execute any query
$user= "scott";
$pwd="tiger";
$database = "perltest";
system ("sqlplus $user/$pwd\@$database");

This is my code I am using to connect.
Could anybode suggest me any way to execute plsql blocks
eWish's Avatar
Moderator
 
Join Date: Jul 2007
Location: Arkansas
Posts: 900
#2: Oct 10 '07

re: Calling Sql from Perl


Why don't you want to use the DBI? I would recommend reading the source code of the DBI module(s) and see how it is done. If you can't understand the source code then I would think that it is safe to say you should stick to using the DBI.

Connecting to the a database without the DBI is for the more advanced user. Even then it doesn't make sense not to use it IMO.
numberwhun's Avatar
Site Moderator
 
Join Date: May 2007
Location: New Hampshire
Posts: 2,567
#3: Oct 10 '07

re: Calling Sql from Perl


Quote:

Originally Posted by eWish

Why don't you want to use the DBI? I would recommend reading the source code of the DBI module(s) and see how it is done. If you can't understand the source code then I would think that it is safe to say you should stick to using the DBI.

Connecting to the a database without the DBI is for the more advanced user. Even then it doesn't make sense not to use it IMO.

Agreed! Even then the experts use DBI because it is one less complicated hassle that they would have to deal with.

Regards,

Jeff
Newbie
 
Join Date: Oct 2007
Posts: 5
#4: Oct 18 '07

re: Calling Sql from Perl


I am right now having a quite similar conflict!

I have no issues with DBI and DBD but since i dont have a C compiler at the sun servers that i have and therefore, i was looking for a solution to use sql in perl without DBI.

any suggestions for me?
I'd like to add that i havent been able to get C compilers installed at my servers since the unix experts here say that it's a security threat? I think that it's #### but can someone suggest me for this bit too. I'd be highly thankful !

pardon me if my perceptions were wrong somewhere!
numberwhun's Avatar
Site Moderator
 
Join Date: May 2007
Location: New Hampshire
Posts: 2,567
#5: Oct 18 '07

re: Calling Sql from Perl


rohit05

I have edited your post for possibly profanity. I know that the word you used was not a true "curse" word, but there may be someone that would get offended. Heck, use a phrase like "I think its bologna" instead of your wording. It will go over better here.

Thanks!

-Moderator
Reply