Backup stored procedures,views,user defined functions from a db

  • Hi all!

    Is there a way to backup/dump all stored procedures, views, user defined functions and also triggers (if possible) from a database in MSSQL 2000?

    In fact I want to move all stored procedures, views, user defined functions and triggers from one database to another.

    The databases have the same structure but contain different data.

    Thanks

  • You can script all the database objects (including tables if you wanted to). Right-Click on the database, go to All Tasks > Generate SQL Script and follow the instructions from there.

  • Thanks very much!

  • You can use how to check last updated stored procedures by below queries..

    SELECT name

    FROM sys.objects

    WHERE type = 'P'

    AND DATEDIFF(D,create_date, GETDATE()) < 7

    select name,create_date,modify_date

    from sys.procedures

    order by modify_date desc

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply