Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to register SP automatically on the database. Expand / Collapse
Author
Message
Posted Monday, October 07, 2013 5:28 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 3:52 AM
Points: 131, Visits: 248
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!!
Post #1502088
Posted Monday, October 07, 2013 6:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:51 AM
Points: 14,788, Visits: 27,264
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
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1502102
Posted Monday, October 07, 2013 7:37 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:51 AM
Points: 14,788, Visits: 27,264
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
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1502131
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse