How can we help you today? How can we help you today?
Matthew Flatt
The ERASEFILES_REMOTE option is only available in the command line at this point. More information can be found in the help file under : The SQL Backup Toolkit>Toolkit Syntax>The BACKUP Command / comments
The ERASEFILES_REMOTE option is only available in the command line at this point. More information can be found in the help file under : The SQL Backup Toolkit>Toolkit Syntax>The BACKUP Command
0 votes
Hi Bryan, Thank you for your post into the forum. I have created the following script which will restore the latest full backup of a database. The script will not find the backup file if it has been moved from the original primary location, it will also overwrite the existing database. The script is as follows : DECLARE @SQL VARCHAR(1000) DECLARE @restorestring VARCHAR(1000) DECLARE @exitcode INT DECLARE @sqlerrorcode INT SELECT @SQL = b.physical_device_name FROM msdb..backupmediafamily b WHERE b.physical_device_name = ( SELECT TOP 1 b.physical_device_name FROM msdb..[backupset] a INNER JOIN msdb..backupmediafamily b ON a.[media_set_id] = b.[media_set_id] WHERE a.[database_name] = 'WidgetDevEmpty' AND a.TYPE = 'D' ORDER BY a.backup_start_date DESC ) SET @restorestring = '-SQL "RESTORE DATABASE [WidgetDevEmpty] FROM DISK = ''' + @SQL + ''' WITH RECOVERY, REPLACE" -E' EXEC MASTER..sqlbackup @restorestring, @exitcode OUTPUT, @sqlerrorcode OUTPUT IF ( @exitcode <> 0 ) OR ( @sqlerrorcode <> 0 ) BEGIN RAISERROR ( 'SQL Backup job failed with exitcode: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode ) END You will need to swap the WidgetDevEmpty database with your database name, feel free to edit and adapt the script to your needs. Please let me know if this is useful. / comments
Hi Bryan, Thank you for your post into the forum. I have created the following script which will restore the latest full backup of a database. The script will not find the backup file if it has be...
0 votes
Hi Chris, Thus far the build has only been needed for machines running Windows Server 2008 and SQL Server 2008 CTP/RC0. Hope this helps / comments
Hi Chris, Thus far the build has only been needed for machines running Windows Server 2008 and SQL Server 2008 CTP/RC0. Hope this helps
0 votes