|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Return Status question....I have an EXEC like this and is part of the whole script:
EXEC ('RESTORE LOG NETOX FROM DISK = ' + '''' + '\\10.81.60.2\D$\Des_LogShip\' + @logfiles + '''' + ' WITH DBO_ONLY, STANDBY = ' + '''' + 'D:\LogShip_Undo\undo_LOGNETOX.ldf' + '''') I want to know what the return status whether or not it execute successfully. How do I do that. Thanks, Tomd Can you trying using a variable to specify from where are you restoring?
.... declare @physical_backup_device_name_var varchar(256) set @physical_backup_device_name_var = '\\10.81.60.2\D$\Des_LogShip\' + @logfiles RESTORE LOG NETOX FROM DISK = @physical_backup_device_name_var WITH DBO_ONLY, STANDBY 'D:\LogShip_Undo\undo_LOGNETOX.ldf' if @@error != 0 .... AMB Show quote "tom d" wrote: > I have an EXEC like this and is part of the whole script: > > EXEC ('RESTORE LOG NETOX FROM DISK = ' + '''' + > '\\10.81.60.2\D$\Des_LogShip\' + @logfiles + '''' + ' WITH DBO_ONLY, STANDBY > = ' + '''' + 'D:\LogShip_Undo\undo_LOGNETOX.ldf' + '''') > > I want to know what the return status whether or not it execute > successfully. How do I do that. > > Thanks, > Tomd > |
|||||||||||||||||||||||