PDA

View Full Version : Running a stored procedure that updates a static table



walker121
30th April 2010, 10:10 AM
I have a problem where:

A user wants to specify when a table gets updated on demand. Can this be achieved?

The SP executes, and you get no errors returned, but somehow when you check, no updates / inserts or deleted happened?

anil.kumar
30th April 2010, 11:29 AM
Are you using commit inside proc ?

walker121
30th April 2010, 12:21 PM
no we are not using commit. Only Begin and End at the beginning and end of the SP

anil.kumar
30th April 2010, 12:37 PM
This might be the reason as we don't call commit when queries are executed using exec so proc should take care of commit.

walker121
30th April 2010, 12:59 PM
the proc runs inside sql server management studio as expected.

anil.kumar
30th April 2010, 01:42 PM
Management studio might be calling commit automatically when proc done. IN BI+ query are not supposed to change data so we don't call commit at all.

walker121
30th April 2010, 02:10 PM
so i am guessing the only work-around to this issue is using a dummy ETL process ?