<p>Is it possible to call a stored procedure from another stored procedure asynchronously?</p>

<p><strong>Edit:</strong> Specifically I'm working with a DB2 database.
­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>

[{'answer_id': 25506, 'author': 'Mark Harrison', 'author_id': 116, 'author_profile': 'https://Stackoverflow.com/users/116', 'pm_score': 4, 'selected': True, 'text': '<p>Executive summary:  Yes, if your database has a message queue service.</p>\n\n<p>You can push a message onto a queue and the queue processor will consume it asynchronously.</p>\n\n<ul>\n<li>Oracle: queues</li>\n<li>Sql Server: service broker</li>\n<li>DB2: event broker</li>\n</ul>\n\n<p>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.</p>\n\n<p>However, if your database has a queuing mechanism, you can use that to get the same result.</p>\n'}, {'answer_id': 25507, 'author': 'Eric Z Beard', 'author_id': 1219, 'author_profile': 'https://Stackoverflow.com/users/1219', 'pm_score': 1, 'selected': False, 'text': "<p>With MS Sql Server 2005, try the Service Broker and/or CLR stored procedures.  I don't think there's anything built directly into TSQL.</p>\n"}, {'answer_id': 25511, 'author': 'Dana the Sane', 'author_id': 2567, 'author_profile': 'https://Stackoverflow.com/users/2567', 'pm_score': 0, 'selected': False, 'text': '<p>It sounds like you need to put some scheduled jobs in place with Cron (or windows equiv). You could use the initial stored proc call to set some kind of flag in the DB, which is then checked periodically by a cron job. If you need to have a specific delay before the 2nd job executes, you should be able to do that by having the task scheduled by the cron job.</p>\n'}]
['https://Stackoverflow.com/questions/25460', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1704/']