Tool to query Oracle & SQL server data, store results locally for comparision
I need to check data produced in the data warehouse back to source each day. The data warehouse is data in SQL Server, the source data is in Oracle. When I get to work each day, I run my set of queries in SQL Developer to get records of my expected results from source. At the same time, I kick off my second set of queries in SQL Server to get the comparison results. I visually compare th开发者_如何学Goe SQL Developer and the SQL Server results to determine that the etl and calcs are successful.
This is a rather manual process. ideally, I would like to extract the actual (SQL Server) and the expected (Oracle) results, store them in a table (preferrably a local database on my computer) which can then compared to each other and the comparison results stored to retain history of when the data checks have failed. If I could schedule the extraction at set times, that would be a bonus.
My dilemma: 1) I only have access to create sql queries in SQL Developer and SQL Server Manager; no access to create or write into tables to create views or store stored procedures.
What is the best approach to conducting these checks and what would be the best tool that I can install and run locally on my computer? Any advice will be much appreciated.
You might want to have a look at SQL Workbench
It has a special "SQL" command to compare the data between two tables which can reside in different databases. The output is either a SQL script that updates one table to have the same data as the other, or a XML file that you can process further.
The command is called WbDataDiff. More information can be found in the manual.
精彩评论