SlideShare ist ein Scribd-Unternehmen logo
1 von 54
© 2015 Delphix. All Rights Reserved. Private & Confidential.!
How to avoid boring work!
Automation for DBAs!
Irish Oracle User Group!
!
Marcin Przepiorowski!
!
!
March 2015!
Delphix	
  at	
  a	
  Glance	
  
Enterprise	
  so2ware	
  (private,	
  hybrid,	
  public	
  cloud):	
  radically	
  improves	
  data	
  delivery	
  	
  
Data	
  as	
  a	
  Service	
  Pla6orm	
  for	
  applica<ons,	
  databases,	
  data	
  warehouses,	
  and	
  files	
  
•  Con<nuously	
  collects	
  data,	
  stores	
  in	
  <me	
  machine,	
  and	
  shares	
  data	
  blocks	
  	
  
•  Virtualizes	
  data:	
  99%	
  faster	
  delivery	
  (months	
  to	
  minutes),	
  90%	
  smaller	
  size	
  
•  Improves	
  return	
  on	
  applica<on	
  project	
  investments	
  by	
  50%	
  on	
  average	
  
Founded	
  in	
  2008,	
  HQ	
  in	
  Menlo	
  Park,	
  California,	
  300	
  employees	
  
Select	
  Customers	
  
n  >100%	
  renewal	
  rate	
  
n  Subscrip<on	
  so2ware	
  
n  >$100M	
  life<me	
  sales	
  
Financial	
  Highlights	
  
	
  
Investors	
  
  Jedidiah Yueh, President & CEO
•  Founder of Avamar (acquired by EMC), !
•  >$2B sales, 10,000+ customers!
  Rick Caccia, VP Marketing
•  VP Product Marketing, HP/ArcSight!
•  Senior Director Product Management, Symantec!
  Dan Graves, VP Product Management
•  Symantec Cloud CTO ($1B product line)!
  Mark Boullie, VP Sales Americas
•  SVP WW Field Ops, Perfecto Mobile!
•  ArcSight VP Americas, scaled to $200M!
  Iain Chidgey, VP Sales EMEA
•  ArcSight VP EMEA, scaled to $100M!
  Chris Poulos, VP Sales APJ
•  ArcSight, HP VP APJ , scaled to $100M!
  Marco Aurelio
•  VP Professional Services Oracle!
•  VP PS SAP, launched customer success practice!
MANAGEMENT
  Adam Leventhal, CTO
•  Co-founder, inventor D-Trace!
•  Wall Street Journal Gold Innovation Award!
  Eric Schrock, VP Engineering
•  Lead Architect Sun 7000 storage appliance!
•  5,000+ customers!
Vinay Srihari
•  Oracle Senior Director of Engineering, Active Data Guard
(50,000+ Oracle Enterprise customers)!
  Matthew Ahrens, Architect
•  Co-founder, inventor ZFS, advanced file system with over $400M
sales ,10,000+ customers!
  Mike Stewart
•  Architect Oracle Flashback (50,000+ customers)!
  Francisco Sanchez
•  Architect Oracle RMAN (250,000+ customers)!
  Kyle Hailey
•  Principal architect Oracle Enterprise Manager performance
pages!
•  Designer of Embarcadero’s DB Optimizer!
ENGINEERING
About	
  me	
  
Oracle	
  consultant	
  since	
  2000	
  
	
  
co-­‐developer	
  of	
  OraSASH	
  –	
  free	
  ASH/AWR	
  like	
  
repository	
  
	
  
Blogger	
  
	
  
	
  
Agenda	
  
What	
  is	
  a	
  boring	
  work	
  ?	
  
Why	
  we	
  should	
  avoid	
  it	
  ?	
  
How	
  to	
  avoid	
  boring	
  work	
  ?	
  	
  
	
  
What	
  is	
  a	
  boring	
  work	
  ?	
  
Set	
  of	
  manual	
  task	
  done	
  daily	
  
	
  
6	
  
What	
  is	
  a	
  boring	
  work	
  ?	
  
Repor<ng	
  
7	
  
What	
  is	
  a	
  boring	
  work	
  ?	
  
Repea<ng	
  same	
  task	
  on	
  number	
  of	
  devices	
  
	
  
	
  
8	
  
How	
  to	
  avoid	
  a	
  boring	
  work	
  ?	
  
Set	
  of	
  manual	
  task	
  done	
  daily	
  
	
  
9	
  
How	
  to	
  avoid	
  a	
  boring	
  work	
  ?	
  
Automa<c	
  /	
  intelligent	
  repor<ng	
  
	
  
10	
  
How	
  to	
  avoid	
  a	
  boring	
  work	
  ?	
  
Repea<ng	
  same	
  task	
  on	
  number	
  of	
  devices	
  
	
  
11	
  
AUTOMATION	
  
12	
  
AutomaFon	
  
Prevent	
  from	
  complex	
  manual	
  tasks	
  
	
  
Help	
  to	
  keep	
  all	
  environment	
  configured	
  in	
  the	
  
same	
  way	
  	
  
	
  
Improve	
  person	
  /	
  team	
  performance	
  	
  
and	
  liability	
  –	
  especially	
  ops	
  /	
  on-­‐call	
  person	
  
	
  
13	
  
On	
  call	
  DBA	
  working	
  during	
  night	
  
	
  
14	
  
	
  
	
  
Typing	
  long	
  instruc<on	
  
	
  
15	
  
AutomaFon	
  for	
  DBAs	
  –	
  tasks:	
  
•  Daily	
  ops	
  	
  
•  Monitoring	
  
•  Changes	
  
•  Patching	
  
•  New	
  installa<on	
  
•  Cloning	
  	
  
	
  
16	
  
Avoid	
  manual	
  work	
  	
  
(	
  when	
  possible	
  )	
  
17	
  
	
  
	
  
	
  
	
  
	
  
Examples:	
  Data	
  Guard	
  configuraFon	
  
Use:	
  
•  RMAN	
  duplicate	
  from	
  ac<ve	
  	
  
(especially	
  in	
  12c)	
  
•  Data	
  Guard	
  Broker	
  	
  
18	
  
	
  
	
  
	
  
	
  
	
  
Examples:	
  Space	
  management:	
  
Use:	
  
•  ASM	
  /	
  big	
  files	
  
•  OMF	
  
	
  
If	
  need	
  more	
  control:	
  
•  Jobs	
  to	
  add	
  files	
  
•  Triggers	
  to	
  check	
  files	
  names	
  	
  
19	
  
AutomaFon	
  for	
  DBAs	
  -­‐	
  tools	
  
•  Oracle	
  Enterprise	
  Manager	
  12c	
  
•  Ansible	
  
•  Old	
  fashion	
  scripts	
  
•  Puppet	
  /	
  Chef	
  /	
  cfengine	
  /	
  etc	
  
	
  
20	
  
Oracle	
  Enterprise	
  Manager	
  12c	
  
EMCLI	
  /	
  GUI	
  
•  Provisioning	
  
•  Patching	
  
•  Monitoring	
  /	
  aler<ng	
  
•  Jobs	
  
•  Daily	
  opera<on	
  	
  
•  Changes	
  	
  
21	
  
Oracle	
  Enterprise	
  Manager	
  12c	
  
Provisioning	
  
22	
  
23	
  
24	
  
Oracle	
  Enterprise	
  Manager	
  12c	
  
Patching	
  
•  Nice	
  and	
  easy	
  when	
  EM	
  connected	
  to	
  MOS	
  
•  Good	
  integra<on	
  with	
  EM	
  
	
  
What	
  
•  Oracle	
  DB	
  	
  
•  Middleware	
  (with	
  some	
  caveats)	
  
25	
  
26	
  
27	
  
28	
  
OEM	
  12c	
  Monitoring	
  /	
  alerFng:	
  
•  Monitor	
  on	
  system	
  level	
  not	
  target	
  level	
  
•  Avoid	
  OK	
  messages	
  
•  Avoid	
  spam	
  
	
  
29	
  
OEM	
  12c	
  Monitoring	
  /	
  alerFng:	
  
Backup	
  alerts	
  
•  if	
  there	
  is	
  no	
  backup	
  status	
  at	
  cutover	
  <me	
  	
  
•  when	
  is	
  no	
  successful	
  backup	
  
No	
  alerts	
  –	
  Backup	
  OK	
  –	
  no	
  ac<on	
  needed	
  
(so	
  no	
  need	
  to	
  send	
  mail	
  /	
  alert)	
  
	
  
30	
  
OEM	
  12c	
  Jobs:	
  
•  GUI	
  	
  
	
  Disable	
  20	
  jobs	
  –	
  20	
  clicks	
  
	
  
•  EMCLI	
  	
  
	
  emcli	
  login	
  -­‐username=sysman	
  
	
  emcli	
  suspend_job	
  –name=<pamern>	
  
	
  
	
  
31	
  
Ansible	
  
•  Open	
  Source	
  
•  Agent	
  less	
  –	
  using	
  SSH	
  
•  Fast	
  learning	
  curve	
  
	
  
	
  
hmp://www.ansible.com/home	
  
hmps://github.com/ansible/ansible	
  
“Ansible	
  is	
  a	
  radically	
  simple	
  IT	
  automa<on	
  system.	
  It	
  handles	
  configura<on-­‐
management,	
  applica<on	
  deployment,	
  cloud	
  provisioning,	
  ad-­‐hoc	
  task-­‐execu<on,	
  and	
  
mul<node	
  orchestra<on”	
  
	
   32	
  
Ansible	
  
•  Wrimen	
  in	
  Python	
  
•  Minimal	
  requirements	
  on	
  target	
  
•  No	
  official	
  Oracle/Weblogic	
  module	
  
•  Search	
  GitHub	
  for	
  community	
  work	
  
33	
  
Ansible	
  
ansible	
  
one	
  command/script	
  for	
  set	
  of	
  hosts	
  
	
  
	
  
ansible-­‐playbook	
  
set	
  of	
  ac<ons	
  for	
  set	
  of	
  hosts	
  
	
  
34	
  
Ansible	
  
•  Add	
  SSH	
  public	
  key	
  into	
  authorized_keys	
  
•  Create	
  template	
  
•  Run	
  script	
  
	
  
35	
  
Add	
  SSH	
  public	
  key	
  into	
  authorized_keys	
  
ansible
-k -i inventory/mac all
-m authorized_key
-a "user=oracle key="{{ lookup('file’,‘id_rsa.pub') }}"
”
---
- hosts: all
tasks:
- name: Add ssh key
authorized_key:
user=oracle
key="{{ lookup('file', ’/id_rsa.pub') }}"
	
  
	
  
36	
  
Create	
  template	
  –	
  Jinja2	
  
List of databases SID for {{ ansible_hostname }}
{% for item in databases %}
- {{ item }}
{% endfor %}
---
- hosts: all
tasks:
- name: generate scripts
template: src=template.j2 dest=/tmp/output mode=644
	
  
37	
  
Run	
  script	
  
ORACLE_SID=$1
export ORAENV_ASK=NO
. oraenv > /dev/null
sqlplus -s / as sysdba << EOF
set head off
select decode(cnt, 0, 'OK', 'FAILURE') from (
select count(*) cnt from dba_users where 

account_status like '%LOCKED%' and username = 'SCOTT'
);
exit
EOF
	
  
38	
  
Run	
  script	
  
---
- hosts: all
tasks:
- name: check status
script: check_user.sh {{ item }}
with_items: databases
register: result
failed_when: "'FAILURE' in result.stdout"
	
  
39	
  
Ansible	
  -­‐	
  Provisioning	
  
Provisioning	
  based	
  on:	
  
•  Core	
  Ansible	
  modules	
  
•  Oracle	
  response	
  files	
  
•  Playbooks	
  
•  Roles	
  
40	
  
Ansible	
  -­‐	
  Provisioning	
  
Example	
  RAC	
  Amack	
  12c	
  
	
  
	
  
	
  
	
  
	
  
github.com/oravirt/ansible-­‐oracle	
  
	
   41	
  
42	
  
Ansible	
  -­‐	
  Check	
  patch	
  
---
- hosts: all
vars:
patch_number:
- 19121551
- 19121552
oracle_home: "/u01/app/oracle/product/11.2.0/dbhome_1"
tasks:
- name: Check
stat: path={{ oracle_home }}/inventory/oneoffs/{{ item }}
with_items: patch_number
register: patch_status
failed_when: not patch_status.stat.exists
ignore_errors: True
	
   43	
  
Ansible	
  -­‐	
  Patching	
  
•  Using	
  opatch	
  and	
  scp/wget	
  to	
  copy	
  files	
  
•  Can	
  be	
  run	
  from	
  any	
  client	
  with	
  Ansible	
  
•  Check	
  example	
  on	
  Frits	
  Hoogland	
  blog	
  
fritshoogland.wordpress.com	
  
	
  
44	
  
Ansible	
  	
  
Real	
  world	
  examples	
  
45	
  
Ansible	
  -­‐	
  Patching	
  
---
- hosts: all
  vars:
  - name: check u01 free disk space
  - name: check tmp free disk space
  - name: create directory for installation files
  - name: copy opatch and psu 
  - name: install opatch in database home
  - name: unzip psu patch
  - name: patch conflict detection
  - name: apply psu 
  - name: clean up install directory
 	
  
46	
  
Ansible	
  –	
  Weblogic	
  SSO	
  
---
- hosts: formal
tasks:
- name: check out config
- name: test connection
- name: Copy krb.conf to etc
- name: Copy keytab
- name: copy krb5Login.conf.j2 template to WLS
- name: run kinit
- name: add SSO conf to setCustom
- name: configure AD in Weblogic
- name: configure Weblogic SSO provider
- name: reorder providers	
  
47	
  
Ansible	
  –	
  Host	
  prep	
  for	
  Weblogic	
  
---
- hosts: all
tasks:
- name: check out config
- name: Copy oem.repo to etc
- name: Add oem ssh key
- name: delete public repo
- name: upgrade all packages
- name: disable existing repo if any
- name: install Java - copy rpm
- name: install java - yum
- name: generating hosts file
- name: add NFS software share
- name: add user
- name: add samba /shared
48	
  
Cloning	
  /	
  Data	
  Provisioning	
  
•  Typically	
  most	
  complex	
  /	
  <me	
  consuming	
  task	
  
•  Some	
  system	
  are	
  too	
  big	
  for	
  Data	
  Pump	
  
and	
  this	
  generally	
  slow	
  process	
  
•  Need	
  mul<	
  team	
  coopera<on	
  for	
  big	
  system	
  
(storage	
  /	
  OS	
  /	
  DBA)	
  
49	
  
Cloning	
  /	
  Data	
  Provisioning	
  
If	
  s<ll	
  using	
  Data	
  Pump	
  	
  
	
  
	
  
50	
  
Automate	
  it	
  
use	
  scripts	
  or	
  bemer	
  PL/SQL	
  API	
  and	
  develop	
  
one	
  click	
  refresh	
  procedure	
  
	
  
Cloning	
  /	
  Data	
  Provisioning	
  
•  Storage	
  snapshot	
  –	
  OS	
  /	
  Storage	
  /	
  DB	
  admin	
  
•  Oracle	
  SnapClone	
  –	
  Self	
  service	
  
•  Delphix	
  –	
  Self	
  service	
  
51	
  
But	
  this	
  is	
  topic	
  for	
  other	
  presenta<on	
  	
  
The	
  Goal	
  :	
  	
  	
  Theory	
  of	
  Constraints	
  
	
  Improvement	
  
	
  not	
  made	
  	
  
	
  at	
  the	
  constraint	
  
	
  is	
  an	
  illusion	
  
factory	
  floor	
  op<miza<on	
  
DevOps	
  :	
  	
  
•  Goals	
  	
  Clarify	
  	
  
•  Metrics	
  	
  Define	
  	
  
•  Constraints	
  	
  Iden<fy	
  	
  
•  Priori<es	
  	
  Set	
  	
  
•  Itera<ons	
  Fast	
  	
  
•  Con<nuous	
  Integra<on	
  
•  Cloud	
  	
  
•  Agile	
  	
  
•  Kanban	
  
•  Kata	
  
	
  
“IT	
  is	
  the	
  factory	
  floor	
  of	
  this	
  century”	
  
Thank	
  you!	
  
Marcin	
  Przepiorowski	
  
	
  
marcin@delphix.com	
  
	
  
oracleprof.blogspot.ie	
  
	
  
@pioro	
  
	
  

Weitere ähnliche Inhalte

Was ist angesagt?

OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
Enkitec
 

Was ist angesagt? (20)

Oracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known FeaturesOracle Exadata Performance: Latest Improvements and Less Known Features
Oracle Exadata Performance: Latest Improvements and Less Known Features
 
Tanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata MigrationsTanel Poder - Performance stories from Exadata Migrations
Tanel Poder - Performance stories from Exadata Migrations
 
PDB Provisioning with Oracle Multitenant Self Service Application
PDB Provisioning with Oracle Multitenant Self Service ApplicationPDB Provisioning with Oracle Multitenant Self Service Application
PDB Provisioning with Oracle Multitenant Self Service Application
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
 
LVOUG meetup #2 - Forcing SQL Execution Plan Instability
LVOUG meetup #2 - Forcing SQL Execution Plan InstabilityLVOUG meetup #2 - Forcing SQL Execution Plan Instability
LVOUG meetup #2 - Forcing SQL Execution Plan Instability
 
Performance Management in Oracle 12c
Performance Management in Oracle 12cPerformance Management in Oracle 12c
Performance Management in Oracle 12c
 
Simplifying EBS 12.2 ADOP - Collaborate 2019
Simplifying EBS 12.2 ADOP - Collaborate 2019   Simplifying EBS 12.2 ADOP - Collaborate 2019
Simplifying EBS 12.2 ADOP - Collaborate 2019
 
Collaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR ReportCollaborate 2019 - How to Understand an AWR Report
Collaborate 2019 - How to Understand an AWR Report
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new features
 
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...
 
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
 
Database as a Service on the Oracle Database Appliance Platform
Database as a Service on the Oracle Database Appliance PlatformDatabase as a Service on the Oracle Database Appliance Platform
Database as a Service on the Oracle Database Appliance Platform
 
Java Application Servers Are Dead!
Java Application Servers Are Dead!Java Application Servers Are Dead!
Java Application Servers Are Dead!
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Open Policy Agent for governance as a code
Open Policy Agent for governance as a code Open Policy Agent for governance as a code
Open Policy Agent for governance as a code
 
Performance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12cPerformance Tuning Oracle Weblogic Server 12c
Performance Tuning Oracle Weblogic Server 12c
 
No more Big Data Hacking—Time for a Complete ETL Solution with Oracle Data In...
No more Big Data Hacking—Time for a Complete ETL Solution with Oracle Data In...No more Big Data Hacking—Time for a Complete ETL Solution with Oracle Data In...
No more Big Data Hacking—Time for a Complete ETL Solution with Oracle Data In...
 
Best Practices - PHP and the Oracle Database
Best Practices - PHP and the Oracle DatabaseBest Practices - PHP and the Oracle Database
Best Practices - PHP and the Oracle Database
 

Ähnlich wie Avoid boring work_v2

Monitor Engineered Systems from a Single Pane of Glass: Oracle Enterprise Man...
Monitor Engineered Systems from a Single Pane of Glass: Oracle Enterprise Man...Monitor Engineered Systems from a Single Pane of Glass: Oracle Enterprise Man...
Monitor Engineered Systems from a Single Pane of Glass: Oracle Enterprise Man...
Alfredo Krieg
 
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle ClusterwareManaging Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Leighton Nelson
 

Ähnlich wie Avoid boring work_v2 (20)

CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptx
CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptxCON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptx
CON5451_Brydon-OOW2014_Brydon_CON5451 (1).pptx
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 
6 Ways of Solve Your Oracle Dev-Test Problems Using All-Flash Storage and Cop...
6 Ways of Solve Your Oracle Dev-Test Problems Using All-Flash Storage and Cop...6 Ways of Solve Your Oracle Dev-Test Problems Using All-Flash Storage and Cop...
6 Ways of Solve Your Oracle Dev-Test Problems Using All-Flash Storage and Cop...
 
Ipc mysql php
Ipc mysql php Ipc mysql php
Ipc mysql php
 
06 network automationwithansible
06 network automationwithansible06 network automationwithansible
06 network automationwithansible
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
AWS Webcast - AWS OpsWorks Continuous Integration Demo
AWS Webcast - AWS OpsWorks Continuous Integration Demo  AWS Webcast - AWS OpsWorks Continuous Integration Demo
AWS Webcast - AWS OpsWorks Continuous Integration Demo
 
Monitor Engineered Systems from a Single Pane of Glass: Oracle Enterprise Man...
Monitor Engineered Systems from a Single Pane of Glass: Oracle Enterprise Man...Monitor Engineered Systems from a Single Pane of Glass: Oracle Enterprise Man...
Monitor Engineered Systems from a Single Pane of Glass: Oracle Enterprise Man...
 
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle ClusterwareManaging Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
 
IaC MeetUp Active Directory Setup for Oracle Security LAB
IaC MeetUp Active Directory Setup for Oracle Security LABIaC MeetUp Active Directory Setup for Oracle Security LAB
IaC MeetUp Active Directory Setup for Oracle Security LAB
 
XPages on Bluemix - the Do's and Dont's
XPages on Bluemix - the Do's and Dont'sXPages on Bluemix - the Do's and Dont's
XPages on Bluemix - the Do's and Dont's
 
Dev Ops without the Ops
Dev Ops without the OpsDev Ops without the Ops
Dev Ops without the Ops
 
Oracle Fusion Middleware provisioning with Puppet
Oracle Fusion Middleware provisioning with PuppetOracle Fusion Middleware provisioning with Puppet
Oracle Fusion Middleware provisioning with Puppet
 
Ceph Deployment at Target: Customer Spotlight
Ceph Deployment at Target: Customer SpotlightCeph Deployment at Target: Customer Spotlight
Ceph Deployment at Target: Customer Spotlight
 
Ceph Deployment at Target: Customer Spotlight
Ceph Deployment at Target: Customer SpotlightCeph Deployment at Target: Customer Spotlight
Ceph Deployment at Target: Customer Spotlight
 
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...
[db tech showcase Tokyo 2018] #dbts2018 #B31 『1,2,3 and Done! 3 easy ways to ...
 
Running Oracle EBS in the cloud (OAUG Collaborate 18 edition)
Running Oracle EBS in the cloud (OAUG Collaborate 18 edition)Running Oracle EBS in the cloud (OAUG Collaborate 18 edition)
Running Oracle EBS in the cloud (OAUG Collaborate 18 edition)
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )
 
Oracle Fusion Middleware on Exalogic Best Practises
Oracle Fusion Middleware on Exalogic Best PractisesOracle Fusion Middleware on Exalogic Best Practises
Oracle Fusion Middleware on Exalogic Best Practises
 
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)
 

Kürzlich hochgeladen

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 

Avoid boring work_v2

  • 1. © 2015 Delphix. All Rights Reserved. Private & Confidential.! How to avoid boring work! Automation for DBAs! Irish Oracle User Group! ! Marcin Przepiorowski! ! ! March 2015!
  • 2. Delphix  at  a  Glance   Enterprise  so2ware  (private,  hybrid,  public  cloud):  radically  improves  data  delivery     Data  as  a  Service  Pla6orm  for  applica<ons,  databases,  data  warehouses,  and  files   •  Con<nuously  collects  data,  stores  in  <me  machine,  and  shares  data  blocks     •  Virtualizes  data:  99%  faster  delivery  (months  to  minutes),  90%  smaller  size   •  Improves  return  on  applica<on  project  investments  by  50%  on  average   Founded  in  2008,  HQ  in  Menlo  Park,  California,  300  employees   Select  Customers   n  >100%  renewal  rate   n  Subscrip<on  so2ware   n  >$100M  life<me  sales   Financial  Highlights     Investors  
  • 3.   Jedidiah Yueh, President & CEO •  Founder of Avamar (acquired by EMC), ! •  >$2B sales, 10,000+ customers!   Rick Caccia, VP Marketing •  VP Product Marketing, HP/ArcSight! •  Senior Director Product Management, Symantec!   Dan Graves, VP Product Management •  Symantec Cloud CTO ($1B product line)!   Mark Boullie, VP Sales Americas •  SVP WW Field Ops, Perfecto Mobile! •  ArcSight VP Americas, scaled to $200M!   Iain Chidgey, VP Sales EMEA •  ArcSight VP EMEA, scaled to $100M!   Chris Poulos, VP Sales APJ •  ArcSight, HP VP APJ , scaled to $100M!   Marco Aurelio •  VP Professional Services Oracle! •  VP PS SAP, launched customer success practice! MANAGEMENT   Adam Leventhal, CTO •  Co-founder, inventor D-Trace! •  Wall Street Journal Gold Innovation Award!   Eric Schrock, VP Engineering •  Lead Architect Sun 7000 storage appliance! •  5,000+ customers! Vinay Srihari •  Oracle Senior Director of Engineering, Active Data Guard (50,000+ Oracle Enterprise customers)!   Matthew Ahrens, Architect •  Co-founder, inventor ZFS, advanced file system with over $400M sales ,10,000+ customers!   Mike Stewart •  Architect Oracle Flashback (50,000+ customers)!   Francisco Sanchez •  Architect Oracle RMAN (250,000+ customers)!   Kyle Hailey •  Principal architect Oracle Enterprise Manager performance pages! •  Designer of Embarcadero’s DB Optimizer! ENGINEERING
  • 4. About  me   Oracle  consultant  since  2000     co-­‐developer  of  OraSASH  –  free  ASH/AWR  like   repository     Blogger      
  • 5. Agenda   What  is  a  boring  work  ?   Why  we  should  avoid  it  ?   How  to  avoid  boring  work  ?      
  • 6. What  is  a  boring  work  ?   Set  of  manual  task  done  daily     6  
  • 7. What  is  a  boring  work  ?   Repor<ng   7  
  • 8. What  is  a  boring  work  ?   Repea<ng  same  task  on  number  of  devices       8  
  • 9. How  to  avoid  a  boring  work  ?   Set  of  manual  task  done  daily     9  
  • 10. How  to  avoid  a  boring  work  ?   Automa<c  /  intelligent  repor<ng     10  
  • 11. How  to  avoid  a  boring  work  ?   Repea<ng  same  task  on  number  of  devices     11  
  • 13. AutomaFon   Prevent  from  complex  manual  tasks     Help  to  keep  all  environment  configured  in  the   same  way       Improve  person  /  team  performance     and  liability  –  especially  ops  /  on-­‐call  person     13  
  • 14. On  call  DBA  working  during  night     14      
  • 16. AutomaFon  for  DBAs  –  tasks:   •  Daily  ops     •  Monitoring   •  Changes   •  Patching   •  New  installa<on   •  Cloning       16  
  • 17. Avoid  manual  work     (  when  possible  )   17            
  • 18. Examples:  Data  Guard  configuraFon   Use:   •  RMAN  duplicate  from  ac<ve     (especially  in  12c)   •  Data  Guard  Broker     18            
  • 19. Examples:  Space  management:   Use:   •  ASM  /  big  files   •  OMF     If  need  more  control:   •  Jobs  to  add  files   •  Triggers  to  check  files  names     19  
  • 20. AutomaFon  for  DBAs  -­‐  tools   •  Oracle  Enterprise  Manager  12c   •  Ansible   •  Old  fashion  scripts   •  Puppet  /  Chef  /  cfengine  /  etc     20  
  • 21. Oracle  Enterprise  Manager  12c   EMCLI  /  GUI   •  Provisioning   •  Patching   •  Monitoring  /  aler<ng   •  Jobs   •  Daily  opera<on     •  Changes     21  
  • 22. Oracle  Enterprise  Manager  12c   Provisioning   22  
  • 23. 23  
  • 24. 24  
  • 25. Oracle  Enterprise  Manager  12c   Patching   •  Nice  and  easy  when  EM  connected  to  MOS   •  Good  integra<on  with  EM     What   •  Oracle  DB     •  Middleware  (with  some  caveats)   25  
  • 26. 26  
  • 27. 27  
  • 28. 28  
  • 29. OEM  12c  Monitoring  /  alerFng:   •  Monitor  on  system  level  not  target  level   •  Avoid  OK  messages   •  Avoid  spam     29  
  • 30. OEM  12c  Monitoring  /  alerFng:   Backup  alerts   •  if  there  is  no  backup  status  at  cutover  <me     •  when  is  no  successful  backup   No  alerts  –  Backup  OK  –  no  ac<on  needed   (so  no  need  to  send  mail  /  alert)     30  
  • 31. OEM  12c  Jobs:   •  GUI      Disable  20  jobs  –  20  clicks     •  EMCLI      emcli  login  -­‐username=sysman    emcli  suspend_job  –name=<pamern>       31  
  • 32. Ansible   •  Open  Source   •  Agent  less  –  using  SSH   •  Fast  learning  curve       hmp://www.ansible.com/home   hmps://github.com/ansible/ansible   “Ansible  is  a  radically  simple  IT  automa<on  system.  It  handles  configura<on-­‐ management,  applica<on  deployment,  cloud  provisioning,  ad-­‐hoc  task-­‐execu<on,  and   mul<node  orchestra<on”     32  
  • 33. Ansible   •  Wrimen  in  Python   •  Minimal  requirements  on  target   •  No  official  Oracle/Weblogic  module   •  Search  GitHub  for  community  work   33  
  • 34. Ansible   ansible   one  command/script  for  set  of  hosts       ansible-­‐playbook   set  of  ac<ons  for  set  of  hosts     34  
  • 35. Ansible   •  Add  SSH  public  key  into  authorized_keys   •  Create  template   •  Run  script     35  
  • 36. Add  SSH  public  key  into  authorized_keys   ansible -k -i inventory/mac all -m authorized_key -a "user=oracle key="{{ lookup('file’,‘id_rsa.pub') }}" ” --- - hosts: all tasks: - name: Add ssh key authorized_key: user=oracle key="{{ lookup('file', ’/id_rsa.pub') }}"     36  
  • 37. Create  template  –  Jinja2   List of databases SID for {{ ansible_hostname }} {% for item in databases %} - {{ item }} {% endfor %} --- - hosts: all tasks: - name: generate scripts template: src=template.j2 dest=/tmp/output mode=644   37  
  • 38. Run  script   ORACLE_SID=$1 export ORAENV_ASK=NO . oraenv > /dev/null sqlplus -s / as sysdba << EOF set head off select decode(cnt, 0, 'OK', 'FAILURE') from ( select count(*) cnt from dba_users where 
 account_status like '%LOCKED%' and username = 'SCOTT' ); exit EOF   38  
  • 39. Run  script   --- - hosts: all tasks: - name: check status script: check_user.sh {{ item }} with_items: databases register: result failed_when: "'FAILURE' in result.stdout"   39  
  • 40. Ansible  -­‐  Provisioning   Provisioning  based  on:   •  Core  Ansible  modules   •  Oracle  response  files   •  Playbooks   •  Roles   40  
  • 41. Ansible  -­‐  Provisioning   Example  RAC  Amack  12c             github.com/oravirt/ansible-­‐oracle     41  
  • 42. 42  
  • 43. Ansible  -­‐  Check  patch   --- - hosts: all vars: patch_number: - 19121551 - 19121552 oracle_home: "/u01/app/oracle/product/11.2.0/dbhome_1" tasks: - name: Check stat: path={{ oracle_home }}/inventory/oneoffs/{{ item }} with_items: patch_number register: patch_status failed_when: not patch_status.stat.exists ignore_errors: True   43  
  • 44. Ansible  -­‐  Patching   •  Using  opatch  and  scp/wget  to  copy  files   •  Can  be  run  from  any  client  with  Ansible   •  Check  example  on  Frits  Hoogland  blog   fritshoogland.wordpress.com     44  
  • 45. Ansible     Real  world  examples   45  
  • 46. Ansible  -­‐  Patching   --- - hosts: all   vars:   - name: check u01 free disk space   - name: check tmp free disk space   - name: create directory for installation files   - name: copy opatch and psu    - name: install opatch in database home   - name: unzip psu patch   - name: patch conflict detection   - name: apply psu    - name: clean up install directory     46  
  • 47. Ansible  –  Weblogic  SSO   --- - hosts: formal tasks: - name: check out config - name: test connection - name: Copy krb.conf to etc - name: Copy keytab - name: copy krb5Login.conf.j2 template to WLS - name: run kinit - name: add SSO conf to setCustom - name: configure AD in Weblogic - name: configure Weblogic SSO provider - name: reorder providers   47  
  • 48. Ansible  –  Host  prep  for  Weblogic   --- - hosts: all tasks: - name: check out config - name: Copy oem.repo to etc - name: Add oem ssh key - name: delete public repo - name: upgrade all packages - name: disable existing repo if any - name: install Java - copy rpm - name: install java - yum - name: generating hosts file - name: add NFS software share - name: add user - name: add samba /shared 48  
  • 49. Cloning  /  Data  Provisioning   •  Typically  most  complex  /  <me  consuming  task   •  Some  system  are  too  big  for  Data  Pump   and  this  generally  slow  process   •  Need  mul<  team  coopera<on  for  big  system   (storage  /  OS  /  DBA)   49  
  • 50. Cloning  /  Data  Provisioning   If  s<ll  using  Data  Pump         50   Automate  it   use  scripts  or  bemer  PL/SQL  API  and  develop   one  click  refresh  procedure    
  • 51. Cloning  /  Data  Provisioning   •  Storage  snapshot  –  OS  /  Storage  /  DB  admin   •  Oracle  SnapClone  –  Self  service   •  Delphix  –  Self  service   51   But  this  is  topic  for  other  presenta<on    
  • 52. The  Goal  :      Theory  of  Constraints    Improvement    not  made      at  the  constraint    is  an  illusion   factory  floor  op<miza<on  
  • 53. DevOps  :     •  Goals    Clarify     •  Metrics    Define     •  Constraints    Iden<fy     •  Priori<es    Set     •  Itera<ons  Fast     •  Con<nuous  Integra<on   •  Cloud     •  Agile     •  Kanban   •  Kata     “IT  is  the  factory  floor  of  this  century”  
  • 54. Thank  you!   Marcin  Przepiorowski     marcin@delphix.com     oracleprof.blogspot.ie     @pioro