473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Replicate

Can I "replicate" from a flat file which changes, but is not a part of
a formal database?

Nov 12 '05 #1
6 2645
Stanley Sinclair wrote:
Can I "replicate" from a flat file which changes, but is not a part of
a formal database?


At first glance, I'd say you can do that using a table function that
presents the file as table to DB2. However, you have to be able to provide
the necessary change data for the CD/CCD tables so that replication knows
which changes did occur and need to be propagated to the target systems.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2
RdR
The flat file not having a logging mechanism will not have a basis on what
changed. I am thinking, what if you define a nickname in DB2 pointing to
that flat file and try to replicate using Data Propagator that View, one
limitation though is changes should occur in the view. If changes occur
outside DB2 or in the flat file iteself, changes will still not be captured.

Another alternative is just to "refresh" the table every so often, and maybe
use a timestamp field as your where clause so that it only extracts data
with certain timestamps (but you will need to write code that changes that
timestamp like where system time is between time1 and time2). This will sort
of be an incremental "extract" extracting data based on timestamp that was
not yet extracted. This might still be resource intensive though because it
will read the whole table everytime it "extracts" data.

RdR

"Knut Stolze" <st****@de.ibm.com> wrote in message
news:d0**********@fsuj29.rz.uni-jena.de...
Stanley Sinclair wrote:
Can I "replicate" from a flat file which changes, but is not a part of
a formal database?
At first glance, I'd say you can do that using a table function that
presents the file as table to DB2. However, you have to be able to

provide the necessary change data for the CD/CCD tables so that replication knows
which changes did occur and need to be propagated to the target systems.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena

Nov 12 '05 #3
RdR wrote:
The flat file not having a logging mechanism will not have a basis on what
changed. I am thinking, what if you define a nickname in DB2 pointing to
that flat file and try to replicate using Data Propagator that View, one
limitation though is changes should occur in the view. If changes occur
outside DB2 or in the flat file iteself, changes will still not be
captured.


If you use nicknames or table functions in that scenario doesn't really
matter. The change data is what you need to provide for DB2 Replication.
A full refresh would be an option, too.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #4
RdR
Hi Knut,

What if I define a nickname pointing to that flat file then define the
nickname in Data Propagator? I think the CDC tables and Prunning tables will
be created when you define the nickname in DPROP and any changes done in
DB2, the changes will be sent to the CDC tables during the capture/apply
process. Of course if the change was done outside DB2 it will not be
captured but if the changes are done in DB2 on the nickname, then the change
should go to the CDC tables if that nickname is defined in Data Propagator
as a table to be replicated. I will try this again.

Thanks,

RdR
"Knut Stolze" <st****@de.ibm.com> wrote in message
news:d0**********@fsuj29.rz.uni-jena.de...
RdR wrote:
The flat file not having a logging mechanism will not have a basis on
what
changed. I am thinking, what if you define a nickname in DB2 pointing to
that flat file and try to replicate using Data Propagator that View, one
limitation though is changes should occur in the view. If changes occur
outside DB2 or in the flat file iteself, changes will still not be
captured.


If you use nicknames or table functions in that scenario doesn't really
matter. The change data is what you need to provide for DB2 Replication.
A full refresh would be an option, too.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena

Nov 12 '05 #5
RdR wrote:
Hi Knut,

What if I define a nickname pointing to that flat file then define the
nickname in Data Propagator? I think the CDC tables and Prunning tables
will be created when you define the nickname in DPROP and any changes done
in DB2, the changes will be sent to the CDC tables during the
capture/apply process.
For replication from Informix/Oracle sources, that's absolutely correct.
But in those cases, DB2 Replication (Data Propagator) will also create
triggers on the Oracle/Informix table to populate the CCD table with the
change data. Of course, this can't be done in the same way for external
files.

Note that I haven't tried if you could actually register a nickname that
points to an external file as replication source.
Of course if the change was done outside DB2 it
will not be captured but if the changes are done in DB2 on the nickname,
then the change should go to the CDC tables if that nickname is defined in
Data Propagator as a table to be replicated. I will try this again.


I don't think so. An operation on a nickname is simply passed to the
wrapper and that wrapper sends it on to the remote source. The wrapper
will transform the operation as is needed, i.e. the Oracle wrapper will
build a proper Oracle SQL statement and execute that one.

And you cannot define a trigger on a nickname. The manual says that a
trigger must be defined on "a base table or an alias that resolves to a
base table". So you need some external mechanisms anyway.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #6
RdR
Hi Knut,

You are right, cannot use a non-relational data source such as a flat file
with DPROP (tried replicating a view of the flat file as a nickname). I
discovered further that even if it is defined as a nickname, cannot do
inserts, updates, deletes on a nickname that is originally a non-relational
source (such as a flat file). Seems like a full refresh will be the clearest
option. I will however try to do incremental refreshes by putting a where
clause based on a flag (after a refresh is done, I will change a flag say a
'Y' to an 'N' so the next refresh, I will use this as a flag) or be more
creative using a timestamp field. The Select - Where combiniations supports
non-relational sources.

Thanks,

RdR
"Knut Stolze" <st****@de.ibm.com> wrote in message
news:d0**********@fsuj29.rz.uni-jena.de...
RdR wrote:
Hi Knut,

What if I define a nickname pointing to that flat file then define the
nickname in Data Propagator? I think the CDC tables and Prunning tables
will be created when you define the nickname in DPROP and any changes done in DB2, the changes will be sent to the CDC tables during the
capture/apply process.


For replication from Informix/Oracle sources, that's absolutely correct.
But in those cases, DB2 Replication (Data Propagator) will also create
triggers on the Oracle/Informix table to populate the CCD table with the
change data. Of course, this can't be done in the same way for external
files.

Note that I haven't tried if you could actually register a nickname that
points to an external file as replication source.
Of course if the change was done outside DB2 it
will not be captured but if the changes are done in DB2 on the nickname,
then the change should go to the CDC tables if that nickname is defined in Data Propagator as a table to be replicated. I will try this again.


I don't think so. An operation on a nickname is simply passed to the
wrapper and that wrapper sends it on to the remote source. The wrapper
will transform the operation as is needed, i.e. the Oracle wrapper will
build a proper Oracle SQL statement and execute that one.

And you cannot define a trigger on a nickname. The manual says that a
trigger must be defined on "a base table or an alias that resolves to a
base table". So you need some external mechanisms anyway.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena

Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Glynn Johnson | last post by:
I understand that there is no way to upload multiple files using ASP and COM+ without having multiple form elements like <input type='file'>. I also understand that there is no way to...
3
by: jaekim | last post by:
Hi. I am wondering if it is a good idea to replicate sql server db files using frs. I don't really know how the frs works, so does frs replicates the whole database from time to time or just...
2
by: db2group88 | last post by:
we are using db2 udb v8.2 Express edition on windows 2003,we use third party vendor software to help replicate one server to another. Production server has three instances, each instances has one...
0
by: Paul Hobbs | last post by:
Hi All, I am trying to replicate the functionality of the HTML FileField control. I can use it just fine to prompt a user to browse to a file, and it retrieves the full path just fine. I can...
0
by: Paul Hobbs | last post by:
Hi All, I am trying to replicate the functionality of the HTML FileField control. I can use it just fine to prompt a user to browse to a file, and it retrieves the full path just fine. I can...
1
by: mg | last post by:
Is there a way to replicate the GAC on a win2003 server to another similar server? We are currently using DFS to replicate files, and I do not see how to use DFS to replicate the GAC. -- mg...
0
by: ntech | last post by:
Hello, i have successfully installed Pgpool-II in linux but i need to know how to replicate databases using it. i dont understand the steps provided in different sites. so, can anyone help me to...
2
by: idioteque | last post by:
Hi everyone, I don't have a lot of experience in database management, but I'm trying to replicate a database that is currently being used on a live website. I'd like to replicate it so that our...
5
by: Tom P. | last post by:
I have a bunch of colors as preferences in my application (Title color, text color, border color, etc...). I'd like the option to copy a color from one parameter to another by dragging the first...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.