简体   繁体   中英

.NET report getting data from both MSSQL and Oracle

We are using SQL Server 2016 and Oracle 11g (in the process of upgrading to Oracle 12c) . I'm not a .NET developer; therefore, examples will be very helpful.

Our developers are trying to combine data from both MSSSQL (in-house applications) and Oracle (ERP systems) to create a report in .NET (so just reading from both databases). The developers are adamant they need to install Oracle client on the server hosting MSSQL.

From the security perspective (surface area exposure), we are encouraged to minimize surface area exposure as much as possible. And I found a possible way on this blog . And this blog that seems to suggest creating a function as connection string.

Questions:

  1. Is there not an option in .NET (array, etc) to hold data from either MSSQL and / or Oracle in memory for comparison (using employee id) with another database?
  2. Since it's only a read, is it an overkill to have full Oracle client installed on the server?
  3. How are the experts here if you need to pull data from both DBs?

Thank you.

At some point a machine will have to have the Oracle client. I don't know of a way to connect to Oracle without it.

I can think of two ways to do this. You can link Oracle tables directly in SQLServer. I presume you can then use the SQLServer dialect to query the Oracle table. I'm sure there is a performance penalty for this, especially if joining across RDBMSes.

A second option is to have some sort of table on your SQLServer that has a copy of the Oracle data. Depending on how much data there is or whether or not you retain it, it could be faster than querying the linked table with a join. It could be a permanent table or a temp table. You'll still need to query the Oracle machine and this done as needed or on a schedule.

If you have very little data, you may not even need a table.

You could also have another machine that performs the query of the Oracle DB and moves the data to SQLServer. You wouldn't need the Oracle client on your SQLServer, but on that machine.

我将研究构建在与MSSQL服务器不同的服务器上运行的Windows服务,该服务将利用托管Oracle客户端按计划从Oracle到MSSQL服务器的ETL数据,以使您的.NET报告可以从一个位置访问报告数据,即您的MSSQL服务器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM