By "PL/SQL" I'm assuming you're using Oracle. AFAIK, there's no (existing) way to implement Oracle's SQL extensions through DBI, although you have a couple options:

  1. Write a stored procedure that does what you need and returns some status data in Oracle, then call that stored procedure from Perl DBI.
  2. Attempt to access the unique Oracle commands through DBI and DBI::func() (which can be used to call driver-specific functions). However, the functionality you need will have to be built into DBD::Oracle. Check the manpage.
  3. Track down OraPerl and see if you can use that, although from what I've heard no one uses that now. Read this, maybe.

If nothing else, hit Google and start searching like mad. =)

Disclaimer: I've only worked Oracle as a programmer, not a DBA, and we weren't doing anything outside of your usual SELECT, INSERT, etc. So it's possible that I am missing the whole point, here.

Update: After perusing around for a bit, it appears that you can indeed use PL/SQL with DBI. You just prepare a query with the proprietary commands and send that through DBI to Oracle. Works the same as a standard query. I'm impressed. {g}


In reply to Re: PL/SQL code and Perl by mwp
in thread PL/SQL code and Perl by toadi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.