SQL Server generating  Scripts for Stored procedures and Views,functions

Posted on 2011-05-10
Last Modified: 2012-05-11
Hi ,

I want to generate scripts from  database for Stored procedures, views and functions..
As we have many Stored procs and views its very difficult to generate scripts one by one... on right clicking SP and copying the script.
instead want to generate a scripts which can generate scripts for all SP's and Views,Functions.
Please provide  valuable suggestions.
Question by:N_Sri
    LVL 32

    Accepted Solution


    You can use the script wizard

    Right click on the database you want to generate scripts for

    Select Tasks->Generate Scripts...

    Follow the wizard and select the objects you want to script

    Author Closing Comment


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
    This video discusses moving either the default database or any database to a new volume.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the fileā€¦

    755 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

    19 Experts available now in Live!

    Get 1:1 Help Now