Title: Progress AfterImaging
1ProgressAfter-Imaging
- Saving your data as you go
WMPUG
10-16-2008
2Agenda
- Introduction
- What is AI and why do you need it?
- Issues Gotchas
- How it works
- Decisions .. Recommendations Implementation
- Resources
3About Me
- 30 years experience
- Prior Developer
- Progress since 1984
- DBA since 1996
- Syteline QAD
- Dan Foreman 2x
- WMPUG, ACATEC, and OAISD
- Owner founder of BBW
- Part-time employee at Trendway
4- Founded 2003
- 5 employees contractors
- 600 customers residential, SMB, corporate
- Progress Database services
- Server Administration
- Networking
- Repair
- Web Design
- General Business Support
5About you
- Using AI?
- Issues with AI?
- DB Training?
- Dan Foremans courses?
6What is AI?
- Transaction Logging
- Enhances your existing backups
7Protecting your DB
- BI file protects against failed transactions
- Mirroring protects against hardware failure
- AI protects against Human Failure
8Why?
- Read-only report database
- Live spare
- 247 Operation
- Diagnostics to determine active transactions at
the time of a crash - Recovery in the event of BI or DB disk failure
9Issues with AI
- It changes everything
- Increased administrative burden
- Cost of additional storage space
- Increased recovery time
- Works but requires manual intervention on lt 91C
- If DB crashes during roll forward, you have to
start over - If extents are out of sequence, you cannot roll
forward - If the database stalls
- The last extent is busy not full
- Client processes do not receive warning
- No information in promon or vsts to indicate the
db is stalled - Minimal performance hit
- Cant use it if you touch it
10Known Gotchas
- You cant apply more than 65,535 AI files
- _at_ one per hour 7½ years
- _at_ 5 minutes 227 days
- Must end and restart AI
- Massive processing (archiving) can blow AI
- (This Slide courtesy of Scott Dulecki,
Bravepoint)
11How it works
BI Files
PROD DB
Transaction Logs
SPARE DB
12Special Thanks!
- The next few slides were taken from Scott
Duleckis Basic AI presentation. To obtain a
copy of Scotts presentation - Scott M. Dulecki
- Bravepoint
- 616/957-3184
- sdulecki_at_bravepoint.com
13BI Structure
S
?
S
?
?
?
?
?
?
?
?
E
14BI Expansion
S
15BI Back Out
S
?
S
?
?
?
?
?
?
?
?
E
16AI logs the completed transactions from the BI
file
17Decisions Decisions
- How do you plan to use it?
- How much data?
- ( Checkpoints BI Cluster Size)
- Frequency of backups
- Variable or fixed extents?
- Without a variable extent, it requires more
babysitting - Fixed extents occupy space even if that space
is not used - No way to truncate a variable extent unless you
shutdown the db - Possible 2GB file issue with variable extents
- Variable extents work better with time based
switches
18Recommendations
- Separate disk controller and disk (at minimum on
its own disk) - Storage space for AI files
- Minimum 4 extents
- Active, Full, Locked (in use), and available
- Disable AI when
- Data Load, data purge, or schema change
- Crash Recovery
- Offline backup
- Test your recovery process to make sure it works
- Use no integrity (-i) to reduce roll-forward
recovery time
19Implementation
- DB Structure
- Set parameters to manage it
- -aibufs (equal to 1.5 bibufs)
- Proaiw
- -aiblocksize (same as biblocksize)
- -aistall
- Turn it on
20RFUTIL
rfutil db C aimage ltcommandgt
- Begin
- End
- extent full (checks to see if there is a full
extent prior to a switch) - extent empty (empties an AI extent)
- extent list (shows current extents and the status
of each) - Mark backedup
- Scan
- Extract
- Roll Forward
21Switching Extents
set DLCc\progress\83E set IDLCc\progress\83E s
et PROCFGDLC\progress.cfg set
PROMSGSDLC\PROMSGS set IPROMSGSDLC\PROMSGS s
et PATH.,DLC,C\windows setlocal set
dbdirg\symdb\1 set bkpdirh\bkp\1 set
bkpdir2\\ltservergt\h\bkp\1 set
logbkpdir\1.aiswitch.log set
tmp-file1full.txt
Variables
22Capturing the Date
- REM Capture current date variables
- for /f "tokens1,2" u in ('date /t') do set
dv - for /f "tokens1" u in ('time /t') do set tu
- if "t1,1""" set t0t
- set ccd8,2
- set yyd6,4
- set ddd3,2
- set mmd0,2
- set hht0,2
- set mnt3,2
- set sst6,2
- set tsyymmddhhmnss
- echo date time gtgt log
23Checking status
G cd dbdir REM Chk DB Status call
DLC\bin\proutil -db 1 -C busy IF errorlevel 6
goto LOOP echo 1 is not running
gtgtlog exit LOOP REM CHECK FOR FIRST FULL
EXTENT COMSPEC /C DLC\bin\rfutil 1 -C aimage
full 1gt tmp-file 2gtgtlog if errorlevel2
goto END
24Copy Empty
- REM COPY THE FILE AND RENAME IT
- for /f "skip1" A in (tmp-file) do (if exist
A (for F in (A) do copy F
bkpdir\"nF_tsxF") ) - for /f "skip1" A in (tmp-file) do (if exist
A (for F in (A) do copy F
bkpdir2\"nF_tsxF") ) - for /f "skip1" B in (tmp-file) do (if exist
B (for F in (B) do echo Copied F
"nF_tsxF" to aibackup gtgt log) ) - REM EMPTY THE FILE
- COMSPEC /C DLC\bin\rfutil 1 -C aimage empty
gtgt log - echo/gtnul gtgt log
- goto LOOP
- END
- COMSPEC /C DLC\bin\rfutil 1 -C aimage new gtgt
log - echo/gtnul gtgt log
- echo/gtnul gtgt log
- del tmp-file
25Moving Files
- To a local backup directory on the server
- To a 2nd server (where a live spare resides)
- To an external HDD
26Roll Forward
- COMSPEC /C _rfutil.exe db -C roll forward -a
ai.aiai-num del /q ai.aiai-num - Restore from backup
- Roll forward AI extents (must be in sequence!)
- Can stop before the end
27Resources
- PSDN AI Documentation
- OE 10.1B AI Archiver
- PEG Utilities Adam Backmans DBA Scripts
- Dan Foreman DBA Resource Kit
- AI Checklist
- AI (Unix) Shell Scripts
- AI Extent Scanner
- Dmitri Levins Scripts
- http//www.geocities.com/ResearchTriangle/3737/pro
gress.html
28Questions
- Q. During the meeting, I was asked why I use DOS
batch files (why not a scripting utility) and why
so many variables? - A. The answer is that I work on several
different systems, I dont always have the option
of installing software on the customers system
and quite frequently have to use what they have
to work with. The thing that is always available
on a windows machine is DOS. On Unix, its VI.
The use of variables enables me to identify a
few things at the start of the script and not
have to make changes to the body of the script.
29? Questions ?
Betty Hardin Big Blue Water betty_at_bigbluewater.com
(269) 561-5517