July 13, 2010 at 7:46 am
How could i know just restore succeeded?
According to this code:
declare
@qStr varchar(512),
@i int
set @qStr = 'RESTORE DATABASE ...'
EXEC @i = sp_executesql @qStr
PRINT @i
Fails....
July 13, 2010 at 8:12 am
thinknight (7/13/2010)
How could i know just restore succeeded?According to this code:
declare
@qStr varchar(512),
@i int
set @qStr = 'RESTORE DATABASE ...'
EXEC @i = sp_executesql @qStr
PRINT @i
Fails....
You're not using standard syntax for the restore operation at all. Here is the full syntax for the restore operation.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 13, 2010 at 8:15 am
I just want to verify restore operation finished successfully? How do i get result of restore with t-sql scripts?
July 13, 2010 at 8:27 am
Use try - catch
The probability of survival is inversely proportional to the angle of arrival.
July 13, 2010 at 8:53 am
Yes it is the correct solution. TRY..CATCH how do i not apply this?
Thanks 🙂
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply