Can some one help me understand the scenario thats been happening for me
I am creating a lot of Volatile Temp tables in my stored procedure. When Executing the stored procedure i am logging the Activity count of records in a log table so i can see how many records i am inserting in each logical step.
I can see records getting inserted into my volatile table and i am sure I am creating them with ON COMMIT PRESERVE ROWS in my create statements.
If the procedure executes fine i can see the records in the table. But if one of my update query fails due to Error 7547 the volatile table is completely deleted. All my records are gone and i can not see which record is causing my problem. I have to run my procedure again till the point where the update is failing and then select the records to see which record is giving me the problem and fix them...
It would be of a great help if some can help me why this is happening and if there is a way to stop it or correct it in my stored procedure
This happens not only in my SP but also when i run them manually in SQL assitant V 14.0
that's the expected behaviour when the NO LOG option is set, check your DDL and switch it off.