You can’t give that responsibility to someone who doesn’t know how to handle it.. DBA is a roleLike a policeman or teacherUnstated responsibilities, expectations Most people don’t know w
Trang 1Oracle DBA Best Practices
Dennis Williams Senior Database Administrator Lifetouch, Inc.
Trang 2About Me
TCOUG member since 1990
8 years only DBA at Lifetouch, Inc.Lawson Software Database
Research EngineerConsultant - FingerhutControl Data
Contact me at dwilliams@lifetouch.com
Trang 4There’s no asset more important than a company’s data You can’t give that
responsibility to someone who doesn’t know how to handle it
Malcom Fields, CIO
Trang 5Time - Until lunch is readyLeft-brain portion - tech IssuesRight-brain portion - softer issuesDatabase audit form
Trang 675,610 DBAs
U.S Bureau of Labor Statistics in
2003 began tracking the IT workforce
6.46% unemployedThere are 797,445 Software Engineers (5.3% unemployed)DBA supports about 10
developers
Trang 7Where do DBAs come from?
Schools don’t offer a degree
Developer DB developerSystem Administrator
Trang 8DBA is a role
Like a policeman or teacherUnstated responsibilities, expectations
Most people don’t know what a DBA does
Trang 9DBA time breakdown
22% Fire Fighting33% Monitoring12% Perf Tuning / Change Mgt.33% Development Support
0% Planning for growth0% Backup & Recovery Planning0% Learning
Koopman
Trang 10Keep a personal time log - 1 weekLearn your time distribution
Target improvementsStudy time management
Trang 11Levels of Oracle DBA
Rookie Veteran Expert
TCOUG No time Member,
attends reg.
On the board Studies Admin.
classes
OCP, books OCM,
author, conferences Online
forums
No time Lurks, asks Answers
questions New Oracle
features
Uses any feature
Wary of new feature
Creates tests to find problems
Trang 12Misconception: you are an expertMultiple choice, so simple
questionsBroad, not deepCareer benefit - can’t hurtCan help you go deeper in Oracle
Trang 14Production Support DBA
Keep it running
“shepherd / farmer” personalityWhere best practices really make a difference
The hero isn’t the DBA that battles problems through the weekend,
but the one that avoided the problem
Trang 15Application DBA
Supports a business critical app like Oracle Financials, SAP,
Peoplesoft, LawsonProduction support, some dev.Key skill: understands how the app Interacts with Oracle
Can’t self-studyCaution: Vendor doesn’t operate databases in production
Trang 16Consultant DBA
Fastest way to get expertiseVaried work opportunitiesUnderstand economic cycles
Trang 17Backup is Job #1
Ensuring data is never lostDon’t trust an untested backup configuration
Be ready to perform any type of recovery at any time
Communicate vulnerabilities, recovery times to managementArchivelog mode by default
Cold or Hot backups, which best fits your environment
Trang 18Export: the DBAs friend
Enhance recoverabilityEasy to recover a single table, avoid full recovery
Checks block corruptionTeach your developers to request special exports
Validate, no errors, Unix strings command, last line should be EXIT
Trang 19security, data sensitivity
Trang 20Making it work
Dev to Prod
ITIL
3 environments - test/stage/prodClone DB from backup
Developers provide scripts to change production
Simple application login testAlways have a backout plan
Is this change worth the possible
Trang 21Oracle Performance Tuning - Types
SQL Statements - explain plan, tkprof, 10053 events
Application disasters - 10046 trace, Cary Millsap (TCOUG Hotsos
seminar)Proactive tuning and hanging - STATSPACK, utlestat/utlbstat
Trang 22You must know what your server is doing.
Trang 24Not your Dad’s Oracle tuning
Rules of thumb, ratios to mathematical foundationsCounts to measured times in microseconds
Aggregate by instance to process details
V$ tables are either too summarized or point-in-time
Trang 25Goal of tuning
What matters to the business userGood chance to sell value
End-to-end analysisDBA must prove innocence
Trang 26There is nothing so useless
as doing efficiently that which shouldn’t be done at
F DruckerUse LMT, uniform extents, vs
rebuildUse autoextend vs monitoring
Trang 27Appl quality requirementsWhat are others saying? Metalink
Trang 29Knowledgeable if not authorized
Trang 30Troubleshooting
Never worked? Check installationWorked earlier, doesn’t work now? What changed?
Intermittent? (worst kind) How does it vary? With time, system load, hardware?
From Oracle Networking 101 by
Trang 31Key: What is essential?
Don’t document what can easily be figured out
Keeping up-to-date is the crucial aspect
Obsolete documentation is treacherous
Self-documenting where possible
Trang 32Data architect is a DBA career pathParticipate in initial design where your leverage is large
Trang 33Tech Learning List
Application interface methods - Microsoft, Java, OCBC
Server tuningStorage methods and options, strengths and weaknesses
Effective communication proceeds from shared knowledge
Trang 34When you can’t get experience
Be aware of the limitsWell-defined area? (books?)Can earn credentials?
Area where you can gain significant knowledge with a reasonable effort?
Average experience of competitors
Trang 35Know your learning style
Left-brain vs right-brainFour primary learning styles:
Visual (diagrams) Auditory (reading) Tactile (hands-on) Kinesthetic (body)
Your manager’s learning style
Trang 36People Skills
Few people besides a DBA understand what a DBA doesThis makes it hard to communicate your value to the organization
People don’t mind paying for what they value, but resist paying for what they don’t consider valuable
If your manager is a DBA, less
Trang 37We are the hero of our own movie,
we justify ourselves, never the bad guy
Really care about the people you
Trang 38How to avoid problems
Many bad reactions stem from a lack of warning
Emotions play a large role in decision-making
Work hard to warn people ahead of time of what will be coming
Don’t know why? Assume stupidity
A DBA appreciates a heads-up, why shouldn’t others?
Trang 39When you’re wrong, admit it, quickly
Any man worth his salt will stick up for what he believes right, but it takes a slightly better man to acknowledge instantly and without
reservation that he is in
Jackson
Trang 40Feeling no controlConstant interruptionsDBA syndrome - responsible for everything, control nothing, nobody understands
You hear yourself saying “nobody appreciates me”
Antidote: study stress control, exercise
Trang 41That Problem Person
Sandwich / Oreo approach by Rachel Carmichael
1-on-1 outside the officeBegin with a complementMake statements addressing the problem, starting with “I” - “I feel”,
“I think”, “what I see is” ListenWrap with team-building “we can work together on this”, “I need your help”
End with a nice complement
Trang 43Database Audit Form
Periodically audit each databaseChecklist for problems
Form is terse, so I included a sheet describing the purpose of each
check