Solved

SQL Query Validator for SQL Server

Posted on 2014-02-21
4
358 Views
Last Modified: 2014-03-21
Hi Experts,

     I am looking for a SQL query validator (free or paid) for SQL Server/SQL Management Studio.  Basically I am looking for a tool that makes sure that all referenced objects (tables (both actual and temp), columns, functions, sprocs, user defined types, etc.) in every sproc/function/etc. exist in the database.

     We have been wasting a lot of time lately due to people removing/changing the spelling of objects and we don't find out about it for a while.  Is there a tool that you all know of that I could run on a database/or at least a script and validate it against an existing database to verify the above things?  I need the tool to work on MS SQL Server '08R2 or higher

Thanks!
0
Comment
Question by:axnst2
  • 2
4 Comments
 
LVL 40

Assisted Solution

by:Kyle Abrahams
Kyle Abrahams earned 250 total points
ID: 39878007
http://download.red-gate.com/HelpPDF/DatabaseUnitTestingWithRedGateSQLTools.pdf

Looks like redgate's Sql tools may be a bit of overkill, but depending on your project size may also help you out.  I wouldn't say it does the validation per say, but it can use the data generator to fire off the stored procs .  . . and even gives you validation against it.
0
 

Author Comment

by:axnst2
ID: 39878087
Yes, I am not looking to spend days on setting this up.  I'm just looking for a simple like 'Check' button
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 39878103
I had the same problem in the past. I solved half of it. Check http://emoreau.com/Entries/Articles/2010/02/Validating-database-objects.aspx
0
 

Author Closing Comment

by:axnst2
ID: 39945461
Thanks
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

939 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now