Article
Robert Cemper · May 22 1m read

Debugging Trick with SQL

I'm sure you have met this situation:

  • There is a bug in a System that you can't reproduce yourself locally
  • You need to run a few lines in the affected instance
  • You get full access to System Management Portal
  • But there is just  no terminal, nor console, nor access with Studio, Atelier or VSCode
  • How to run your few lines for testing ???

 

  • Enter SMP / Explorer / SQL tab= Execute Query
    •  
    •  
  • Now create a Stored Procedure with any Code you need
    • There is no limit for complexity. I just do a simple one with a predictable result.
    • CREATE PROCEDURE RUN.ISOS()
       LANGUAGE OBJECTSCRIPT
       {
        For i=1:1:20 write i," > "
        Write "<br>THANKS !"
       }
  • You click EXECUTE and see a new Procedure
    •    
    •  
  • Next, you examine this fresh Procedure and execute it
    •  
    •  
  • Another Execute  activates it
    •  
    •  
  • and this is the result
    •  
  • and as a well-educated specialist, you clean up your environment when you are done  
    • DROP PROCEDURE RUN.ISOS
    •  

I hope that helps you at some future point in time.
Documentation

12
1 199
Discussion (0)0
Log in or sign up to continue