Two different database instances

Two different database instances

  
Hi,

Is it possible to have a FrontEnd Server+Deployment Contoller Server connected to two different database instances? I have two applications published in the same platform server, but I would like to connect one application to one database and the other application to a different database (both SQL Server). Is this feasible?

I know that this is possible through the use of Linked Server, but this would mean I would have to develop an Extension to manage this connection.

Ricardo Matos
Hi Ricardo,

I would like to start by asking a question - what motivates this architecture?

To have to applications that run on the same OutSystems server accessing different SQL Server Databases, you can use the SQL Server Integration Services. With this solution you automatically create an integration component to the external database in Integration Studio. You can then use the external tables in your visual models in Service Studio seamlessly. The main benefit when compared with the Linked Server alternative that you propose is the fact that you will not need to maintain database links and, most important, all accesses will be done directly to the external database, meaning that you have much better performance. See the Existing Database integration video to get a clear picture of how this is done with the SQL Server Integration Services or ORACLE Integration Services.

One other option for you might be the Multiple Database Catalogs and Schemas feature introduced in version 5.1. With the Multiple Database Catalogs and Schemas, you can have your different applications in the same OutSystems server with the data model isolated in different Database Catalogs (see the image below). This way, you have the ability to implement tighter database level security and also optimize your database storage.

Read an overview about the  Multiple Database Catalogs and Schemas feature in the What's New in Agile Platform version 5.1 document.
Read a detailed description of this feature in the Multiple Database Catalogs and Schemas technical note.



Kind Regards,

Daniel Lourenço
OutSystems


Hi Daniel,

Thanks for your assistance. It was a great help!

The motivation of this architecture is this: we are setting up an OS environment that will have two different applications, developed by different companies and with very different needs of space and performance. As such, my client wishes to separe the two data repositories in two separated instances. Probably the second solution you pointed out (Multiple Catalogs/Schemas) can be used to achieve this, right?

As for the first solution, using Integration Services, I watched the video and understood how it could be done through the Integration Studio. However, I tried it in another environment we have and when I do "Import Entities from Database", I can only see the main Platform Database Server and a Linked Server. How can I add another database to the list? Does it need the license feature "Microsoft SQL Server Direct Connect" (Allows you to define multiple direct connections to external Microsoft SQL Server databases, exposing its data inside the platform as regular Entities. The platform will monitor the external connection health)? How can it be done?

Thank you once again.

Best Regards,
Ricardo Matos
Hello Ricardo,

If you need to isolate the two application data models, in fact the Multiple Database Catalogs and Schemas will be a much better option. Please bare in mind that this feature is only available in the Enterprise Edition of the OutSystems platform. By using this option you will have the full modelling and database management capabilities of the platform (in Service Studio) and the isolation that you are looking for at the same time. Particularly, you will be able to design and publish changes to your Entities in Service Studio. 

With the SQL Server Integration Services you have the ability to integrate with an external data model (that lies in an external ORACLE or SQL Server) - this is an integration solution. In this scenario, the data model has to be managed outside the OutSystems platform and you can simply automatically generate an integration component to that data model. In fact, to use the SQL Server Ingration Services you have to have this add-on licensed for your infrastructure.

Kind Regards,

Daniel Lourenço
OutSystems