Solved

SQL Query Validator for SQL Server

Posted on 2014-02-21
4
355 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 39

Assisted Solution

by:Kyle Abrahams
Kyle Abrahams earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

743 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

12 Experts available now in Live!

Get 1:1 Help Now