Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: This statement has exceeded the maximum number of recompilations

$
0
0

We've just found the issue.

 

The proc was being called from a proc which had set the isolation level to 0.

The definition of the table SystemLog is simple enough (just int's and varchar's).

 

On SP122 we get no issues and on SP132 we get the error.

Have I missed something in the new features list for SP132. Why is this feature useful ?

 

Try this..

 

create procedure LogSystem

(  @SpName varchar(32),@Logtype char(1),@Message  varchar(255), @Message2  varchar(255) = null )

as

begin

     set transaction isolation level 0

 

    insert into SystemLog

    (   Timestamp, SpName, NestLevel, Uid, Logtype, Hostname,

        ProgramName, HostProcess, Ipaddr, Message, Message2

    )

    select  getdate(), @SpName, @@nestlevel - 1, uid, @Logtype, hostname,

            program_name, hostprocess, ipaddr, @Message, @Message2

    from    master..sysprocesses

    where   spid = @@spid

end


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>