Hi All,
My Requirement is I need to split the data into Active which holds the current day's data and On-line history data which should contain the history. I need to perform this on daily, weekly and Monthly basis. I also have reports accessing this data any point of time. Can anyone help me in the best way to do this.
I am using DB2 database.
Suneeth--
Active and On-line History Tables
Moderators: chulett, rschirm, roy
suneeth,
your requirements are to write a simple DataStage job that does this. You would write a job that takes an input stream through a transform stage which would use constraints to direct the flow to two output streams, one for your current data and one to the on-line history. Both of these would reside in your DB2 tables (accessed through the DB/2 stage or a ODBC conneciton). On the face of it a simple process, though no doubt there are additional constraints, perhaps you can explain.
your requirements are to write a simple DataStage job that does this. You would write a job that takes an input stream through a transform stage which would use constraints to direct the flow to two output streams, one for your current data and one to the on-line history. Both of these would reside in your DB2 tables (accessed through the DB/2 stage or a ODBC conneciton). On the face of it a simple process, though no doubt there are additional constraints, perhaps you can explain.
Re: Active and On-line History Tables
Arnd,suneeth wrote:Hi All,
My Requirement is I need to split the data into Active which holds the current day's data and On-line history data which should contain the history. I need to perform this on daily, weekly and Monthly basis. I also have reports accessing this data any point of time. Can anyone help me in the best way to do this.
I am using DB2 database.
Suneeth--
Thanks for the reply. Writing the data into two tables is good suggestion. My concern is we are duplicating the data. I am thinking abt using the bulk load which will load the data into History table and delete the data from the active table. Does this work or you have better solution.
Suneeth--
suneeth - your approach sounds like what most of us would do; but it is difficult to know the details specific to your actual situation.
Am I correct in assuming that you are only trying to archive older data in the same form as your original tables? If so, why not look at doing it at a database level - partitioning your tables based on date; then any archiving can be done by the DBA without actually having to move any data...
Am I correct in assuming that you are only trying to archive older data in the same form as your original tables? If so, why not look at doing it at a database level - partitioning your tables based on date; then any archiving can be done by the DBA without actually having to move any data...