Linked Server vs. Database Connection from Service Center

Linked Server vs. Database Connection from Service Center

  

Hello,

I hope you are all doing well, I have a question about DB connections.

I see in my Service Center that is possible for me to create a Database Connection. After that, I can go to Integration Studio and connect to it through an extension. 

If I create a Linked Server directly in SQL Server application I can also use it to make an extension in Integration Studio.

My question is: If I create the Database Connection in Service Center, will OS physically create a Linked Server in my SQL Server? If not, what does it do?

What is the best option? Or is the same in terms of performance?


Thanks in advance,

Vincent Colpa

I'm fairly certain that Outsystems is just creating a standard client connection to the SQL server rather than a linked server. From a practical purpose there isn't a huge amount of difference between the two with the exception that linked servers allow you to do things such as cross server joins (for example https://stackoverflow.com/questions/70455/cross-server-sql?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa ) however these aren't really recommended due to the memory and performance issues and I don't think Outsystems lets you mix external and internal tables in aggregates anyway so even with a linked server it would only be extensions that could use it. 

Simple connections are easier to maintain so unless you want to talk between your two databases at a very low level such as creating stored procedures that link between the two databases or doing cross server  joins I would stay with a standard connection.

Hello, I am asking this because right now we have one application using Outsystems and that application as a connection to a SQL Database.


Now we want to migrate a c# application to our Outsystems environment and we would like to keep the database that is also in c#.


If I go right now to Service Center, in Database Connections I dont see any connection. My connection is configured on the server in an application from Outsystems called Outsystems Configuration Manager or something like that.


So you say that, If I had a new 'Database connection' in Service Center, Outsystems will directly connect to it? I wont need to create a linked server to access a second database?


Thanks a lot in advance,

Vincent Colpa

You don't need to create a linked server but you will need to access the database via external entities in an extension. Not hard to do and is covered in the Outsystems documentation

https://success.outsystems.com/Documentation/10/Extensibility_and_Integration/Integrate_with_an_External_Database


Hey John Williams,

thanks a lot for answering, my only issue was that the Database Connection from the Service Center would physically create a Linked Server you see? But if it does directly connect to the database it is a good thing.

Then I must create an extension to connect to it just like I do for the linked servers yes that I understand.

As you told I won't be able to join table from both databases but It will be much more performant than using a Linked Server right??

I can even use both... 

If I need to do cross joins between DB's I use the linked servers for the tables I need.

If I only need to get info from the DB I use the connection that I created in Service Center,

maybe this would be the best option, right?


Thanks a lot, mate

Cheers,

Vincent Colpa

Are you using on premise Outsystems or Cloud? If Cloud then you can't create a linked server from Outsystems to External anyway, External to Outsystems does work. For On premise you can do whatever you like :)

That being said, yes unless you have a specific reason for it stay with a direct connection instead of a linked server its simpler, and simpler means less to worry about later.