I am trying to script this and it is not working, keeps saying I have an extra '
SET @SQL = ' EXECUTE master..sqlbackup ''-SQL "RESTORE DATABASE ' + @sitename +
' FROM DISK = ''''D:\SQLVMDEV10\' + @sitename + '\FULL\*.sqb'''' WITH MOVE DATAFILES TO ''''G:\VirtualRestore'''' , SOURCE = ''''' + @sitename + ''''' LATEST_FULL WITH MAILTO = ''ed.watson@swfwmd.state.fl.us',
RECOVERY, DISCONNECT_EXISTING,
MOVE LOGFILES TO ''''G:\VirtualRestore'''' , REPLACE , CHECKDB = ''ALL_ERRORMSGS, DATA_PURITY, EXTENDED_LOGICAL_CHECKS'', DROPDB''', @exitcode OUT, @sqlerrorcode OUT" '' '
Any ideas?
SET @SQL = ' EXECUTE master..sqlbackup ''-SQL "RESTORE DATABASE ' + @sitename +
' FROM DISK = ''''D:\SQLVMDEV10\' + @sitename + '\FULL\*.sqb'''' WITH MOVE DATAFILES TO ''''G:\VirtualRestore'''' , SOURCE = ''''' + @sitename + ''''' LATEST_FULL WITH MAILTO = ''ed.watson@swfwmd.state.fl.us',
RECOVERY, DISCONNECT_EXISTING,
MOVE LOGFILES TO ''''G:\VirtualRestore'''' , REPLACE , CHECKDB = ''ALL_ERRORMSGS, DATA_PURITY, EXTENDED_LOGICAL_CHECKS'', DROPDB''', @exitcode OUT, @sqlerrorcode OUT" '' '
Any ideas?