Upload
licia
View
32
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Progress ® After-Imaging. Saving your data as you go. WMPUG. 10-16-2008. Agenda. Introduction What is AI and why do you need it? Issues & Gotchas How it works Decisions .. Recommendations & Implementation Resources. About Me. 30+ years experience Prior Developer Progress since 1984 - PowerPoint PPT Presentation
Citation preview
ProgressProgress®®
After-ImagingAfter-ImagingSaving your data as you goSaving your data as you go
AgendaAgenda IntroductionIntroduction What is AI and why do you need it?What is AI and why do you need it? Issues & GotchasIssues & Gotchas How it worksHow it works Decisions .. Recommendations & Decisions .. Recommendations &
ImplementationImplementation ResourcesResources
About MeAbout Me 30+ years experience30+ years experience Prior DeveloperPrior Developer Progress since 1984Progress since 1984 DBA since 1996DBA since 1996 Syteline & QADSyteline & QAD Dan Foreman 2xDan Foreman 2x WMPUG, ACATEC, and OAISDWMPUG, ACATEC, and OAISD Owner & founder of BBWOwner & founder of BBW Part-time employee at TrendwayPart-time employee at Trendway
Founded 2003Founded 2003 5 employees + contractors5 employees + contractors 600+ customers; residential, SMB, corporate600+ customers; residential, SMB, corporate Progress Database servicesProgress Database services Server AdministrationServer Administration NetworkingNetworking RepairRepair Web DesignWeb Design General Business SupportGeneral Business Support
About youAbout you Using AI?Using AI? Issues with AI?Issues with AI? DB Training?DB Training? Dan Foreman’s courses?Dan Foreman’s courses?
What is AI?What is AI? Transaction LoggingTransaction Logging Enhances your existing backupsEnhances your existing backups
Protecting your DBProtecting your DB BI file protects against failed BI file protects against failed
transactionstransactions Mirroring protects against hardware Mirroring protects against hardware
failurefailure AI protects against Human FailureAI protects against Human Failure
Why?Why? Read-only report databaseRead-only report database Live spareLive spare 24*7 Operation24*7 Operation Diagnostics; to determine active Diagnostics; to determine active
transactions at the time of a crashtransactions at the time of a crash Recovery in the event of BI or DB Recovery in the event of BI or DB
disk failuredisk failure
Issues with AIIssues with AI It changes everythingIt changes everything Increased administrative burdenIncreased administrative burden Cost of additional storage spaceCost of additional storage space Increased recovery timeIncreased recovery time Works but requires manual intervention on < 91CWorks but requires manual intervention on < 91C If DB crashes during roll forward, you have to start overIf DB crashes during roll forward, you have to start over If extents are out of sequence, you cannot roll forwardIf extents are out of sequence, you cannot roll forward If the database ‘stalls’ If the database ‘stalls’
The last extent is busy – not fullThe last extent is busy – not full Client processes do not receive warningClient processes do not receive warning No information in promon or vst’s to indicate the db is stalledNo information in promon or vst’s to indicate the db is stalled
Minimal performance hitMinimal performance hit Can’t use it if you touch itCan’t use it if you touch it
Known GotchasKnown Gotchas You can’t apply more than 65,535 AI You can’t apply more than 65,535 AI
filesfiles @ one per hour = 7½ years@ one per hour = 7½ years @ 5 minutes = 227 days@ 5 minutes = 227 days
Must end and restart AIMust end and restart AI Massive processing (archiving) can Massive processing (archiving) can
blow AI…blow AI…(This Slide courtesy of Scott Dulecki, Bravepoint)(This Slide courtesy of Scott Dulecki, Bravepoint)
How it worksHow it works
PRODDB
TransactionLogsSPARE
DB
BI Files
Special Thanks!Special Thanks! The next few slides were taken from The next few slides were taken from
Scott Dulecki’s “Basic AI” presentation. Scott Dulecki’s “Basic AI” presentation. To obtain a copy of Scott’s presentation:To obtain a copy of Scott’s presentation:
Scott M. DuleckiScott M. DuleckiBravepointBravepoint
616/957-3184616/[email protected]@bravepoint.com
BI StructureBI StructureSΔSΔΔ
ΔΔ
ΔΔΔΔE
BI ExpansionBI ExpansionS
BI Back OutBI Back OutSΔSΔΔ
ΔΔ
ΔΔΔΔE
AI logs the AI logs the completed completed
transactions from transactions from the BI filethe BI file
Decisions … DecisionsDecisions … Decisions How do you plan to use it?How do you plan to use it? How much data?How much data?
(# Checkpoints * BI Cluster Size)(# Checkpoints * BI Cluster Size) Frequency of backupsFrequency of backups Variable or fixed extents?Variable or fixed extents?
Without a variable extent, it requires more Without a variable extent, it requires more babysittingbabysitting
Fixed extents occupy space – even if that space is not Fixed extents occupy space – even if that space is not usedused
No way to truncate a variable extent unless you No way to truncate a variable extent unless you shutdown the dbshutdown the db
Possible 2GB file issue with variable extentsPossible 2GB file issue with variable extents Variable extents work better with time based Variable extents work better with time based
switchesswitches
RecommendationsRecommendations Separate disk controller and disk (at Separate disk controller and disk (at
minimum on it’s own disk)minimum on it’s own disk) Storage space for AI filesStorage space for AI files Minimum 4 extentsMinimum 4 extents
Active, Full, Locked (in use), and availableActive, Full, Locked (in use), and available Disable AI when:Disable AI when:
Data Load, data purge, or schema changeData Load, data purge, or schema change Crash RecoveryCrash Recovery Offline backupOffline backup
Test your recovery process to make sure it Test your recovery process to make sure it worksworks Use no integrity (-i) to reduce roll-forward recovery Use no integrity (-i) to reduce roll-forward recovery
timetime
ImplementationImplementation DB StructureDB Structure Set parameters to manage itSet parameters to manage it
-aibufs (equal to 1.5* bibufs)-aibufs (equal to 1.5* bibufs) ProaiwProaiw -aiblocksize (same as –biblocksize)-aiblocksize (same as –biblocksize) -aistall -aistall
Turn it onTurn it on
RFUTILRFUTIL
BeginBegin EndEnd extent full (checks to see if there is a full extent extent full (checks to see if there is a full extent
prior to a switch)prior to a switch) extent empty (empties an AI extent)extent empty (empties an AI extent) extent list (shows current extents and the status extent list (shows current extents and the status
of each)of each) Mark backedupMark backedup Scan Scan ExtractExtract Roll ForwardRoll Forward
rfutil db –C aimage <command>rfutil db –C aimage <command>
Switching ExtentsSwitching Extentsset DLC=c:\progress\83Eset IDLC=c:\progress\83Eset PROCFG=%DLC%\progress.cfgset PROMSGS=%DLC%\PROMSGSset IPROMSGS=%DLC%\PROMSGSset PATH=.,%DLC%,C:\windows
setlocalset dbdir=g:\symdb\%1set bkpdir=h:\bkp\%1set bkpdir2=\\<server>\h$\bkp\%1set log=%bkpdir%\%1.aiswitch.logset tmp-file=%1full.txt
Capturing the DateCapturing the DateREM Capture current date variablesfor /f "tokens=1,2" %%u in ('date /t') do set d=%%vfor /f "tokens=1" %%u in ('time /t') do set t=%%uif "%t:~1,1%"==":" set t=0%t%set cc=%d:~8,2%%set yy=%d:~6,4%%set dd=%d:~3,2%%set mm=%d:~0,2%%set hh=%t:~0,2%%set mn=%t:~3,2%%set ss=%t:~6,2%%
set ts=%yy%%mm%%dd%%hh%%mn%%ss%
echo %date% %time% ==============>> %log%
Checking statusChecking statusG: cd %dbdir%
REM Chk DB Statuscall %DLC%\bin\proutil -db %1 -C busyIF errorlevel 6 goto :LOOP
echo %1 is not running >>%log%exit
:LOOPREM CHECK FOR FIRST FULL EXTENT%COMSPEC% /C %DLC%\bin\rfutil %1 -C aimage full 1> %tmp-file% 2>>%log%if %errorlevel%==2 goto END
Copy & EmptyCopy & EmptyREM COPY THE FILE AND RENAME ITfor /f "skip=1" %%A in (%tmp-file%) do (if exist %%A (for %%F in (%%A) do copy %%F
%bkpdir%\"%%~nF_%ts%%%~xF") )for /f "skip=1" %%A in (%tmp-file%) do (if exist %%A (for %%F in (%%A) do copy %%F
%bkpdir2%\"%%~nF_%ts%%%~xF") )for /f "skip=1" %%B in (%tmp-file%) do (if exist %%B (for %%F in (%%B) do echo
Copied %%F "%%~nF_%ts%%%~xF" to aibackup >> %log%) )
REM EMPTY THE FILE%COMSPEC% /C %DLC%\bin\rfutil %1 -C aimage empty >> %log%echo/>nul >> %log%
goto :LOOP
:END%COMSPEC% /C %DLC%\bin\rfutil %1 -C aimage new >> %log%echo/>nul >> %log%echo/>nul >> %log%del %tmp-file%
Moving FilesMoving Files To a local backup directory on the To a local backup directory on the
serverserver To a 2To a 2ndnd server (where a live spare server (where a live spare
resides)resides) To an external HDDTo an external HDD
Roll ForwardRoll Forward %COMSPEC% /C _rfutil.exe %db% -C %COMSPEC% /C _rfutil.exe %db% -C
roll forward -a %ai%.ai%ai-num% roll forward -a %ai%.ai%ai-num% del /q %ai%.ai%ai-num%del /q %ai%.ai%ai-num%
Restore from backupRestore from backup Roll forward AI extents (must be in Roll forward AI extents (must be in
sequence!)sequence!) Can stop before the endCan stop before the end
ResourcesResources PSDN: AI DocumentationPSDN: AI Documentation OE 10.1B – AI ArchiverOE 10.1B – AI Archiver PEG Utilities: Adam Backman’s DBA ScriptsPEG Utilities: Adam Backman’s DBA Scripts Dan Foreman: DBA Resource KitDan Foreman: DBA Resource Kit
AI ChecklistAI Checklist AI (Unix) Shell ScriptsAI (Unix) Shell Scripts AI Extent ScannerAI Extent Scanner
Dmitri Levin’s Scripts:Dmitri Levin’s Scripts: http://www.geocities.com/ResearchTriangle/http://www.geocities.com/ResearchTriangle/
3737/progress.html3737/progress.html
QuestionsQuestions Q. During the meeting, I was asked why I Q. During the meeting, I was asked why I
use DOS batch files (why not a scripting use DOS batch files (why not a scripting utility) and why so many variables?utility) and why so many variables?
A. The answer is that I work on several different A. The answer is that I work on several different systems, I don’t always have the option of systems, I don’t always have the option of installing software on the customer’s system and installing software on the customer’s system and quite frequently have to use what they have to quite frequently have to use what they have to work with. The thing that is always available on a work with. The thing that is always available on a windows machine is DOS. On Unix, it’s VI. The windows machine is DOS. On Unix, it’s VI. The use of variables enables me to identify a few use of variables enables me to identify a few things at the start of the script and not have to things at the start of the script and not have to make changes to the body of the script.make changes to the body of the script.
Betty HardinBetty HardinBig Blue WaterBig Blue Water
(269) 561-5517(269) 561-5517
? ? Questions Questions
??