We are looking to retire old data in out Oracle warehouse.
To give a very simplified overview, a proposal was suggested to develop a process using PL SQL Stored Procedures that, given source/dest table, etc., parameters, use the Oracle ALL_TAB_COLUMNS view to construct a target table that mirrors the source table.
If the dest table exists from a previous run, the proposed solution includes comparing the current schema of the source table to the target (archive) table and, if differences are found, bringing the tables into sync. I am sure that limitations in the proposed functionality exist, but while the spec appeared to be pretty ambitious in this area, I doubt if they were going to re-write Red Gate's SQL Compare utility in PL-SQL.
I guess I have two questions.
1) Is PL/SQL really the right language to use for such a task. To me, stored procedures are used for quick-in and quick-out data operations and complex logic belongs what I would consider a more fully functional client language such as C# or some other .NET language. I anticipate a 10,000-line, poorly indented single stored procedure and I cringe at having to review it. I know Oracle SP/Pkgs need not be that way, but, for some reason, our developers tend to be less modular when using PL\SQL than when writing in .NET . I would welcome your recommendations and reasons for your choice.
2) Are there Oracle utilities (I think we are on 10g) that can be utilized for archiving purposes? Does anyone have any suggest advise?
I'll up vote any non-repeated worth while comment offered.
Thx.