How to register SP automatically on the database.

  • Hi,

    I am using Sql server 2008 R2,

    In my Organisation,we daily restore the Database.

    We need to give the daily reports from this updated newly restored database.

    For this cuurently,after restoring the database,we register(create) all the Stored Procedure,on this server and execute the SP.

    My requirement is,once the database is restored, all the SP should be automatically created on the restored database.

    Or any othe alternative to do this.

    Please help me how to do this, this is urgent for me.

    Thanks in Advance!!

  • What about just putting the create procedure scripts into the same set of commands that restore the database. Assuming you're using SQL Agent to automate the execution of the restores, you can add a second step that runs the procedure scripts.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • This question was asked in more than one forum. Please put all further responses on this post since two of us have already responded over there.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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