Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oracle DBA Best Practices Dennis Williams Senior Database Administrator Lifetouch, Inc.

Similar presentations


Presentation on theme: "Oracle DBA Best Practices Dennis Williams Senior Database Administrator Lifetouch, Inc."— Presentation transcript:

1 Oracle DBA Best Practices Dennis Williams Senior Database Administrator Lifetouch, Inc.

2 About Me n TCOUG member since 1990 n 8 years only DBA at Lifetouch, Inc. n Lawson Software Database Research Engineer n Consultant - Fingerhut n Control Data n Contact me at dwilliams@lifetouch.com

3 Audience n Those considering DBA career n DBAs who want to improve n Those forced to tolerate DBAs

4 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

5 Agenda n Time - Until lunch is ready n Left-brain portion - tech. Issues n Right-brain portion - softer issues n Database audit form

6 75,610 DBAs n U.S. Bureau of Labor Statistics in 2003 began tracking the IT workforce. n 6.46% unemployed n There are 797,445 Software Engineers (5.3% unemployed) n DBA supports about 10 developers. n 66% DBA growth by 2010

7 Where do DBAs come from? n Schools don’t offer a degree. n Developer DB developer n System Administrator

8 DBA is a role n Like a policeman or teacher n Unstated responsibilities, expectations n Most people don’t know what a DBA does.

9 DBA time breakdown n 22% Fire Fighting n 33% Monitoring n 12% Perf. Tuning / Change Mgt. n 33% Development Support n 0% Planning for growth n 0% Backup & Recovery Planning n 0% Learning Koopman

10 Assignment n Keep a personal time log - 1 week n Learn your time distribution n Target improvements n Study time management

11 Levels of Oracle DBA

12 OCP n Misconception: you are an expert n Multiple choice, so simple questions n Broad, not deep n Career benefit - can’t hurt n Can help you go deeper in Oracle

13 Types of DBAs: Development DBA n May carry developer title n Develop code ( PL/SQL ) n “Hunter” personality (find/fix/forget) n Best practices: Code Complete by McConnell

14 Production Support DBA n Keep it running n “shepherd / farmer” personality n Where best practices really make a difference n The hero isn’t the DBA that battles problems through the weekend, but the one that avoided the problem

15 Application DBA n Supports a business critical app. like Oracle Financials, SAP, Peoplesoft, Lawson n Production support, some dev. n Key skill: understands how the app. Interacts with Oracle n Can’t self-study n Caution: Vendor doesn’t operate databases in production

16 Consultant DBA n Fastest way to get expertise n Varied work opportunities n Understand economic cycles

17 Backup is Job #1 n Ensuring data is never lost n Don’t trust an untested backup configuration n Be ready to perform any type of recovery at any time n Communicate vulnerabilities, recovery times to management n Archivelog mode by default n Cold or Hot backups, which best fits your environment

18 Export: the DBAs friend n Enhance recoverability n Easy to recover a single table, avoid full recovery n Checks block corruption n Teach your developers to request special exports n Validate, no errors, Unix strings command, last line should be EXIT

19 Security is Job #2 n DBA is responsible for making data available to authorized users n Keeping data inaccessible to unauthorized n Role: policy, implementation n Know security options, implications n Know how application affects security, data sensitivity

20 Making it work Dev to Prod n ITIL n 3 environments - test/stage/prod n Clone DB from backup n Developers provide scripts to change production n Simple application login test n Always have a backout plan n Is this change worth the possible consequences?

21 Oracle Performance Tuning - Types n SQL Statements - explain plan, tkprof, 10053 events n Application disasters - 10046 trace, Cary Millsap (TCOUG Hotsos seminar) n Proactive tuning and hanging - STATSPACK, utlestat/utlbstat

22 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 n You must know what your server is doing. n You must know the O.S. n Unix Admin. - your best friend

23 Bind variables n Ensure developers use bind variables n Audit v$sql in test to verify n In Java, PreparedStatement n In.net, CommandText, CreateParameter, Append n Connection pooling

24 Not your Dad’s Oracle tuning n Rules of thumb, ratios to mathematical foundations n Counts to measured times in microseconds n Aggregate by instance to process details n V$ tables are either too summarized or point-in-time

25 Goal of tuning n What matters to the business user n Good chance to sell value n End-to-end analysis n DBA must prove innocence

26 Monitoring There is nothing so useless as doing efficiently that which shouldn’t be done at all - Peter F. Drucker n Use LMT, uniform extents, vs. rebuild n Use autoextend vs. monitoring n Email exceptional conditions

27 Oracle Versions Be not the first by whom the new are tried, nor yet the last to lay the old aside - Alexander Pope n Good choice saves downtime n Support by appl, O.S. n Rule of 4’s - 7.3.4, 8.1.7.4, 9.2.0.4 n Timing - can I skip versions? n Appl. quality requirements n What are others saying? Metalink n Only change one major component

28 Oracle Patches n Two philosophies: u Only when bug arises u Immediately (security) n Vendor testing hierarchy: u Version u Patch set u Individual patch

29 Oracle Licensing n Install defaults to all - know what costs extra n Consider Standard Version n Understand the organization budget mechanisms n Knowledgeable if not authorized

30 Troubleshooting n Never worked? Check installation n Worked earlier, doesn’t work now? What changed? n Intermittent? (worst kind) How does it vary? With time, system load, hardware? From Oracle Networking 101 by Marlene Theriault

31 Documentation n Key: What is essential? n Don’t document what can easily be figured out n Keeping up-to-date is the crucial aspect. n Obsolete documentation is treacherous n Self-documenting where possible

32 Data Modeling n O-O Developer: Database is just a means to persist classes n DBA: Good data modeling can ensure the data is usable across the enterprise n Data architect is a DBA career path n Participate in initial design where your leverage is large n Learn data modeling software

33 Tech. Learning List n Application interface methods - Microsoft, Java, OCBC n Server tuning n Storage methods and options, strengths and weaknesses n Effective communication proceeds from shared knowledge

34 Self-Study n When you can’t get experience n Be aware of the limits n Well-defined area? (books?) n Can earn credentials? n Area where you can gain significant knowledge with a reasonable effort? n Average experience of competitors is short n Enjoy after doing 10 years?

35 Know your learning style n Left-brain vs. right-brain n Four primary learning styles: u Visual (diagrams) u Auditory (reading) u Tactile (hands-on) u Kinesthetic (body) n Your manager’s learning style

36 People Skills n Few people besides a DBA understand what a DBA does n This makes it hard to communicate your value to the organization n People don’t mind paying for what they value, but resist paying for what they don’t consider valuable n If your manager is a DBA, less people skills are required, but this is career-limiting

37 Respect n Do you respect someone who doesn’t respect you? n The root of much conflict is a mutual lack of respect n Smartness paradox n We are the hero of our own movie, we justify ourselves, never the bad guy n Really care about the people you work with

38 How to avoid problems n Many bad reactions stem from a lack of warning n Emotions play a large role in decision-making n Work hard to warn people ahead of time of what will be coming n Don’t know why? Assume stupidity n A DBA appreciates a heads-up, why shouldn’t others?

39 When you’re wrong, admit it, quickly n 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 error- Andrew Jackson

40 Stress n Feeling no control n Constant interruptions n DBA syndrome - responsible for everything, control nothing, nobody understands n You hear yourself saying “nobody appreciates me” n Antidote: study stress control, exercise n visit clients, future changes

41 That Problem Person n Sandwich / Oreo approach by Rachel Carmichael n 1-on-1 outside the office n Begin with a complement n Make statements addressing the problem, starting with “I” - “I feel”, “I think”, “what I see is”. Listen n Wrap with team-building “we can work together on this”, “I need your help” n End with a nice complement

42 Simple Explanations n The most valuable people are those who can understand complex issues and explain them simply to others n Makes other feel good about themselves n Albert Einstein, Steve Hawking, Carl Sagan, Richard Feynman

43 Database Audit Form n Periodically audit each database n Checklist for problems n Form is terse, so I included a sheet describing the purpose of each check


Download ppt "Oracle DBA Best Practices Dennis Williams Senior Database Administrator Lifetouch, Inc."

Similar presentations


Ads by Google