0

I am not a SQL developer, but I have a bit of SQL that is longer and more complex than my usual query/update. It is not a stored proc (policy thing).

(The code reads some state into variables, selects some data into temp tables, and performs some updates and deletes. There are a few loops to perform the deletes in small batches, as not to fill the transaction log.)

If I were writing code in Java I could create some test data and step through the method to watch the data being manipulated. Are there any tools that DB developers use to debug their code in a similar fashion?

Victor Grazi
  • 13,263
  • 13
  • 53
  • 85
  • 2
    You can use sql management studio, [this article](http://www.dataversity.net/debugging-complex-sql-queries/) may also help you. – Purple Haze Aug 17 '17 at 12:27

1 Answers1

1

You haven't provided any details on how your SQL is being processed, eg:

  • is your application submitting SQL batches to ASE? perhaps as a looping construct submitting prepared statements? [if so, you'll likely have a better chance of finding a debugger for your application; otherwise, add some print/select statements, perhaps based on a debug variable being set]

  • is your application submitting a (large) SQL batch to ASE? [if so, you may be able to use ASE's sqldbgr utility to step through your SQL code; you can find more details about ASE's sqldbgr in the ASE Utility Guide]

markp-fuso
  • 8,786
  • 2
  • 8
  • 24