Quantcast
Channel: Red Gate forums: SQL Backup 7
Viewing all articles
Browse latest Browse all 713

RE: Restore multiple databases in the same job

$
0
0
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?

Viewing all articles
Browse latest Browse all 713

Trending Articles