Oracle DBA Best
Practices
Dennis Williams
Senior Database Administrator
Lifetouch, Inc.
About Me
TCOUG member since 1990
8 years only DBA at Lifetouch, Inc.
Lawson Software Database
Research Engineer
Consultant - Fingerhut
Control Data
Contact me at
Audience
Those considering DBA career
DBAs who want to improve
Those forced to tolerate DBAs
There’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
Hon Industries
Agenda
Time - Until lunch is ready
Left-brain portion - tech. Issues
Right-brain portion - softer issues
Database audit form
75,610 DBAs
U.S. Bureau of Labor Statistics in
2003 began tracking the IT
workforce.
6.46% unemployed
There are 797,445 Software
Engineers (5.3% unemployed)
DBA supports about 10
developers.
66% DBA growth by 2010
Where do DBAs come from?
Schools don’t offer a degree.
Developer
DB developer
System Administrator
DBA is a role
Like a policeman or teacher
Unstated responsibilities,
expectations
Most people don’t know what a
DBA does.
DBA time breakdown
22% Fire Fighting
33% Monitoring
12% Perf. Tuning / Change Mgt.
33% Development Support
0% Planning for growth
0% Backup & Recovery Planning
0% Learning
Koopman
Assignment
Keep a personal time log - 1 week
Learn your time distribution
Target improvements
Study time management
Levels of Oracle DBA
Rookie
Veteran Expert
TCOUG
No time
Studies
Member,
On the
attends reg. board
Concepts
Architecture
Admin.
Commands
No time
Reads
manuals
Takes
OCP, books
classes
Manuals
Learning
Online
No time
forums
New Oracle Uses any
features
feature
Very
familiar
OCM,
author,
conferences
Lurks, asks Answers
questions
Wary of
Creates
new feature tests to find
problems
OCP
Misconception: you are an expert
Multiple choice, so simple
questions
Broad, not deep
Career benefit - can’t hurt
Can help you go deeper in Oracle
Types of DBAs:
Development DBA
May carry developer title
Develop code ( PL/SQL )
“Hunter” personality (find/fix/forget)
Best practices: Code Complete by
McConnell
Production Support DBA
Keep it running
“shepherd / farmer” personality
Where 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
Application DBA
Supports a business critical app.
like Oracle Financials, SAP,
Peoplesoft, Lawson
Production support, some dev.
Key skill: understands how the
app. Interacts with Oracle
Can’t self-study
Caution: Vendor doesn’t operate
databases in production
Consultant DBA
Fastest way to get expertise
Varied work opportunities
Understand economic cycles
Backup is Job #1
Ensuring data is never lost
Don’t trust an untested backup
configuration
Be ready to perform any type of
recovery at any time
Communicate vulnerabilities,
recovery times to management
Archivelog mode by default
Cold or Hot backups, which best
fits your environment
Export: the DBAs friend
Enhance recoverability
Easy to recover a single table,
avoid full recovery
Checks block corruption
Teach your developers to request
special exports
Validate, no errors, Unix strings
command, last line should be EXIT
Security is Job #2
DBA is responsible for making data
available to authorized users
Keeping data inaccessible to
unauthorized
Role: policy, implementation
Know security options, implications
Know how application affects
security, data sensitivity
Making it work
Dev to Prod
ITIL
3 environments - test/stage/prod
Clone DB from backup
Developers provide scripts to
change production
Simple application login test
Always have a backout plan
Is this change worth the possible
consequences?
Oracle 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
Server statistics
If you have a performance
problem, either your
database is working too
hard, or it’s not being
allowed to work. - Jonathan
Lewis
You must know what your server is
doing.
You must know the O.S.
Unix Admin. - your best friend
Bind variables
Ensure developers use bind
variables
Audit v$sql in test to verify
In Java, PreparedStatement
In .net, CommandText,
CreateParameter, Append
Connection pooling
Not your Dad’s Oracle
tuning
Rules of thumb, ratios to
mathematical foundations
Counts to measured times in
microseconds
Aggregate by instance to process
details
V$ tables are either too
summarized or point-in-time
Goal of tuning
What matters to the business user
Good chance to sell value
End-to-end analysis
DBA must prove innocence