Creating Warm Spare With Workgroups Rdbms

All,
I am trying to create a warm spare.

Specifics:
Windows 7 Professional
Progress OE 11.6 Workgroups RDBMS

I have a database running on machine A.
I am running a daily backup at 5:00AM.
I am using ai archive to generate an hourly backup of ai.
I am restoring on machine B.

All is good with database restore on machine B, but the AI files are presenting an issue. The names are horrendous, but this is manageable with a script. What I need to know is how to determine what the next AI file is in the sequence and the AI file extension. For instance, in the latest backup the next sequence value was 157 with a file extension of A13, but the first AI file after the backup is 156 with a file extension of A12. I am not sure why that is, but the larger point is that I want to add the next AI file in the sequence every hour. To do this I need that number. Is there a way that I can use rfutil to output this value for me?

Regards,
David
 

Cringer

ProgressTalk.com Moderator
Staff member
IIRC when you try and apply the wrong file the system comes back and tells you which files it's expecting. Is there any way you can parse the output from that to determine the right file?
 

Cringer

ProgressTalk.com Moderator
Staff member
An alternative solution would be to move the files to a new location once they're applied, thus you know all the ones there are ones you need to apply - apply them in date order.
 

TheMadDBA

Active Member
In your database directory there will be a file called <yourdb>.archival.log that will contain information about each backup taken and each AI file archived. The documentation will tell you information about each column value per record type.

Other than testing your backup process there is no need to restore the DB to machine B every night. Just keep applying AI files from machine A after the initial backup.

The file extensions will match the source AI extent.. but sorting the AI files by file name will give you them in the proper order. Don't worry about the extensions because they don't matter. Or you can parse the archival.log to know exactly which file to process in what order.

The file name is made up of <your db directory path and name>.AI Begin Date.AI Begin Time.Processing Sequence.DBName.Original AI extent

Assuming you are using the AI Archiver process
 

TomBascom

Curmudgeon
I have been known to rename those files dbname.seq#

James is right -- if you don't know what is expected next try one at random. The error message will tell you what seq# the db is expecting.

After you have applied an archived log move it out of the directory so that it doesn't keep cluttering things up.
 
Thanks to all of you for your support. I ended up writing a loop in DOS to add the AI files in date order then archive them. It looks to be working fine.
 

Chris Hughes

ProgressTalk.com Sponsor
This was a little something I put together before

Code:
echo Start Time - %time% >> airoll_mydbname.log
for /r "E:\AITOPROCESS" %%F in (*%1*) do (
    rfutil mydbname -C roll forward -a %%F >> airoll_mydbname.log
) | sort
echo Finished Time - %time% >> airoll_mydbname.log

Add a move file to the above and schedule it and you have a tidy cheap warm DB.

Cheers
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
For those on 11.3+, another option for rolling forward many AI files is the rfutil roll forward -ailist <filename> command, where <filename> contains a list of AI files. This has the advantage of opening the database and going through the redo phase only once, as opposed to once per AI file.
 
This was a little something I put together before

Code:
echo Start Time - %time% >> airoll_mydbname.log
for /r "E:\AITOPROCESS" %%F in (*%1*) do (
    rfutil mydbname -C roll forward -a %%F >> airoll_mydbname.log
) | sort
echo Finished Time - %time% >> airoll_mydbname.log

Add a move file to the above and schedule it and you have a tidy cheap warm DB.

Cheers
I did something like this, but could not figure out how fo add the move of the processed AI files. I am assuming in this code it goes right under the roll forward.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
It would be nice if PSC would create a roll-forward daemon for DR/stand-by, just as it now has the file-management daemon for prod. Then it could roll forward the files efficiently, archive completed files to long-term storage, etc. I suggested it at a conference but it went over like a lead balloon. I don't know if it's on the roadmap but I doubt it.

It seems silly to me, for example, that roll forward and roll forward retry are separate commands and we need to script the business logic for when to use which. That's a lot of duplication of effort across many customers and ISVs for a purely mechanical task.
 

RealHeavyDude

Well-Known Member
Couldn't agree more. IMHO Progress is notorious for making stuff needed by many much more complicated than necessary. So everybody has to roll his own solution for standard tasks. Please don't get me wrong - I am not talking about graphical user interfaces, I am perfectly okay whith shell scripting.

Heavy Regards, RealHeavyDude.
 

Cringer

ProgressTalk.com Moderator
Staff member
I suspect they feel it would remove the need to buy Replication for many customers if they implemented it.
 

Chris Hughes

ProgressTalk.com Sponsor
I think Progress should make the replication engine free....

I think a neat solution is to just roll forward another database on the same Prod server, albeit to another disk.
Should the worst happen, customer restores VM snapshot, grab database from other disk - and they are back up and running.

Of course those customers that want a second server running would still pay for the second Progress license, so for those that have budget for this level of solution there is no financial loss.
 

Cringer

ProgressTalk.com Moderator
Staff member
Replication will never be free. I imagine it's a very good revenue stream.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
I suspect they feel it would remove the need to buy Replication for many customers if they implemented it.
I think it would get more people using AI and result in more customer production data being safer.

And it would be the right thing to do. Customers should use the platform and expend their time and effort using its capabilities to create business value, not build out its missing plumbing. Just my $0.02.
 

Cringer

ProgressTalk.com Moderator
Staff member
I think it would get more people using AI and result in more customer production data being safer.

And it would be the right thing to do. Customers should use the platform and expend their time and effort using its capabilities to create business value, not build out its missing plumbing. Just my $0.02.
I completely agree Rob.
 
Thanks to you all!

I enjoy the banter. I have spent more time than I can list coming up with solutions using VBScript, WSH, and DOS to to fix problems with continuity. Not to mention shell scripting in Unix/Linux. This is not just Progress, but other systems as well.

It keeps me going, albeit with some grief at times.
 
Top