SlideShare a Scribd company logo
1 of 25
Download to read offline
DBA
Oracle Database
2016.09.12 - JPOUG in 15 minutes #1
Michitoshi Yoshida
(@miyosh0008)
• (@miyosh0008)
• Engineered Systems
Exadata, Exalogic, Exalytics, etc..
• 

etc..
Oracle Database
DB
+ RAC
+ PDB
Oracle DB
1.
2.
3.
4.
•
Chef
-
-
- Recipe Ruby
Puppet
- 2005
- Chef
- Puppet Enterprise
•
Ansible
- Python 2.4
- YAML
- 2015 RedHat
Itamae
- Chef
- Chef Ruby
-
• 

Serverspec
-
- RSpec Ruby
-
Testinfra
- Serverspec Python
- pytest Python
- Serverspec
• 

Infrataster
- Serverspec RSpec
-
: WEB URL HTTP
200 etc..
- Serverspec
1.
2.
Ansible Galaxy
→ Ansible
Python
SSH OK
3.
→ alter
ShellScript OK Ansible
#
: Hello,module! 15 Ansible Bash
4.
→ OS Serverspec 

SQL
SQL
Infrataster
→
Infrataster-plugin-oracledb
• 



• 

- 

- REDO 

- SQL
Infrataster-plugin-oracledb
• Infrataster Gem 

gem bundler 

# 

# m(_ _)m
# zip
$ unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/
oracle/instantclient/
$ unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/
oracle/instantclient/
#
$ cd /opt/oracle/instantclient/instantclient_12_1
$ ln -s libclntsh.so.12.1 libclntsh.so
$ ln -s libocci.so.12.1 libocci.so
$ echo "/opt/oracle/instantclient/instantclient_12_1" >/etc/
ld.so.conf.d/oracle.conf
# .bash_profile
export ORACLE_HOME=/opt/oracle/instantclient/instantclient_12_1
export LD_LIBRARY_PATH=$ORACLE_HOME
Step1: Oracle Instant Client
Basic SDK
#
$ mkdir oracle_test
$ cd oracle_test
# Gemfile
$ cat Gemfile
source 'https://rubygems.org'
gem 'infrataster'
gem ‘infrataster-plugin-oracledb'
#
# : ruby bundler
$ bundle install
$ bundle show | grep infrataster
* infrataster (0.3.2)
* infrataster-plugin-oracledb (0.1.0) # ← OK
Step2: infrataster infrataster-plugin-
oracledb
# spec
$ cp -r $(bundle show infrataster-plugin-oracledb)/spec ./
# spec_helper.rb
$ vi spec/spec_helper.rb
# spec_helper.rb
... ...
Infrataster::Server.define(
:orcl, # ←
‘192.168.56.101', # ←
oracledb: { user: 'system', password: 'oracle',
service_name: 'orcl'},
)
... ...
Step3:
# oracledb_query_spec.rb
$ vi spec/oracledb_query_spec.rb
# oracledb_query_spec.rb
# coding: utf-8
require 'spec_helper'
describe server(:orcl) do
describe oracledb_query('select name,display_value from v
$parameter') do
# check db_block_size
it "initialization parameter 'db_block_size' should equal 8192" do
row = results.find { |r| r['NAME'] == 'db_block_size' }
expect(row['DISPLAY_VALUE'].to_i).to eq 8192
end
end
end
Step4:
: db_block_size 8192
$ bundle exec rspec
Warning: NLS_LANG is not set. fallback to US7ASCII.
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
Randomized with seed 28464
.
Finished in 0.06133 seconds (files took 0.4652 seconds to load)
1 example, 0 failures
Randomized with seed 28464
Step5:
1 0
# .rspec
$ cat .rspec
--color
--format documentation
$ export NLS_LANG=JAPANESE_JAPAN.AL32UTF8
$ bundle exec rspec
... ...
server 'orcl'
oracledb_query 'select name,display_value from v$parameter'
initialization parameter 'db_block_size' should equal 8192
Finished in 0.0545 seconds (files took 0.41626 seconds to load)
1 example, 0 failures
... ...
Step6:
RSpec

More Related Content

What's hot

Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterI Goo Lee
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestratorYoungHeon (Roy) Kim
 
Schema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cSchema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cuzzal basak
 
Spider Setup with AWS/sandbox
Spider Setup with AWS/sandboxSpider Setup with AWS/sandbox
Spider Setup with AWS/sandboxI Goo Lee
 
glance replicator
glance replicatorglance replicator
glance replicatoririx_jp
 
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 ClusterwareLeighton Nelson
 
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationPercona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationmysqlops
 
NoSQL атакует: JSON функции в MySQL сервере.
NoSQL атакует: JSON функции в MySQL сервере.NoSQL атакует: JSON функции в MySQL сервере.
NoSQL атакует: JSON функции в MySQL сервере.Sveta Smirnova
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document StoreI Goo Lee
 
Phd tutorial hawq_v0.1
Phd tutorial hawq_v0.1Phd tutorial hawq_v0.1
Phd tutorial hawq_v0.1seungdon Choi
 
Elasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep diveElasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep diveSematext Group, Inc.
 
How to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraHow to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraSveta Smirnova
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Kyle Hailey
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 MinutesSveta Smirnova
 

What's hot (20)

Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
Query logging with proxysql
Query logging with proxysqlQuery logging with proxysql
Query logging with proxysql
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
Docker Monitoring Webinar
Docker Monitoring  WebinarDocker Monitoring  Webinar
Docker Monitoring Webinar
 
Schema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cSchema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12c
 
Spider Setup with AWS/sandbox
Spider Setup with AWS/sandboxSpider Setup with AWS/sandbox
Spider Setup with AWS/sandbox
 
glance replicator
glance replicatorglance replicator
glance replicator
 
How to Run Solr on Docker and Why
How to Run Solr on Docker and WhyHow to Run Solr on Docker and Why
How to Run Solr on Docker and Why
 
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
 
Percona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replicationPercona Live 2012PPT: introduction-to-mysql-replication
Percona Live 2012PPT: introduction-to-mysql-replication
 
NoSQL атакует: JSON функции в MySQL сервере.
NoSQL атакует: JSON функции в MySQL сервере.NoSQL атакует: JSON функции в MySQL сервере.
NoSQL атакует: JSON функции в MySQL сервере.
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
 
Phd tutorial hawq_v0.1
Phd tutorial hawq_v0.1Phd tutorial hawq_v0.1
Phd tutorial hawq_v0.1
 
Intro to ASH
Intro to ASHIntro to ASH
Intro to ASH
 
Elasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep diveElasticsearch for Logs & Metrics - a deep dive
Elasticsearch for Logs & Metrics - a deep dive
 
Survey of Percona Toolkit
Survey of Percona ToolkitSurvey of Percona Toolkit
Survey of Percona Toolkit
 
How to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with GaleraHow to Avoid Pitfalls in Schema Upgrade with Galera
How to Avoid Pitfalls in Schema Upgrade with Galera
 
Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle Ash masters : advanced ash analytics on Oracle
Ash masters : advanced ash analytics on Oracle
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
 
Stacki - The1600+ Server Journey
Stacki - The1600+ Server JourneyStacki - The1600+ Server Journey
Stacki - The1600+ Server Journey
 

Viewers also liked

進化したのはサーバだけじゃない!〜DBA の毎日をもっと豊かにするユーティリティのすすめ〜
進化したのはサーバだけじゃない!〜DBA の毎日をもっと豊かにするユーティリティのすすめ〜進化したのはサーバだけじゃない!〜DBA の毎日をもっと豊かにするユーティリティのすすめ〜
進化したのはサーバだけじゃない!〜DBA の毎日をもっと豊かにするユーティリティのすすめ〜Michitoshi Yoshida
 
Oracle Database Connect 2017 / JPOUG#1
Oracle Database Connect 2017 / JPOUG#1Oracle Database Connect 2017 / JPOUG#1
Oracle Database Connect 2017 / JPOUG#1Noriyoshi Shinoda
 
Oracle how-to-audit-backup
Oracle how-to-audit-backupOracle how-to-audit-backup
Oracle how-to-audit-backupDaiki Mogmet Ito
 
SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦
SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦
SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦CO-Sol for Community
 
Oracle Database Standard Editionでの運用いろいろ
Oracle Database Standard Editionでの運用いろいろOracle Database Standard Editionでの運用いろいろ
Oracle Database Standard Editionでの運用いろいろKentaro Kitagawa
 
簡単!AWRをEXCELピボットグラフで分析しよう♪
簡単!AWRをEXCELピボットグラフで分析しよう♪簡単!AWRをEXCELピボットグラフで分析しよう♪
簡単!AWRをEXCELピボットグラフで分析しよう♪Yohei Azekatsu
 
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2Ryota Watabe
 
Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能
Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能
Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能Ryota Watabe
 
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違いバックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違いRyota Watabe
 
Enterprise day 2015 - Continuous delivery at Klarna (Klarna)
Enterprise day 2015 - Continuous delivery at Klarna (Klarna)Enterprise day 2015 - Continuous delivery at Klarna (Klarna)
Enterprise day 2015 - Continuous delivery at Klarna (Klarna)Riada AB
 
[A33] [特濃jpoug statspack on pdb oracle database 12c] 20131115 補足・続報付き
[A33] [特濃jpoug statspack on pdb oracle database 12c] 20131115 補足・続報付き[A33] [特濃jpoug statspack on pdb oracle database 12c] 20131115 補足・続報付き
[A33] [特濃jpoug statspack on pdb oracle database 12c] 20131115 補足・続報付きInsight Technology, Inc.
 
SQLチューニング総合診療Oracle CloudWorld出張所
SQLチューニング総合診療Oracle CloudWorld出張所SQLチューニング総合診療Oracle CloudWorld出張所
SQLチューニング総合診療Oracle CloudWorld出張所Hiroshi Sekiguchi
 
Meetup! jpoug oracle cloud world - なーんでだ1
Meetup! jpoug   oracle cloud world - なーんでだ1Meetup! jpoug   oracle cloud world - なーんでだ1
Meetup! jpoug oracle cloud world - なーんでだ1Koji Shinkubo
 
Dbts2013 特濃jpoug log_file_sync
Dbts2013 特濃jpoug log_file_syncDbts2013 特濃jpoug log_file_sync
Dbts2013 特濃jpoug log_file_syncKoji Shinkubo
 
db tech showcase Tokyo 2013 - A35 特濃JPOUG:潮溜まりでジャブジャブ、SQLチューニング
db tech showcase Tokyo 2013 - A35 特濃JPOUG:潮溜まりでジャブジャブ、SQLチューニングdb tech showcase Tokyo 2013 - A35 特濃JPOUG:潮溜まりでジャブジャブ、SQLチューニング
db tech showcase Tokyo 2013 - A35 特濃JPOUG:潮溜まりでジャブジャブ、SQLチューニングHiroshi Sekiguchi
 
Analyzing Oracle Database hang issues using various diagnostics.
Analyzing Oracle Database hang issues using various diagnostics.Analyzing Oracle Database hang issues using various diagnostics.
Analyzing Oracle Database hang issues using various diagnostics.Ryota Watabe
 
Oracle In-database-archiving ~Oracleでの論理削除~
Oracle In-database-archiving ~Oracleでの論理削除~Oracle In-database-archiving ~Oracleでの論理削除~
Oracle In-database-archiving ~Oracleでの論理削除~Daiki Mogmet Ito
 
Oracle cloudworld な〜んでだ?#3
Oracle cloudworld な〜んでだ?#3Oracle cloudworld な〜んでだ?#3
Oracle cloudworld な〜んでだ?#3Hiroshi Sekiguchi
 

Viewers also liked (20)

進化したのはサーバだけじゃない!〜DBA の毎日をもっと豊かにするユーティリティのすすめ〜
進化したのはサーバだけじゃない!〜DBA の毎日をもっと豊かにするユーティリティのすすめ〜進化したのはサーバだけじゃない!〜DBA の毎日をもっと豊かにするユーティリティのすすめ〜
進化したのはサーバだけじゃない!〜DBA の毎日をもっと豊かにするユーティリティのすすめ〜
 
Oracle Database Connect 2017 / JPOUG#1
Oracle Database Connect 2017 / JPOUG#1Oracle Database Connect 2017 / JPOUG#1
Oracle Database Connect 2017 / JPOUG#1
 
Oracle how-to-audit-backup
Oracle how-to-audit-backupOracle how-to-audit-backup
Oracle how-to-audit-backup
 
SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦
SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦
SQL Developerって必要ですか? 株式会社コーソル 河野 敏彦
 
Oracle Database Standard Editionでの運用いろいろ
Oracle Database Standard Editionでの運用いろいろOracle Database Standard Editionでの運用いろいろ
Oracle Database Standard Editionでの運用いろいろ
 
簡単!AWRをEXCELピボットグラフで分析しよう♪
簡単!AWRをEXCELピボットグラフで分析しよう♪簡単!AWRをEXCELピボットグラフで分析しよう♪
簡単!AWRをEXCELピボットグラフで分析しよう♪
 
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い - Database Lounge Tokyo #2
 
Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能
Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能
Standard Edition 2でも使えるOracle Database 12c Release 2オススメ新機能
 
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違いバックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い
バックアップと障害復旧から考えるOracle Database, MySQL, PostgreSQLの違い
 
Enterprise day 2015 - Continuous delivery at Klarna (Klarna)
Enterprise day 2015 - Continuous delivery at Klarna (Klarna)Enterprise day 2015 - Continuous delivery at Klarna (Klarna)
Enterprise day 2015 - Continuous delivery at Klarna (Klarna)
 
MySQL 監査システムを作った話 #mysqlcasual
MySQL 監査システムを作った話 #mysqlcasualMySQL 監査システムを作った話 #mysqlcasual
MySQL 監査システムを作った話 #mysqlcasual
 
[A33] [特濃jpoug statspack on pdb oracle database 12c] 20131115 補足・続報付き
[A33] [特濃jpoug statspack on pdb oracle database 12c] 20131115 補足・続報付き[A33] [特濃jpoug statspack on pdb oracle database 12c] 20131115 補足・続報付き
[A33] [特濃jpoug statspack on pdb oracle database 12c] 20131115 補足・続報付き
 
SQLチューニング総合診療Oracle CloudWorld出張所
SQLチューニング総合診療Oracle CloudWorld出張所SQLチューニング総合診療Oracle CloudWorld出張所
SQLチューニング総合診療Oracle CloudWorld出張所
 
Meetup! jpoug oracle cloud world - なーんでだ1
Meetup! jpoug   oracle cloud world - なーんでだ1Meetup! jpoug   oracle cloud world - なーんでだ1
Meetup! jpoug oracle cloud world - なーんでだ1
 
Dbts2013 特濃jpoug log_file_sync
Dbts2013 特濃jpoug log_file_syncDbts2013 特濃jpoug log_file_sync
Dbts2013 特濃jpoug log_file_sync
 
db tech showcase Tokyo 2013 - A35 特濃JPOUG:潮溜まりでジャブジャブ、SQLチューニング
db tech showcase Tokyo 2013 - A35 特濃JPOUG:潮溜まりでジャブジャブ、SQLチューニングdb tech showcase Tokyo 2013 - A35 特濃JPOUG:潮溜まりでジャブジャブ、SQLチューニング
db tech showcase Tokyo 2013 - A35 特濃JPOUG:潮溜まりでジャブジャブ、SQLチューニング
 
Analyzing Oracle Database hang issues using various diagnostics.
Analyzing Oracle Database hang issues using various diagnostics.Analyzing Oracle Database hang issues using various diagnostics.
Analyzing Oracle Database hang issues using various diagnostics.
 
Oracle In-database-archiving ~Oracleでの論理削除~
Oracle In-database-archiving ~Oracleでの論理削除~Oracle In-database-archiving ~Oracleでの論理削除~
Oracle In-database-archiving ~Oracleでの論理削除~
 
Oracle cloudworld な〜んでだ?#3
Oracle cloudworld な〜んでだ?#3Oracle cloudworld な〜んでだ?#3
Oracle cloudworld な〜んでだ?#3
 
Tuning Tips
Tuning TipsTuning Tips
Tuning Tips
 

Similar to DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜

Introduction to cloudforecast
Introduction to cloudforecastIntroduction to cloudforecast
Introduction to cloudforecastMasahiro Nagano
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellEmily Ikuta
 
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NYPuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NYPuppet
 
Scaling mysql with python (and Docker).
Scaling mysql with python (and Docker).Scaling mysql with python (and Docker).
Scaling mysql with python (and Docker).Roberto Polli
 
Icinga 2009 at OSMC
Icinga 2009 at OSMCIcinga 2009 at OSMC
Icinga 2009 at OSMCIcinga
 
The Architecture of PicCollage Server
The Architecture of PicCollage ServerThe Architecture of PicCollage Server
The Architecture of PicCollage ServerLin Jen-Shin
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Santosh Kangane
 
Relational Database Access with Python ‘sans’ ORM
Relational Database Access with Python ‘sans’ ORM  Relational Database Access with Python ‘sans’ ORM
Relational Database Access with Python ‘sans’ ORM Mark Rees
 
介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 XtrabackupYUCHENG HU
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Kristofferson A
 
Oracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxOracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxRavi Kumar Lanke
 
Bye bye $GLOBALS['TYPO3_DB']
Bye bye $GLOBALS['TYPO3_DB']Bye bye $GLOBALS['TYPO3_DB']
Bye bye $GLOBALS['TYPO3_DB']Jan Helke
 
MySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demoMySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demoKeith Hollman
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMorgan Tocker
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015Dave Stokes
 

Similar to DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜 (20)

Rails Performance
Rails PerformanceRails Performance
Rails Performance
 
Introduction to cloudforecast
Introduction to cloudforecastIntroduction to cloudforecast
Introduction to cloudforecast
 
MySQL 5.7 in a Nutshell
MySQL 5.7 in a NutshellMySQL 5.7 in a Nutshell
MySQL 5.7 in a Nutshell
 
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NYPuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
PuppetDB: A Single Source for Storing Your Puppet Data - PUG NY
 
Scaling mysql with python (and Docker).
Scaling mysql with python (and Docker).Scaling mysql with python (and Docker).
Scaling mysql with python (and Docker).
 
Icinga 2009 at OSMC
Icinga 2009 at OSMCIcinga 2009 at OSMC
Icinga 2009 at OSMC
 
Percona toolkit
Percona toolkitPercona toolkit
Percona toolkit
 
The Architecture of PicCollage Server
The Architecture of PicCollage ServerThe Architecture of PicCollage Server
The Architecture of PicCollage Server
 
Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0Oracle 11g R2 RAC setup on rhel 5.0
Oracle 11g R2 RAC setup on rhel 5.0
 
Curso de MySQL 5.7
Curso de MySQL 5.7Curso de MySQL 5.7
Curso de MySQL 5.7
 
Relational Database Access with Python ‘sans’ ORM
Relational Database Access with Python ‘sans’ ORM  Relational Database Access with Python ‘sans’ ORM
Relational Database Access with Python ‘sans’ ORM
 
介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup介绍 Percona 服务器 XtraDB 和 Xtrabackup
介绍 Percona 服务器 XtraDB 和 Xtrabackup
 
mtl_rubykaigi
mtl_rubykaigimtl_rubykaigi
mtl_rubykaigi
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
 
Oracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxOracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linux
 
Bye bye $GLOBALS['TYPO3_DB']
Bye bye $GLOBALS['TYPO3_DB']Bye bye $GLOBALS['TYPO3_DB']
Bye bye $GLOBALS['TYPO3_DB']
 
MySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demoMySQL 8.0 InnoDB Cluster demo
MySQL 8.0 InnoDB Cluster demo
 
Wider than rails
Wider than railsWider than rails
Wider than rails
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015
 

Recently uploaded

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

DBA だってもっと効率化したい!〜最近の自動化事情とOracle Database〜

  • 1. DBA Oracle Database 2016.09.12 - JPOUG in 15 minutes #1 Michitoshi Yoshida (@miyosh0008)
  • 2. • (@miyosh0008) • Engineered Systems Exadata, Exalogic, Exalytics, etc.. • 
 etc..
  • 3.
  • 7.
  • 9. • Chef - - - Recipe Ruby Puppet - 2005 - Chef - Puppet Enterprise
  • 10. • Ansible - Python 2.4 - YAML - 2015 RedHat Itamae - Chef - Chef Ruby -
  • 11. • 
 Serverspec - - RSpec Ruby - Testinfra - Serverspec Python - pytest Python - Serverspec
  • 12. • 
 Infrataster - Serverspec RSpec - : WEB URL HTTP 200 etc.. - Serverspec
  • 14. 3. → alter ShellScript OK Ansible # : Hello,module! 15 Ansible Bash
  • 15. 4. → OS Serverspec 
 SQL SQL Infrataster →
  • 17. Infrataster-plugin-oracledb • Infrataster Gem 
 gem bundler 
 # 
 # m(_ _)m
  • 18.
  • 19.
  • 20. # zip $ unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /opt/ oracle/instantclient/ $ unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /opt/ oracle/instantclient/ # $ cd /opt/oracle/instantclient/instantclient_12_1 $ ln -s libclntsh.so.12.1 libclntsh.so $ ln -s libocci.so.12.1 libocci.so $ echo "/opt/oracle/instantclient/instantclient_12_1" >/etc/ ld.so.conf.d/oracle.conf # .bash_profile export ORACLE_HOME=/opt/oracle/instantclient/instantclient_12_1 export LD_LIBRARY_PATH=$ORACLE_HOME Step1: Oracle Instant Client Basic SDK
  • 21. # $ mkdir oracle_test $ cd oracle_test # Gemfile $ cat Gemfile source 'https://rubygems.org' gem 'infrataster' gem ‘infrataster-plugin-oracledb' # # : ruby bundler $ bundle install $ bundle show | grep infrataster * infrataster (0.3.2) * infrataster-plugin-oracledb (0.1.0) # ← OK Step2: infrataster infrataster-plugin- oracledb
  • 22. # spec $ cp -r $(bundle show infrataster-plugin-oracledb)/spec ./ # spec_helper.rb $ vi spec/spec_helper.rb # spec_helper.rb ... ... Infrataster::Server.define( :orcl, # ← ‘192.168.56.101', # ← oracledb: { user: 'system', password: 'oracle', service_name: 'orcl'}, ) ... ... Step3:
  • 23. # oracledb_query_spec.rb $ vi spec/oracledb_query_spec.rb # oracledb_query_spec.rb # coding: utf-8 require 'spec_helper' describe server(:orcl) do describe oracledb_query('select name,display_value from v $parameter') do # check db_block_size it "initialization parameter 'db_block_size' should equal 8192" do row = results.find { |r| r['NAME'] == 'db_block_size' } expect(row['DISPLAY_VALUE'].to_i).to eq 8192 end end end Step4: : db_block_size 8192
  • 24. $ bundle exec rspec Warning: NLS_LANG is not set. fallback to US7ASCII. Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} Randomized with seed 28464 . Finished in 0.06133 seconds (files took 0.4652 seconds to load) 1 example, 0 failures Randomized with seed 28464 Step5: 1 0
  • 25. # .rspec $ cat .rspec --color --format documentation $ export NLS_LANG=JAPANESE_JAPAN.AL32UTF8 $ bundle exec rspec ... ... server 'orcl' oracledb_query 'select name,display_value from v$parameter' initialization parameter 'db_block_size' should equal 8192 Finished in 0.0545 seconds (files took 0.41626 seconds to load) 1 example, 0 failures ... ... Step6: RSpec