on 01-18-2016 11:29 AM
Hi all,
how can I debug a stored procedure step by step in SAP IQ 16.0 SP 08?
Best regards,
Stefano
Hi,
How about using a MESSAGE statement in the middle of the procedure ?
For example,
begin
declare @sid_l int ;
select @sid_l = 10 ;
insert jerry(sid) values(@sid_l) ;
commit ;
select sid into @sid_l from jerry where rowid(jerry) = 1 ;
message ' SELECTED' ,@sid_l type info to LOG ;
insert jerry(sid) values(@sid_l) ;
commit ;
end
You can change the destination of the message.
And, you can also put it anywhere you want to check values of some variables in a procedure.
Please refer to a manual page below for details about the MESSAGE statement.
MESSAGE Statement - Reference: Statements and Options - SAP Library
Best regards,
Jerry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am already using "MESSAGE" as a workaround to step-by-step debug.
What I am looking for is a debug mode in order to execute step-by-step, step-into a generic SP without changing it with PRINT or MESSAGE statements.
I hope it is available in IQ 16 like in previous IQ 12 version throught Sybase Central which are actually no more available.
Do you have any idea?
Thank you,
Stefano
I'm trying to catch an exception in my Java application, which is being thrown from my stored procedure.
I was expecting to get the message I wrote in the "MESSAGE" statement. But I'm getting:
SQL Anywhere Error -156: Invalid expression near 'CUSTOM_EXCEPTION'
com.sybase.jdbc4.jdbc.SybSQLException: SQL Anywhere Error -156: Invalid expression near 'CUSTOM_EXCEPTION'
Inside the procedure I have the following message statement:
MESSAGE 'Error in procedure: ', SQLSTATE, 'SCI.NameProcedure' to client;
SIGNAL CUSTOM_EXCEPTION;
what should I do to get the "Error in procedure:" on the java try/catch?
Thanks in advance,
Vinícius.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.