Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL 2005 - validate SPs and Functions in batch
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01443399
Message ID:
01443420
Vues:
25
>>>>Question: Hi
>>>>
>>>>I want to create a stored procs that will validate all the stored procs and the Functions (and maybe views) to ensure they are still valid. I need to return the result of this validation in a resultset.
>>>>
>>>>How can I loop through those objects, check the validity of the syntax and retrieve the result?
>>>>
>>>>An example of what I want to catch is if a table have one of its column removed, I want to find all the Stored Procs that will fail. Please don't tell me to use the "Check Dependency" button as I need to do it in batch.
>>>
>>>Check this thread on MSDN http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/7eec668a-969e-4fcc-ad49-bbe2a02519cf - I think it will stir you in the right direction.
>>
>>
>>Thanks for your answer but that doesn't help me. It analyze the a query but my SPs are not simple queries.
>
>I understand, but can you pass SP code there?

If you are talking about the answer provided, it is returning the list of valid schemas and objects used by the query. That doesn't tell me if there are some that are not recognized.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform