ER question
Posted in 2009
A user restoring a backup of a running Enterprise Replication node onto a test box asked how to stop CDR and redefine replication without the test system talking to production. Advice: run 'cdr stop' before the archive (restart after the checkpoint), then on the restored copy use 'cdr delete server --force' to drop ER metadata and delete shadow tables; simply dropping syscdr leaves remnants. Others warned to strip all other ER servers from sqlhosts and keep the original server/group names until ER is removed, since bringing the instance online restarts ER and it may push data to production. The poster still hit 'no sync server (84)'/-329 when redefining, and 'oninit -D' was rejected ('ER not active'), so no final resolution is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication
OK, I getting better with ER but I still don't have a clue about some things. I can't seem to make the following work: I take a backup copy of an ER node with ER active and replicating. I then restore it to another machine in stage. I am not using the same instance name or group name when I restore. I was hoping to use the backup to set up another test environment. I don't want the environments to interfere with each other. I am using IDS 11.5 FC3. It is a simple pitcher catcher arrangement. How do I get CDR to stop replicating and redefine replication? Do I need to restore using the same group name and instance name? Thanks for any help. If you can point me to some good articles on ER I would appreciate it. I have looked at a bunch of articles and it is starting to sink in, but I have a few gaps in my knowledge.
bozon wrote: > OK, I getting better with ER but I still don't have a clue about some > things. I can't seem to make the following work: > > I take a backup copy of an ER node with ER active and replicating. I > then restore it to another machine in stage. I am not using the same > instance name or group name when I restore. I was hoping to use the > backup to set up another test environment. I don't want the > environments to interfere with each other. I am using IDS 11.5 FC3. > It is a simple pitcher catcher arrangement. How do I get CDR to stop > replicating and redefine replication? Do I need to restore using the > same group name and instance name? > > Thanks for any help. If you can point me to some good articles on ER I > would appreciate it. I have looked at a bunch of articles and it is > starting to sink in, but I have a few gaps in my knowledge. First, run "cdr stop", just prior to taking the backup. As soon as you start the backup and get the archive checkpoint, then you can run "cdr start" to resume ER. Then - when restoring the system to the test machine you can simply run "cdr remove". That will remove the existing ER metadata and cleanup any delete shadow tables.
On Feb 18, 2:37 pm, Madison Pruet <mpru...@verizon.net> wrote: > bozon wrote: > > OK, I getting better with ER but I still don't have a clue about some > > things. I can't seem to make the following work: > > > I take a backup copy of an ER node with ER active and replicating. I > > then restore it to another machine in stage. I am not using the same > > instance name or group name when I restore. I was hoping to use the > > backup to set up another test environment. I don't want the > > environments to interfere with each other. I am using IDS 11.5 FC3. > > It is a simple pitcher catcher arrangement. How do I get CDR to stop > > replicating and redefine replication? Do I need to restore using the > > same group name and instance name? > > > Thanks for any help. If you can point me to some good articles on ER I > > would appreciate it. I have looked at a bunch of articles and it is > > starting to sink in, but I have a few gaps in my knowledge. > > First, run "cdr stop", just prior to taking the backup. As soon as you > start the backup and get the archive checkpoint, then you can run "cdr > start" to resume ER. > > Then - when restoring the system to the test machine you can simply run > "cdr remove". That will remove the existing ER metadata and cleanup any > delete shadow tables. do you mean "cdr delete" ? When I type in "cdr remove" I get an error. cdr remove usage: cdr remove <object> remove onconfig [-c server] OnconfigText
bozon wrote: > On Feb 18, 2:37 pm, Madison Pruet <mpru...@verizon.net> wrote: >> bozon wrote: >>> OK, I getting better with ER but I still don't have a clue about some >>> things. I can't seem to make the following work: >>> I take a backup copy of an ER node with ER active and replicating. I >>> then restore it to another machine in stage. I am not using the same >>> instance name or group name when I restore. I was hoping to use the >>> backup to set up another test environment. I don't want the >>> environments to interfere with each other. I am using IDS 11.5 FC3. >>> It is a simple pitcher catcher arrangement. How do I get CDR to stop >>> replicating and redefine replication? Do I need to restore using the >>> same group name and instance name? >>> Thanks for any help. If you can point me to some good articles on ER I >>> would appreciate it. I have looked at a bunch of articles and it is >>> starting to sink in, but I have a few gaps in my knowledge. >> First, run "cdr stop", just prior to taking the backup. As soon as you >> start the backup and get the archive checkpoint, then you can run "cdr >> start" to resume ER. >> >> Then - when restoring the system to the test machine you can simply run >> "cdr remove". That will remove the existing ER metadata and cleanup any >> delete shadow tables. > > do you mean "cdr delete" ? > When I type in "cdr remove" I get an error. > > cdr remove > usage: cdr remove <object> > remove onconfig [-c server] OnconfigText opps - cdr delete server --force The force option will allow removal of all of the metadata and the shadow tables if ER is not running.
> How do I get CDR to stop > replicating and redefine replication? Do I need to restore using the > same group name and instance name? If your active and replicating ER environment happens to be a production environment you might not have the luxury of stopping ER. In this case just backup it up and restore to your test instance, drop "syscdr" database on test, change relevant parts of the scripts you used to build your production ER to get test ER environment and that's it. Cheers Davorin
Davorin Kremenjas wrote: >> How do I get CDR to stop >> replicating and redefine replication? Do I need to restore using the >> same group name and instance name? > > If your active and replicating ER environment happens to be a > production environment you might not have the luxury of stopping ER. > > In this case just backup it up and restore to your test instance, drop > "syscdr" database on test, change relevant parts of the scripts you > used to build your production ER to get test ER environment and that's > it. > > Cheers > > Davorin Hi, Well, if you try this, then you will always have "little issues". For example ... You finish the restore and the instance is left in quiescent. No cdr commands are able to be run. cdr delete server tbp_1000f_1_cdr connect to tbp_1000f_1_t failed No connections are allowed in quiescent mode. (-27002) command failed -- unable to connect to server specified (5) However, if you try and bring this instance to online mode ... ER will start. If you have connectivity to your old "production" env specified in the sqlhosts then ER will try and push data that way ... not very good!!!!!!!! I would suggest removing ANY reference to ER servers that the original was replicating to. That way, finish the restore, bring it online, you should then get ER running, but unable to connect to any other servers. Keep the groupname and servername the same Now you can issue your cdr delete server tbp_1000f_1_cdr. Then you can shutdown the instance, setup the servername and groupnames how you want, then re-define ER how you want. Just dropping the syscdr database will leave loads of remnants like shadow tables etc. etc.
On Feb 18, 4:19 pm, Madison Pruet <mpru...@verizon.net> wrote: > bozon wrote: > > On Feb 18, 2:37 pm, Madison Pruet <mpru...@verizon.net> wrote: > >> bozon wrote: > >>> OK, I getting better with ER but I still don't have a clue about some > >>> things. I can't seem to make the following work: > >>> I take a backup copy of an ER node with ER active and replicating. I > >>> then restore it to another machine in stage. I am not using the same > >>> instance name or group name when I restore. I was hoping to use the > >>> backup to set up another test environment. I don't want the > >>> environments to interfere with each other. I am using IDS 11.5 FC3. > >>> It is a simple pitcher catcher arrangement. How do I get CDR to stop > >>> replicating and redefine replication? Do I need to restore using the > >>> same group name and instance name? > >>> Thanks for any help. If you can point me to some good articles on ER I > >>> would appreciate it. I have looked at a bunch of articles and it is > >>> starting to sink in, but I have a few gaps in my knowledge. > >> First, run "cdr stop", just prior to taking the backup. As soon as you > >> start the backup and get the archive checkpoint, then you can run "cdr > >> start" to resume ER. > > >> Then - when restoring the system to the test machine you can simply run > >> "cdr remove". That will remove the existing ER metadata and cleanup any > >> delete shadow tables. > > > do you mean "cdr delete" ? > > When I type in "cdr remove" I get an error. > > > cdr remove > > usage: cdr remove <object> > > remove onconfig [-c server] OnconfigText > > opps - > > cdr delete server --force > > The force option will allow removal of all of the metadata and the > shadow tables if ER is not running. OK, I am really thankful for all of the help on this so far. I did: 1588 cdr delete server g_catcher_cr -c g_catcher_cr 1589 cdr list server 1590 sett monster1 1591 cdr list server 1592 sett monster4 1593 cdr delete server g_pitcher_cr 1594 cdr list Monster4 being the source and monster1 being the target. I change the group names in the sqlhost file and now I am getting: + cdr define server --connect=g_monster_catcher1 --ats=/usr/local/ informix_dev/cdr_logs/monster1/ATS --ris=/usr/local/informix_dev/ cdr_logs/monster1/RIS --idle=0 --leaf --init g_monster_catcher1 command failed -- no sync server (84) Can not switch to syscdr sqlcode:-329+ exit For some reason it doesn't seem to want to recreate the syscdr database. Is there a bug in 11.5FC3? Or do I need to force it? -329 Database not found or no system permission. The database you tried to open is not visible to the database server. Check the spelling of the name. Possibly the database is located in a different database server (or network system), and you have omitted to specify the server name (or site name) with the database name. If you are sure the database should exist just as you spelled it, your next step depends on the database server you are using. If you are using IBM Informix SE, the visible databases are directories with names in the form dbname.dbs. You must be able to read from and write to them. The database server looks first in the current working directory and then in each directory named in the DBPATH environment variable. The most common cause of this error is an incorrect setting or no setting for the DBPATH environment variable. If you are using IBM Informix Dynamic Server, IBM Informix Universal Server, or IBM Informix OnLine Dynamic Server, the database does not exist as you spelled it. In some environments, two or more instances of the database server can run at once and each instance has its own collection of databases. For Version 6.0 and later, the value of the INFORMIXSERVER environment variable determines the instance of the database server that you use. For Versions 5.1x and earlier, the ONCONFIG environment variable points to the configuration file that determines the instance. See your database server administrator if you think you might be using the wrong instance. If you are connected to a secondary database server, the database you tried to open might exist, but is not logged. Databases are required to be logged to be able to access them on secondary database servers.
On Feb 19, 7:19 am, theBP <th...@Usenet-News.Net> wrote: > Davorin Kremenjas wrote: > >> How do I get CDR to stop > >> replicating and redefine replication? Do I need to restore using the > >> same group name and instance name? > > > If your active and replicating ER environment happens to be a > > production environment you might not have the luxury of stopping ER. > > > In this case just backup it up and restore to your test instance, drop > > "syscdr" database on test, change relevant parts of the scripts you > > used to build your production ER to get test ER environment and that's > > it. > > > Cheers > > > Davorin > > Hi, > > Well, if you try this, then you will always have "little issues". > > For example ... > > You finish the restore and the instance is left in quiescent. > > No cdr commands are able to be run. > > cdr delete server tbp_1000f_1_cdr > connect to tbp_1000f_1_t failed > No connections are allowed in quiescent mode. > (-27002) > command failed -- unable to connect to server specified (5) > > However, if you try and bring this instance to online mode ... ER will start. If you have connectivity to your old "production" env > specified in the sqlhosts then ER will try and push data that way ... not very good!!!!!!!! > > I would suggest removing ANY reference to ER servers that the original was replicating to. > > That way, finish the restore, bring it online, you should then get ER running, but unable to connect to any other servers. > > Keep the groupname and servername the same > > Now you can issue your cdr delete server tbp_1000f_1_cdr. > > Then you can shutdown the instance, setup the servername and groupnames how you want, then re-define ER how you want. > > Just dropping the syscdr database will leave loads of remnants like shadow tables etc. etc. I will try this way next. I kept the group names the same but I had different server names. Thanks for your help.
What about 'oninit -D' ?
You do your backup with ER running, restore this anywhere -> takes you
to quiescent mode -> shutdown -> oninit -D -> cdr delete server --
force.
I'm not too sure about the server and group names - will they have to
(temporarily) be the same as on the original system?
I'd assume not.
If you're going to define (a different) ER on the restored system,
this should do perfectly, if not there might be some leftovers.
bluexnote@googlemail.com wrote:
> What about 'oninit -D' ?
>
> You do your backup with ER running, restore this anywhere -> takes you
> to quiescent mode -> shutdown -> oninit -D -> cdr delete server --
> force.
>
> I'm not too sure about the server and group names - will they have to
> (temporarily) be the same as on the original system?
> I'd assume not.
>
> If you're going to define (a different) ER on the restored system,
> this should do perfectly, if not there might be some leftovers.
Unfortunately, it is a bit like chicken / egg situation.
You need ER to delete ER ...
> oninit -D
> cdr delete server nan_1000f_1_cdr
command failed -- Enterprise Replication not active (62)