I know you can right-click on the selected VIEW/SP and select CREATE-TO, and you can just copy the generated script. But this has to be done via a SQL Client.

What I wish to do is that whenever there is an update on the VIEW/SP by my vendor, I would like to perform the backup of the affected VIEW/SP before running the ALTER VIEW/SP command from my vendor. I wish to do this using script rather than human interface so as to reduce the risk of human errors.

Can anyone help?