22
Views
3
Comments
External databases

while working with external database Inside Outsystems applications can we able to use functions created on external databases, views created and stored procedures created?

2025-03-19 01-45-51
Sandeep Kumar Kolli

Hi @Priya Naveen,

If your question is whether we can trigger the stored procedure/VIEW which is created in External DB, then short answer is Yes.

You can use the below syntax to trigger the SPROC.

/* %LogicalDatabase%=GetLogicalDatabase({tablename}) */

EXEC [dbo].[SPROC] @PARAMETER

Regards,

Sandeep

2024-12-02 13-16-47
Vipin Yadav

Hi Priya Naveen,

You can use objects from an external database in OutSystems but with some limitations.

Stored procedures and complex database logic can be consumed using Integration Studio, where they are exposed as Server Actions and then used in Service Studio. Views can also be consumed (read-only) and functions usually need to be wrapped inside a view or stored procedure.

This forum link explains how to execute stored procedures in OutSystems and should help you:
how-to-execute-stored-procedures

Thanks,
Vipin Yadav

2025-11-19 06-14-01
Miguel Verdasca
Champion

Hi Priya,

When you connect an external database using Integration Studio or Database Connections, OutSystems allows you to:

  • Use database views. Views can be exposed as read-only entities and queried normally from OutSystems.

  • Call stored procedures. Stored procedures are supported and are the recommended approach for complex logic that must remain in the external database.

However:

  • Database functions are not directly supported as first-class elements. You can’t map a database function the same way you map a table or a view. If you need to use a function, the usual approach is to wrap it inside a view or stored procedure and then consume that from OutSystems.

So, in practice:

  • Tables → supported

  • Views → supported (read-only)

  • Stored procedures → supported

  • Functions → use via views or stored procedures


This applies to supported external databases such as SQL Server and Oracle.


To sum up, yes. In OutSystems, you can use database views, stored procedures, and functions defined in external databases. They are exposed through Database Connections / Integration Studio and can be consumed as actions or entities. Support depends on the database type and requires proper permissions on the external DB. 


Official OutSystems documentation:


Best, Miguel

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