Hi,
I want to issue a restore statement as part of a job so I can restore a
developer server from the production backup. Problem is I wont know the
exact minute the backup set file will have... sometimes its 03 sometimes
04. How can I generate such a statement dynamically without using
xpcmdshell to read the file names?
RESTORE DATABASE [somedb] FROM DISK =
N'\\networkresource\somedir\somedb_db_200705310404.BAK' WITH FILE = 1,
NOUNLOAD , STATS = 10, RECOVERY , REPLACE
MS Sql Server LazyDBA home page