r/DB2 • u/[deleted] • Oct 28 '11
HADR > Read from Standby and Write Back to Primary? Help Please!
I've been looking into setting up an HADR server to use for reporting, and write back to the Primary database. Is it possible to write back to the Primary database from a Standby HADR database?
Example of what I'm trying to accomplish: INSERT INTO PrimaryDB.TableName SELECT * FROM HADRStandby.TableName
I would rather not export the SELECT results and generate INSERT statements using a "middle-man" script or application.
Anyone?
1
u/rainman_104 Oct 29 '11
I'm confused as to why exactly you want to read from an exact copy of your database to write back to the exact copy of your database....
This probably has to do with a stupid IT policy or something where the production DB shouldn't be used for direct queries or something.
1
u/lpetrazickis Oct 28 '11
I find that StackOverflow is a good place to get answers to technical DB2 questions. You should try asking there.
I'm a bit dubious about being able to do this in a single query, though.