A33 tips and best practice for db as by francisco alvarez

494 views
423 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
494
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
30
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

A33 tips and best practice for db as by francisco alvarez

  1. 1. Oracle DBA Some tips and Best PracticesTo become a successful professional APAC OTN Tour 2012
  2. 2. 8/9i/10g/11g OCP, RAC OCE, AS OCA, E-Business OCP , SQL /PLSQL OCA , Oracle 7 OCM Oracle 7 , Oracle 11gR2 and OVM 3.1 Beta Tester ITIL Certified Blog: http://oraclenz.wordpress.com Email: mbatec@hotmail.com Twitter: fcomunoz FRANCISCO MUNOZ ALVAREZ Oracle ACE Director NZOUG President LAOUC President CLOUG President IOUC LA Spokesperson Revera – Oracle Professional Services Manager Revera - Copyright 2010 2
  3. 3. Revera - Copyright 2010 3
  4. 4. Revera - Copyright 2010 4
  5. 5. Born Grow up Got Married Mature Now Livinghere here Here here here Revera - Copyright 2010 5
  6. 6. Agenda1 Change yourself2 The 3 Rules3 Evolution of the DBA Role4 Some tips and best practices5 The 3 DBAs Revera - Copyright 2010 6
  7. 7. First: Learn to Comm.Change YourselfIf do you want tobecome a successfulprofessional, first youneed to educate yourselfto be successful! SUCCESS Success InnovateYour future success Attitudedepends only in yourattitude today! Youcontrol your life, nobodyelse! Research Revera - Copyright 2010 7
  8. 8. 8
  9. 9. My 3 Rules 1 Protect Your Data 2 Always Try Before 3 Backup, Backup & Backup
  10. 10. Protect your data! “The most important rule with respect to data is to never put yourself into an unrecoverable situation.” The importance of this guideline cannot be stressed enough, but it does not mean that you can never use time saving or performance enhancing options. 10
  11. 11. Always Try it Before!When it comes to theory, “NEVER” believe anything you hear or read until you have tried it yourself. 11
  12. 12. 12
  13. 13. Backup, Backup & BackupWhy? Because bad stuff happens… 13
  14. 14. Servers (DB/AS) , NET, Security ... Oracle DBsDBA Backups DW Other DBAs And Developers RAC System & Net. Admin. DR & Standby DBs MySQL SQL Server DB2,etc You named Finance HR 14
  15. 15. Some tips and Best Practices Copyright 2010 15
  16. 16. Backup, Backup & Backup Normal Why Approach •Remember each environment is different Always Backup before a change•Nothing bad will happen … is a •Reduce Risks Always Backup after a easy change… Allow an easy Rollback if change •I test it before and nothing necessary If possible Encrypt happens … Could save your job Backups for your security Copyright 2009 16
  17. 17. Have a Good Backup Strategy Normal Backup your Archivelogs Approach to tape several times a day Why Generate a daily Datapump for logical recover, just in case…•I have a full backup daily, that’s enough! Reduce Risks Will have your users happy when ask you to recover a table from last week… Always be proactive, use the “What if…” Methodology Revera - Copyright 2010 17
  18. 18. A massive data outage for Sidekick handheld users has become a massivePR headache for Microsoft and carrier T-Mobile.A massive data outage in Microsofts Danger unit left many T-MobileSidekick users without access to their calendar, address book, and otherkey data. However, things got even worse as Microsoft said in a statementthat data not recovered thus far may be permanently lost. Microsoft andT-Mobile have not said how many of the roughly 800,000 Sidekickcustomers have lost data.T-Mobile USA has, at least temporarily, stopped selling all models of thedevice as the company continues to investigate the recent problems.
  19. 19. Separate Environments Normal Why Approach One server for each environment (Think about OVM) Developers only need to Yes, we have a Dev/Test/Prod. Reduce Risks have full access to DevBut they are in the same server… Allow you to be really Transform Test and Prod Everyone know what each one responsible for the in High Secure areas is doing… Environments We are saving money to the Protect System company… Performance and Availability Protect Business Continuity Revera - Copyright 2010 19
  20. 20. Have a Change Register Normal Why Approach Create your own promotion procedures Always create a Change Request Always try to involve all It’s an small change, no one affected users Will allow you to will notice… Always only promote document and review the It will not affect no one… changes after obtain all process.It’s better to say sorry than ask approvals Will allow others to for authorization… (Share responsibility) review your process. Will contain all approvals and tests (for your safety and mental health) In case a system is affected, will be easy to detect was changed! Revera - Copyright 2010 20
  21. 21. What’s an Incident?“An incident is always when something affects thebusiness continuity or the business revenue” Copyright 2010 21
  22. 22. Incident is always a priority Investigate and solve it as soon as possible After solved, create an Incident report, it will help you to: 1. Detect the root cause of Normal the problem Why Approach 2. Document how it can be prevented to happen again 3. Document all steps to solve the problemI will do it early in the morning when back to the office… Reduce Company It can wait a few minutes Revenue losses more, I’m on break now… Will save your jobIt’s lunch time, will take a look Shows that you really when back… care about your Employer Copyright 2010 22
  23. 23. Avoid Dead Locks Normal Approach Why Create Index on Foreign Keys (Script on www.oraclenz.com) Check for Bitmap Indexes on OLTP Environment•Dead Locks are Developers fault… Improves DB Performance Will help you to have a good relationship with Developers Copyright 2010 23
  24. 24. Automatic Processes Normal Approach Why If a process or work can be made automatic, do it! If it can’t be made automatic, try to delegate I can do it by myself… it! I love to be involved on •You have more important everything… stuff to do! I love to create users, extendtablespaces, change passwords… I love to run a checklist every day… Copyright 2010 24
  25. 25. Oracle Homes Why Normal Approach •Reduce Risks/u01/app/oracle/product/10.2/db_ Allow an easy Rollback if 1 necessary Patches are applied to the same All versions Catalog Oracle Home scripts will be preserved Use a different Oracle Home for each upgrade or Patching, example: /u01/app/oracle/product/10.2/db_02 For the next patch, use a new Oracle Home /u01/app/oracle/product/10.2/db_03 /u01/app/oracle/product/10.2/asm_02 Copyright 2010 25
  26. 26. DB Init Parameters Normal Why Be proactive, set all Approach parameters your environment will need now, specially the ones you can’t not modify later using ALTER SYSTEM.Will change them only when Remember to set •Will avoid inconvenient required! _trace_files_public = TRUE, restarts of the DB. soon or later you will need •Will save you time and to give access to some trace headaches files to the developers. •Be proactive always will improve your DB performance and availability Copyright 2010 26
  27. 27. .LOG Extension Normal Why ApproachI always use .log for my redolog •Someone (including you) files… is the standard! could delete it by mistake. •Use a different extension for redo logs like .RDO Copyright 2010 27
  28. 28. Metadata Repository Normal Why ApproachI have all I need on my current Allow you to detect DB. changes easily. I use my Dev/Test as a DDL Allow you to create your repository. own Version Control. You never know when you will need it Create your own metadata repository. Use datapump for this : $ expdp user/password content=metadata_only full=y directory=datapump dumpfile=metadata_24112010.dmp $ impdp user/password directory=datapump dumpfile= metadata_24112010.dmp sqlfile=metadata_24112010.sql Copyright 2010 28
  29. 29. Non OFA Layout Normal Approach Why Let’s Oracle manage all usingOFA, that way all will be standard on all environments. •Easy to manage and keep organized •Allow you to use different mount points •Reduce Risks /oracle/(prod/qa/test/dev)/SID/* /u01/udump – for user files /proddata/SID/* /prodbackup/SID/* /prodlogs/SID/* Copyright 2010 29
  30. 30. Study, Study & Study Normal Why ApproachI know everything I need… •Will keep you up to date • You never know when you will need to use it Will help with your professional development Read Manuals /Read the official documentation at http://tahiti.oracle.com Read and practice OBE at OTN website Help others at OTN Forums (Fantastic way to learn) Participate at OUG Activities (If possible try to speak) Copyright 2010 30
  31. 31. Listen! Ask Question! Be involved Normal Why Approach Dont just sit back waiting for the create table requests.I just will do something when Learn more about your •Know what to do before asked to do… systems and users necessary If is working I don’t need to •Allow you to know who to care… contact in case of… •Show how engaged you are with the company Copyright 2010 31
  32. 32. 3 Kind of DBA’s 1 The Firefighter 2 The Proactive 3 The Balanced
  33. 33. What kind of DBA are you?Copyright 2010 34
  34. 34. Questions? Comments? Francisco Munoz Alvarez Auckland New Zealand franciscoa@dbisonline.com Copyright 2010 35

×