automated test on sql code check in

We are using the  red gate to checking the code .I need to do a validation to verify that no print statements are hanging out there on the sql code .Please guide


  • Hi @jscaria

    Thank you for reaching out on the Redgate forums regarding your code validation request.

    Unfortunately, there isn't a way directly through SQL Change Automation to check for code like this.

    It may be possible using SQL Test / t-sqlt as a way to do these checks as part of a deployment pipeline.

    I had a look at their existing tests but couldn't see one specifically for your requirements however it may be a possibility to create your own custom test

    If wanting to investigate this angle further I would suggest the t-sqlt community site - or stackoverflow page -

    Jon Kirkwood | Technical Support Engineer | Redgate Software
  • Hi @jscaria - I'm Jonny - one of the PM's for our DevOps product. We're working on an improved code analysis capability so I'm interested to learn a bit more about what you're doing.

    Could you tell me a bit more about the use case around detecting print statements, please?
  • jscariajscaria Posts: 3 New member
    some times we see that print statement are checked into the repository and want to put a check on the code  to find and replace it .Do we have some mechanism to do this validation
  • Thanks - this might seem like a daft question, but I'm interested in how the print statements come to be added in the first place, and what problem occurs if they stay in there? 

    If we can understand this then it will help us design the best mechanism for solving the problem.
  • jscariajscaria Posts: 3 New member
    in prod it created unnessory record and create issues to the product
Sign In or Register to comment.