Batch processing - programmatic processing
geblack
Posts: 3
Is there, could there be a way to beautify the layout on all stored procedures contained within a database either programmatically from an external application (preferred for automated build purposes) or in a batch command from the Management Studio interface? We have many (over 3000) stored procedures in our app and manually reformatting them would not be an option.
Comments
There is no command that would do this for your whole database, however, if you have SQL Compare, you can compare the database with an empty database, and use lay out on the generated script. This will create "create statements". (you could turn them to alter statements by creating this schema in the empty database, and then syncing the schema with the original, once again using SQL Compare). On the other hand, since you can save lay out options, and can distribute these, the database can be migrated stored procedure by stored procedure when you modify them (it is slow I agree, therefore I will keep your request in mind when designing the next version).
Regards,
Andras
Red Gate Software Ltd.
I'm evaluating the product, and was surprised to see that I couldn't just 'tag' the SPs I wanted to do, rather than open each one individually as is the case.
That issue aside - I like it!
But once you have all existing sps formated you only need to handle new or changed sps. It would be nice if it was possible to run the code from a DDL trigger?
Would actually like to see command line ability to pass in options set file and name of text file to format. That would allow me to format my gazillions of source code.
If command line or api is already available, please inform me, as I could not find reference to either.