I want to take a consistent snapshot of an Oracle database that is constantly being updated by a TIBCO DB Adaptor.
Typcially TIBCO updates a bunch of tables at once, and then COMMITs. If I traverse through all the tables, taking a snapshot once a day, then I could grab data from table A before the commit, and from table B after the commit - but if A and B have a relationship, then they will no longer match properly.
Is "SET TRANSACTION READ ONLY" the way to go?
e.g.
COMMIT
SET TRANSACTION READ ONLY
SELECT * FROM A WHERE A.ADB_UPDATEDDATE > TODAY()-1
SELECT * FROM B WHERE B.ADB_UPDATEDDATE > TODAY()-1
etc.
COMMIT
(TODAY syntax might not be correct, not important!)
Or is there something better that I can do?
I'm an idiot when it comes to databases so even obvious advice would be appreciated...
-B
EDIT: Thanks all for the suggestions, I'll let you know what my team decide to go for.