469,323 Members | 1,560 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

Perl calling a Oracle PL/SQL script

I am new to perl and need help with the following. In perl we are calling sqlplus with a PLSQL Script. In order to do this in PERL we had to do a system call. How do we return a error code from the PLSQL script back to the perl script?
Apr 2 '07 #1
5 8458
KevinADC
4,059 Expert 2GB
You should be using the DBI module to interface with your database.

If you literally mean you are using:

system()

to access the database, there is no way to get back error messages from the database that I know of.
Apr 2 '07 #2
Kevin

If we have a PLSQL script how would we rub this script using the DBI module?
Apr 2 '07 #3
KevinADC
4,059 Expert 2GB
Kevin

If we have a PLSQL script how would we rub this script using the DBI module?

Read the DBI documentation:

http://search.cpan.org/~timb/DBI-1.54/DBI.pm

and you will need the particular driver for PLSQL, you can search for that on CPAN too.

I can't help you with code examples because my experience and knowledge is quite limited in regards to database applications and the DBI module in general.
Apr 2 '07 #4
jonathan184
154 100+
Well you could use the system call because from what you are saying you are running the sqlplus commands, in the plsql code. define the dbms_output error line as a perl variable and run a perl print statement or print to a log or whatever.
Apr 3 '07 #5
KevinADC
4,059 Expert 2GB
Well you could use the system call because from what you are saying you are running the sqlplus commands, in the plsql code. define the dbms_output error line as a perl variable and run a perl print statement or print to a log or whatever.
Sounds like a very plausible suggestion.
Apr 3 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Sandman | last post: by
reply views Thread by Mike Bobbitt | last post: by
4 posts views Thread by Keith | last post: by
2 posts views Thread by James Hull | last post: by
4 posts views Thread by billb | last post: by
reply views Thread by crawfordr | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.