Calling Sql from Perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • itzaps
    New Member
    • Sep 2007
    • 5

    Calling Sql from Perl

    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
    Recognized Expert Contributor
    • Jul 2007
    • 973

    #2
    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.

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      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

      Comment

      • rohit05
        New Member
        • Oct 2007
        • 5

        #4
        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!
        Last edited by numberwhun; Oct 18 '07, 07:14 PM. Reason: edited for language

        Comment

        • numberwhun
          Recognized Expert Moderator Specialist
          • May 2007
          • 3467

          #5
          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

          Comment

          Working...