ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Karnstedt <alexander_ber...@gmx.de>
Subject Re: New external task: Incanto
Date Sun, 12 Jun 2005 20:39:06 GMT
At 21:43 12.06.2005, you wrote:
>Can I execute Oracle Procedures???
>Wohlgetan!

Gern geschehen!

Yes it's possible to execute PL/SQL blocks as well as shutdown, startup 
command's etc.

An example ...
The following task checks whether the database is in ARCHIVELOG mode and 
otherwise produces a build exception.

   <ora:sqlplus
      logon="sys/syspswd@localdb as sysdba"
      silent="true"
      failonerror="true">
      <![CDATA[
       WHENEVER SQLERROR EXIT SQL.SQLCODE
       declare
         v_logmode varchar2(30);
       begin
         select log_mode into v_logmode from v$database;
         if v_logmode != 'ARCHIVELOG' then
           raise_application_error (-20101, 'ARCHIVELOG not enabled');
         end if;
       end;
       /
     ]]>
   </ora:sqlplus>

Regards,
Alexander 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message