ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From camelContext <praveen.krish...@citrix.com>
Subject Re: Executing PL/SQL procs from migration tool.
Date Tue, 20 Oct 2009 20:38:35 GMT

I tried modifying the end of line delimitter but that doesnt work well. For
now i figured that i can create the stored proc in the DB and call it from
my script. Something like

call my_stored_proc();

Thanks
Praveen


Jeff Butler-2 wrote:
> 
> Can you configure the end of line delimiter?  If so, the user could
> choose some unused character for this kind of situation.
> 
> Jeff Butler
> 
> 
> On Mon, Oct 19, 2009 at 9:13 PM, Clinton Begin <clinton.begin@gmail.com>
> wrote:
>> PS:  you could use full line demarcation and use 'GO' or something like
>> SQL
>> Server...
>> But otherwise we'll need some creative thinking to figure out how to deal
>> with the double ;
>> Clinton
>>
>> On Mon, Oct 19, 2009 at 8:12 PM, Clinton Begin <clinton.begin@gmail.com>
>> wrote:
>>>
>>> The double ; will cause problems.  I'm not sure how I would demarcate
>>> that... any ideas?
>>>
>>> On Mon, Oct 19, 2009 at 7:18 PM, camelContext
>>> <praveen.krishnan@citrix.com> wrote:
>>>>
>>>> Hi All,
>>>>
>>>> I am using iBatis migration tool to create my service schema. My
>>>> service
>>>> schema demands that i execute couple of PL/SQL procedures for some
>>>> permission related things  (post schema creation).
>>>>
>>>> I tried to execute the following from one of my scripts
>>>>
>>>> BEGIN
>>>> oracle.grants.everything('SUBSCRIPTPKRISHNAN','SUBSCRIPTPKRISHNANAPP',
>>>> TRUE);
>>>> END;
>>>>
>>>> But when executing the migrate statement, i get the following error
>>>>
>>>>
>>>> ========== Applying: 20091009120309_create_base_schema.sql
>>>> =====================
>>>> --  create base schema
>>>> -- Migration SQL that makes the change goes here.
>>>> --EXECUTE IMMEDIATE 'BEGIN
>>>> oracle.grants.everything(\'SUBSCRIPTPKRISHNAN\',\'SUBSCRIPTPKRISHNAN\',
>>>> TRUE) END'
>>>> BEGIN
>>>> oracle.grants.everything('SUBSCRIPTPKRISHNAN','SUBSCRIPTPKRISHNANAPP',
>>>> TRUE)
>>>> END
>>>> Error executing: BEGIN
>>>> oracle.grants.everything('SUBSCRIPTPKRISHNAN','SUBSCRIPTPKRISHNANAPP',
>>>> TRUE)
>>>> END .  Cause: java.sql.SQLException: ORA-06550: line 1, column 86:
>>>> PLS-00103: Encountered the symbol "END" when expecting one of the
>>>> following:
>>>>
>>>>   := . ( % ;
>>>>
>>>>
>>>> ERROR: Error executing command.  Cause:
>>>> org.apache.ibatis.jdbc.RuntimeSqlException: Error executing: BEGIN
>>>> oracle.grants.everything('SUBSCRIPTPKRISHNAN','SUBSCRIPTPKRISHNANAPP',
>>>> TRUE)
>>>> END .  Cause: java.sql.SQLException: ORA-06550: line 1, column 86:
>>>> PLS-00103: Encountered the symbol "END" when expecting one of the
>>>> following:
>>>>
>>>>   := . ( % ;
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Executing-PL-SQL-procs-from-migration-tool.-tp25967912p25967912.html
>>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
>>>> For additional commands, e-mail: user-java-help@ibatis.apache.org
>>>>
>>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Executing-PL-SQL-procs-from-migration-tool.-tp25967912p25982127.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message