How is your experience with the OutSystems Community?
26
Views
3
Comments
how we can create store procedure in outsystem studio without using integrationstudio
Application Type
Reactive

Hi All, 

kindly help me to create store procedure using outsystem service studio if possible to share oml so please share so i can understand step by step implementation.


Thanks

2023-12-26 10-35-28
OutSystems Neo
Staff
AI Generated

You can’t create a stored procedure from Service Studio when your database is the OutSystems Cloud database.

Here’s how it works in OutSystems 11:

  1. Creating stored procedures

    • On OutSystems Cloud:
      You cannot create stored procedures in the OutSystems-owned database. This is a platform limitation. [[Advanced Topics > Views and Stored Procedures > Integration Limitations and Deployment<https://www.outsystems.com/help/servicestudio/11.0/]]
      Also confirmed in the forum:

      “You cannot create store procedures in OutSystems database in a cloud infrastructure.” [[How to create a stored procedure in the MSSQL which is hosted in Outsystems' cloud?<https://www.outsystems.com/forums/discussion/]]

    • On on-premises installations:
      Technically you can create stored procedures directly in the OutSystems DB using SQL Server Management Studio (or Oracle tools), but it’s not recommended because the platform can’t manage or deploy them for you. [[Advanced Topics > Views and Stored Procedures > Integration Limitations and Deployment<https://www.outsystems.com/help/servicestudio/11.0/]]
  2. Recommended pattern instead of stored procedures When possible, implement logic in OutSystems:

    • Use Aggregates/Advanced SQL for data logic.
    • Use Server Actions for business logic, transactions, and reuse. This keeps everything under platform control (lifecycle, deployments, security, logs, etc.).
  3. If you must use stored procedures There are two common options, depending on where the procedure lives:

    A) Procedure in an external DB (SQL Server/Oracle)

    • Create the stored procedure directly in the external database (SQL Server Management Studio / Oracle tools).
    • In OutSystems:
      1. Create an Extension in Integration Studio that connects to that external database. [[Advanced Topics > Views and Stored Procedures > Using Views and Stored Procedures via Extensions<https://www.outsystems.com/help/servicestudio/11.0/]]
      2. Implement a C# method that:
        • Opens a connection to the external DB (using the connection defined in the extension).
        • Executes the stored procedure (e.g., SqlCommand.CommandType = CommandType.StoredProcedure).
        • Returns any output (if needed).
      3. Publish the Extension and reference it from your OutSystems app.
      4. Call that Extension action from a Server Action/Screen Action.

    For Oracle, there are Forge components to help call stored procedures. [[Oracle Stored Procedure Simple<https://www.outsystems.com/forums/discussion/]]
    For SQL Server, you can also call stored procedures using SQL queries or extension code. [[Advanced Topics > Views and Stored Procedures > Using Views and Stored Procedures via Extensions<https://www.outsystems.com/help/servicestudio/11.0/]]

    B) Procedure in the OutSystems DB (on-prem only)

    • Create the stored procedure manually in the OutSystems DB using SQL Server Management Studio.
    • Make sure the OutSystems runtime user has execute permissions on that procedure. [[Store Procedure in Outsystems<https://www.outsystems.com/forums/discussion/]]
    • In your OutSystems module:
      • Use an Advanced SQL and call it like:
        EXEC dbo.MyStoredProcedure @MyParam
        
      • Map parameters in the Advanced SQL node.
    • Be aware:
      • Platform can’t track or deploy that procedure to other environments automatically.
      • Any database changes must be manually replicated.
  4. About OML sharing / step‑by‑step Because the platform doesn’t support creating stored procedures in the OutSystems Cloud DB, there’s no OML that shows “create stored procedure from Service Studio” — that flow simply doesn’t exist.
    The closest possible OML example would only show:

    • An Extension action wrapping a stored procedure call (for an external DB).
    • Or an Advanced SQL node executing an existing stored procedure (on-prem).

    You can follow the official step‑by‑step guide for calling stored procedures via Extension and SQL: [[Advanced Topics > Views and Stored Procedures > Using Views and Stored Procedures via Extensions<https://www.outsystems.com/help/servicestudio/11.0/]] and [[Oracle Stored Procedure Simple<https://www.outsystems.com/forums/discussion/]]

If you describe your specific use case (what the stored procedure should do), I can help you design the equivalent implementation directly in OutSystems, or outline the exact SQL/Extension steps you’d need.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2026-07-23 14-34-51
Nuno Reis
 
MVP

Hello.

Service Studio is to develop in OutSystems, not to do database development.

Stored Procedures are a database thing (and depend a lot on the database) and need to be created in the database, by DBAs.

2021-01-01 09-23-30
Michael de Guzman
Champion

Hi @ritu kushwaha ,

Nuno is right. Maybe give us a bit more context on why you need to create the stored procedure?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.