# Gateway Event Scripts - Stored Procedure

**URL:** <https://forum.inductiveautomation.com/t/gateway-event-scripts-stored-procedure/37345>\
**Category:** Ignition\
**Tags:** ignition80, scripting\
**Created:** [August 4, 2020, 6:33am UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-stored-procedure/37345 "2020-08-04T06:33:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lbuckley](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@lbuckley](https://forum.inductiveautomation.com/u/lbuckley)\
**Post date:** [August 4, 2020, 6:33am UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-stored-procedure/37345/1 "2020-08-04T06:33:14Z")

</div>

Hi there,

Is it possible to execute stored procedures in a gateway event script on tag change?

Thanks,  
Liam

---

<div class="post-metadata">

**Author:** ![mpoulsen921](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@mpoulsen921](https://forum.inductiveautomation.com/u/mpoulsen921)\
**Post date:** [August 4, 2020, 6:49am UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-stored-procedure/37345/2 "2020-08-04T06:49:03Z")

</div>

Hi,  
I would definitely say that it is possible.  
You can either call the stored procedure with the system.db.createSProcCall() and then the system.db.execSProcCall() or you can have the stored procedure call in a named query and then call the named query with system.db.runNamedQuery().

I haven’t tried it myself though, but can see the functions are available in he Gateway Tag Change Scripts.

Mathias
