Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Script to restore red gate backups automatically from a folder. Expand / Collapse
Author
Message
Posted Friday, February 26, 2010 1:43 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 12:33 PM
Points: 21, Visits: 321
Thank you Sarabpreet for your response. However, I'm on SQL2000.
Also, I found a way to get the logical and physical name for the database file and the logfile.

use dbname
sp_helpfile

I'm getting close.
Post #873690
Posted Friday, February 26, 2010 1:46 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 12:33 PM
Points: 21, Visits: 321
Thank you Sarabpreet for your response. However, I'm on SQL2000.
Also, I found a way to get the logical and physical name for the database file and the logfile.

use dbname
sp_helpfile

I'm getting close.
Post #873691
Posted Tuesday, September 20, 2016 8:31 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 3:31 PM
Points: 2,270, Visits: 3,117
How to include the "stats and Replace" options?



EXECUTE master..sqlbackup '-SQL
"RESTORE DATABASE [ABCD] FROM DISK = ''D:\backup\file.sqb''
WITH RECOVERY
, MOVE ''abc_1'' TO ''F:\MSSQL\Data\as.mdf''
, MOVE ''abc_1_log'' TO ''G:\MSSQL\Logs\2_log.ldf''"'
--, Stats = 10
--, Replace'





Thanks.
Post #1819192
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse