Asynchronous Stored Procedure Calls

后端 未结 3 472
情深已故
情深已故 2021-01-13 10:24

Is it possible to call a stored procedure from another stored procedure asynchronously?

Edit: Specifically I\'m working with a DB2 database. ­­­­­­­

3条回答
  •  执念已碎
    2021-01-13 10:46

    Executive summary: Yes, if your database has a message queue service.

    You can push a message onto a queue and the queue processor will consume it asynchronously.

    • Oracle: queues
    • Sql Server: service broker
    • DB2: event broker

    For "pure" stored procedure languages (PL/Sql or T-Sql) the answer is no, since it works against the fundamental transaction model most databases have.

    However, if your database has a queuing mechanism, you can use that to get the same result.

提交回复
热议问题