c# - is it possible to fetch data from multi dbs through one connection request -
I have to work on this poorly designed DB where a new set of data was installed by adding a new DB on the server is. So I have to get data from Multi DBS, I wonder if there is any way to get all the data in the group through a connection? I am using C #.
(On one side: is it possible to influence the design? What database schema names are designed. .)
This is sometimes possible (for example in SQL Server by using database.schema.object
notation, or even server. Database.schema.object
), but I do not recommend it because the same approach will not be suitable for all usage cases, and it breaks many best practice-related guidelines. I strongly believe that only suggests to generate a database connection string, I might like, or more specific types using.
If you are worried about having too much open connections, then you can disable the pooling on the dynamic connection (but then you have to handle the connection management, I personally have to leave the pooling. I'll try that I can not prove that there is a problem).
Comments
Post a Comment