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 |
|
sent_sara
Constraint Violating Yak Guru
377 Posts |
Posted - 2008-07-10 : 03:53:50
|
| Scheduling sp[RBI_Control_sp]:***********When i execute the RBI_Data_Transfer_sp separately "some column not found error is coming".but when i put the sp in rbi_control_sp.Error is not getting updated in status_report table.it gets hanged.can anyone please correct the sp:CREATE procedure RBI_Control_spasbeginset nocount on begin try begin transaction insert into Status_report ( [object_name], row, st_date ) select 'Data Tranfer', 'Inprogress--', getdate() exec RBI_Data_Transfer_sp Update Status_report set row = 'Success', [error_message] = 'No Error', end_date = getdate() where row = 'Inprogress--' commit transaction end trybegin catchrollback transaction Update Status_report set row = 'Failure', end_date = getdate(), [error_message]= cast(error_number() as varchar) + '***' + error_message() where row = 'Inprogress--' end catchset nocount offend |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-10 : 04:03:23
|
| http://www.sommarskog.se/error-handling-II.html |
 |
|
|
|
|
|