mardi 24 février 2015

Validate many SQL statements for correctness


I have about 150 reports generated from SQL statements. These reports are saved independently from the server. Some generated from sprocs, some from table-valued functions, but mostly just SQL statements.


Now the server goes through a big refactoring of tables and sprocs. And I need a way to validate that all the reports are still running, as it is possible the changes will break the reports.


One way to validate that all the reports are valid - run them and lookout for errors.


The problem - some of the reports are very heavy and include aggregation of of many tables with many joins with millions of records.


Is there a way to validate SQL statements without actually executing them?


I'm working with SQL Server 2008 and have ability to apply C# processing to the statements. Ideally I'd like a way to validate the reports often and without much effort, i.e. 10 times a day. So making a schema-only copy of DB is not an option.





Aucun commentaire:

Enregistrer un commentaire