Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dewacorp.alliances
452 Posts |
Posted - 2006-10-31 : 22:36:55
|
[code].........DBCC CHECKDB('NOFINTR01_dbCorpCardData_2001_DRT') WITH NO_INFOMSGSRETURN(0)EXIT_ERROR: SET @sMsg = CAST(GETDATE() as varchar(20)) + ' - ' + OBJECT_NAME(@@PROCID) + ', - ' + @sMsg RAISERROR('%s (%d)', 16, 1, @sMsg, @iErr) RETURN(@iErr)GO[/code]Hi allI've created this stored procedure for restoring backup and at the end of it, I do the DBCC stuff.So if there is an error on that DBCC will it return 0 anyway which means successfull? Is there anyway to trap this (if the DBCC return an error) and go to EXIT_ERROR ?Thanks |
|
|
|
|