Executing PL/SQL procs from migration tool.

View: New views
5 Messages — Rating Filter:   Alert me  

Executing PL/SQL procs from migration tool.

by camelContext :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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:

   := . ( % ;


Re: Executing PL/SQL procs from migration tool.

by Clinton Begin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...
For additional commands, e-mail: user-java-help@...



Re: Executing PL/SQL procs from migration tool.

by Clinton Begin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...> 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@...
For additional commands, e-mail: user-java-help@...




Re: Executing PL/SQL procs from migration tool.

by Jeff Butler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...> 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@...>
> 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@...> 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@...
>>> For additional commands, e-mail: user-java-help@...
>>>
>>
>
>

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


Re: Executing PL/SQL procs from migration tool.

by camelContext :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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