Steve Nixon
2017-09-19 19:17:21 UTC
I tried looking this up in the documentation but can't seem to get a straight answer on it. Hoped that maybe a guru has experienced it before.
I have an instance (Informix 12.10.FC9) running on an AIX server that is configured to be doing replication (HDR Secondary). I'm trying to perform a special "UNLOAD TO <filename>" of some of the tables in a database, but I need to be sure that the tables are not being updated/changed during the unload for data integrity.
The problem I have is that the database I'm extracting data from is a production server that operates 24/7. So getting users to log off for 30 minutes or such is not an option.
My thought was that I could somehow use the read-only secondary for this, provided that I somehow stop the changes from being applied on that server for the duration of the data extraction.
What I came up with to date is the following, that seems to work:
1) onmode -ky the secondary
2) On secondary, comment out the entries for primary instance in /etc/services and $INFORMIXDIR/etc/sqlhosts
3) On primary, comment out the entries for secondary instance (in the same files mentioned above)
4) oninit the secondary instance. It comes up as "Blocked on CKPT", but starts up in read-only mode.
5) Do my UNLOAD TO <filename> on the desired tables
6) Go back and repeat steps 1-4 and reverse the changes in the sqlhosts and services files.
But I'm wondering if there is a simpler way to make the secondary instance be read-only but NOT be receiving updates from the primary that may change the stored data for the duration of my queries.
I was looking at "onmode -j". Administration mode.
What I was hoping to get answered was these two questions:
First, if I put a read-only secondary into admin mode, will it continue to receive updated logs and apply changes received from primary?
Second, after placing the read-only secondary in admin mode using onmode -j, can it revert back to a secondary if I onmode -ky and oninit it afterwards? I know that if I issue onmode -d standard, it becomes standalone, and I would need a fresh ontape to re-establish HDR. But can you go from administration mode back to read-only secondary mode without having to prepare a new backup?
Thanks in advance for any advice.
Steve N.
I have an instance (Informix 12.10.FC9) running on an AIX server that is configured to be doing replication (HDR Secondary). I'm trying to perform a special "UNLOAD TO <filename>" of some of the tables in a database, but I need to be sure that the tables are not being updated/changed during the unload for data integrity.
The problem I have is that the database I'm extracting data from is a production server that operates 24/7. So getting users to log off for 30 minutes or such is not an option.
My thought was that I could somehow use the read-only secondary for this, provided that I somehow stop the changes from being applied on that server for the duration of the data extraction.
What I came up with to date is the following, that seems to work:
1) onmode -ky the secondary
2) On secondary, comment out the entries for primary instance in /etc/services and $INFORMIXDIR/etc/sqlhosts
3) On primary, comment out the entries for secondary instance (in the same files mentioned above)
4) oninit the secondary instance. It comes up as "Blocked on CKPT", but starts up in read-only mode.
5) Do my UNLOAD TO <filename> on the desired tables
6) Go back and repeat steps 1-4 and reverse the changes in the sqlhosts and services files.
But I'm wondering if there is a simpler way to make the secondary instance be read-only but NOT be receiving updates from the primary that may change the stored data for the duration of my queries.
I was looking at "onmode -j". Administration mode.
What I was hoping to get answered was these two questions:
First, if I put a read-only secondary into admin mode, will it continue to receive updated logs and apply changes received from primary?
Second, after placing the read-only secondary in admin mode using onmode -j, can it revert back to a secondary if I onmode -ky and oninit it afterwards? I know that if I issue onmode -d standard, it becomes standalone, and I would need a fresh ontape to re-establish HDR. But can you go from administration mode back to read-only secondary mode without having to prepare a new backup?
Thanks in advance for any advice.
Steve N.