Ramblings of a DBA

Tara Kizer
posts - 166, comments - 835, trackbacks - 75

My Links

Advertisement

News

Subscribe
Search this Blog

Archives

Post Categories

Work

November 2005 Blog Posts

RESTORE stored procedure

The below stored procedure performs a RESTORE of the newest BAK file in the specified directory (@bkpDir).  I recommend putting it into an Admin database (hey just name it Admin!) rather than in master.  ------------------------------------------------------------------------------------------------------ OBJECT NAME         : isp_Restore-- AUTHOR                    : Tara Duggan-- DATE                          : November 3, 2005-- INPUTS                      : @dbName - name to use for the restored database--                                       @bkpDir - full path to the directory where the BAK files exist--                                       @newDataLocation - new location and file name for the MDF, can be NULL--                                       @newLogLocation - new location and file name for the LDF, can be NULL-- OUTPUTS                    : None-- RETURN CODES       ...

posted @ Tuesday, November 08, 2005 1:23 PM | Feedback (11) | Filed Under [ SQL Server - Database Administration ]

Powered by:
Powered By Subtext Powered By ASP.NET