Backup and Restore - 07-01-2004 , 03:26 AM
I have this situation with backup and restore.
I have two instances of sql, sql1 and sql2.
Production server is sql1 and test server is sql2.
I created database maintenance plan that makes full backup every night
I would like to make some kind of job or to add steps to job that was
created with DMplan which will make restore of backuped database to sql2
How can i do this? How can i read which is the last file backuped on
Thanks very much
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Re: Backup and Restore - 07-03-2004 , 08:42 AM
"acko bogicevic" <aconi2002 (AT) yahoo (DOT) com> wrote
create procedure restore_FOO as
declare @backup_file as varchar(255)
select @backup_file=physical_device_name from
nell.msdb.dbo.backupmediafamily where media_set_id in (select
max(media_set_id) from nell.msdb.dbo.backupset where database_name='FOO')
restore database FOO from disk=@backup_file with
move 'FOO_Data' to 'f:\sql_data\FOO_data.mdf',
move 'FOO_Log' to 'e:\SQL_LOGs\FOO_log.ldf',