SlideShare a Scribd company logo
The Enterprise Manager
Command Line Interface
Kellyn Pot’Vin
Sr. Technical Consultant Enkitec
About Me
 Kellyn Pot’Vin,
 Westminster, Colorado
 Oracle ACE Director, Sr. Technical Specialist at
Enkitec
 Finishing up EM12c book and starting EM CLI book
 Specialize in performance and management of large
enterprise environments.
 Board of directors for RMOUG, Director of Training
Days Conference, KSCOPE DB Track Lead 2013
 Blog: DBAKevlar.com
 Twitter: @DBAKevlar
Challenges of Topic
 What to Include?
 What to Exclude?
 What are the most important areas of the EM
CLI?
 What commands are best covered to create the
best educational introduction to the topic?
Agenda
 Enterprise Manager Command Line Interface
History
 How EM12c has changed level of knowledge
requirements for the administrator
 The Command Line Interface Basics
 Enterprise Manager commands
 EM CLI Procedure Scripting
EM CLI
 Introduced in Oracle 9i with very limited use.
 Access to EM functionality from text based
consoles.
 Ability to incorporate scripts, including SQL*Plus,
Perl, Shell, Python, etc.
 Fully integrated as part of the EM environment,
including same security.
 Ability to simplify multi-target tasks through
command line interface.
What We Can Do-
 Create Jobs, schedule jobs, delete jobs
 Administer groups, members, targets
 Administer users and credentials.
 Upload patches, delete patches-create patch
plans.
 Execute host and SQL commands.
 Get information about all targets, monitoring.
 Over 30 verb “groups” and 250 commands that
I have documented “so far”.
EM CLI Terminology
 EM CLI Login- Online or Offline?
 “Verbs” grant the administrator initial
commands for the interface.
 May Require one or more arguments.
 Can utilize a argument file, aka properties file.
 Syntax often changes with version of Enterprise
Manager.
emcli help <verb>
Must be Logged in…
 The Command Line must be logged into for the first
time before commands will be accepted, (login
dependent upon EM security time out feature or
connection mode.)
emcli login –username=<username>
 Syncronize the EMCLI with the OMS:
emcli sync
Unless You Set to “Offline”
 Check connection mode, if complete, then offline
the EM CLI
emcli get_connection_mode
emcli set_connection_mode -mode="offline“
emcli get_jobs
Set back to online mode if wanting to proceed.
EM CLI Syntax
emcli
<verb>
1st_argument[-name, -procedure,
-instance, -guid, -argfile,
-input_file, -type, -targets,
-action…] = <value>
2nd_argument [-xml, -tailLength,
-info, -analyze, -grants,
-scheduler, -notification] = <value>
Redirection
 Redirection example of output, (similar to Unix):
emcli get_procedure_xml –
procedure=“PROC_GUID” >
test_proc.xml
Common Verbs(aka arguments)
 get_resolution_states - Incident Information
 stop/start_agent - Manage Agents
 create/stop_blackout - Manage Blackouts
 clone_database_home - Clone home
 execute_sql - Execute SQL
 get_jobs - Get a list of jobs
 clear_stateless_alerts - Clears stateless
alerts
 Argfile: File of verbs to execute from the emcli.
Agenda: Baby Steps
 EM CLI for EM12c support
● Checking Incidents
● Retrieve Targets Monitored
● Retrieve Agent Properties
● Agent Deployment
● Platform support
● Creating/Stopping Blackouts
● Executing Host Commands
Checking the Incidents in EM12c
emcli get_resolution_states
Simple EM CLI Command
 What database targets are being monitored, both
single instance and RAC?
emcli get_targets -targets="%database%"
What’s Platforms are Supported?
emcli get_supported_platforms
Download for Agent Deploy
emcli get_agentimage
-destination=/home/oracle
-platform="Microsoft Windows x64
(64-bit)" –version="12.1.0.1.0"
Agent Deployment Steps
emcli get_targets
emcli delete_target –name="<trg_nm>“
emcli import_update –file="file_nm"
–omslocal
emcli deploy_plugin_on_server
-plugin=oracle.sysman.db –
sys_password=<passwd>
emcli deploy_plugin_on_agent –
plugin="oracle.sysman.db" –
agent_name="<dbname>:<port>"
Final Configuration of Target
emcli set_credential
-target_type=oracle_database
-target_name="<preferred_nm>"-
credential_set=DBCredsMonitoring -
user=sysman
-
column="Role:SYSDBA;UserName:sys;passwor
d:<passwd>"-monitoring
Tips For Success
 Save off Templates
 Inventory Existing Jobs
 Create secure credentials for targets
 Create administrator groups to ease
administration.
 Reuse templates, post creating first one, easy
updates!
Create a Blackout
emcli create_blackout -name="Linux
Patch 120612" -reason="Needs to be
Done"
-add_targets="emrep12:oracle_databas
e" -schedule="duration::60“
How fast could you blackout an entire
environment for maintenance window with
this scripted?
Stop Blackout
Simply state the name of the blackout and the
agent will issue a stop to the OMS:
emcli stop_blackout
-name="Linux Patch 120612“
How quickly could you end a blackout of
environment post maintenance?
“get_blackout_reasons”
Executing Host Commands
emcli execute_hostcmd –cmd=“ls
-ltr /home/oracle”
-credential_set_name=“HostCredsPriv”
-targets=“<host>.com:host”
Why jobs from EM CLI?
 Simplify management of large number of
targets with simple script vs. multiple steps
through EM12c console.
 This simplicity includes creating, managing,
editing and purging of jobs and patching job
tasks.
 Retain EM12c security and single console
monitoring if required.
Verify Details of Job Execution
 Need to verify job information
emcli get_jobs
Details Based off Execution
emcli get_job_execution_detail
-execution=C07388B855B44C38B5953B8C3
C7C6A5E -xml
Patching Simplified through the EM CLI
 Assumption is that patches are downloaded via
EM12c.
 Process:
● Verify Patch Available.
● Create Patch Plan
● Schedule Patches in Patch Plan
● Deploy Patch Plan
Power of List_aru_xx cmds
 list_aru_languages -- List ARU Language
information.
 list_aru_platforms -- List ARU platform
information.
 list_aru_products -- List ARU Product information.
 list_aru_releases -- List ARU Release
information.
 list_patch_plans -- List existing Patch Plans.
 search_patches -- Search patches from ARU
site or Software
Search Available Patches
emcli search_patches
-patch_name="patch number"
-platform="platform id“
emcli search_patches
–patch_name=“5875660” (BI Publisher)
–platform=“233” (Windows 64 bit)
Procedural Scripting in EM CLI
 Multi-step, multi-tasked or chained scripting
through the EM CLI.
 Ability to execute SQL, Perl, OS Commands
from one procedure.
 Ability to use properties file to simplify work and
reuse with other procedures.
 EM Console access through Job Activity
Interface.
Submitting an EM CLI procedure
emcli submit_procedure
-name='<Procedure Name>'
-input_file="<data:path to file>"
-instance_name="<Procedure
Instance>"
-schedule=start_time:yyyy/mm/dd
HH:mm;
Example of Submit Procedure- EM Job
emcli submit_procedure
-input_file=data:data.xml
-procedure=3D7F4D139E70453CB56D7621
BB56D390
-schedule="start_time:2012/12/03
21:00; tz:America/Central"
-grants="KPOTVIN:VIEW_JOB;
SYSMAN:FULL_JOB"
-notification="action required,
failed"
Properties Files
 Create a template to use for your new
properties file, sourced from a procedure
definition.
 Fill in all pertinent information for the target
lists.
 Submit the procedure, using the properties file
as part or whole of the entry at the command
line.
 Verify all was successful.
Get the Procedure Name
emcli get_procedures –type=DBPROV
Example Output:
$>BFC71D3485629B93E04014AC08001B7D,
DBPROV, DBREPLAYCLIENTDP_NG,
Provision Oracle Database Client,
6.2, ORACLE
BFC71D3485599B93E04014AC08001B7D,
DBPROV, SIHA_SIDB_PROC, Provision
Oracle Database, 1.1, ORACLE
Creating a Template
Using the GUID, (or the procedure <NAME>, we
can then generate a properties file template:
emcli describe_procedure_input –
procedure=
BFC71D3485629B93E04014AC08001B7D >
dbreplay_tst.properties
$> Verifying parameters…
$>
Updating with a New Target
Edit the new template properties file and add the
new values for the following:
$ vi dbreplay_tst.properties
Source and Reference Host Data
Agent Info
Oracle Home
Credentials
Submit your Procedure with Properties
File
emcli submit_procedure –
name=test_dbrpl_job
-owner=sys_jobs
-procedure=
C23E10B1F427B4EEE040578CD74442G4
-
input_file=/u01/emjobs/emcli/dbreplay_tst.
properties
-notification="action required, failed"
-grants=“KPOTVIN:VIEW_JOB;
SYSMAN:FULL_JOB"
-schedule= "start_time:2012/12/06
01:00:00; tz:America/Denver"
Verify from EM CLI
emcli get_instance_status
-instance=C23E10B1F427B4EEE040578CD7
4442G4
-details -showJobOutput
Output:
C23E10B1F427B4EEE040578CD74442G4
, test_job, test_job, SUCCESSFUL
Want to Read More?
Rob Zoeteweij, Patching with EM12c
http://oemgc.wordpress.com/tag/oem-gc-12c/
Laurent Leturgez, Useful EMCLI Commands
http://laurentleturgez.wordpress.com/2012/06/11/
useful-emcli-commands-in-em-cloud-control-12c/
Laurent Schneider, The EM CLI
http://laurentschneider.com/wordpress/2011/11/e
nterprise-manager-command-line-interface.html
Thank you!
http://enkitec.com
http://dbakevlar.com
dbakevlar@gmail.com
kpotvin@enkitec.com

More Related Content

What's hot

Java secure development part 3
Java secure development   part 3Java secure development   part 3
Java secure development part 3
Rafel Ivgi
 
Os solve bs 301-0 s-lab10
Os solve bs 301-0 s-lab10Os solve bs 301-0 s-lab10
Os solve bs 301-0 s-lab10
ugahmad123
 
Oracle OEM 12C : monitoring nouvelle génération - Pierre Sicot - dbi services
Oracle OEM 12C : monitoring nouvelle génération - Pierre Sicot - dbi servicesOracle OEM 12C : monitoring nouvelle génération - Pierre Sicot - dbi services
Oracle OEM 12C : monitoring nouvelle génération - Pierre Sicot - dbi services
dbi services
 
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Microsoft TechNet
 
Advanced Shell Scripting for Oracle professionals
Advanced Shell Scripting for Oracle professionalsAdvanced Shell Scripting for Oracle professionals
Advanced Shell Scripting for Oracle professionals
Andrejs Vorobjovs
 
JUDCon Brazil 2013 - Domain Models with JBoss AS 7
JUDCon Brazil 2013 - Domain Models with JBoss AS 7JUDCon Brazil 2013 - Domain Models with JBoss AS 7
JUDCon Brazil 2013 - Domain Models with JBoss AS 7Samuel Tauil
 
Weblogic command line
Weblogic command lineWeblogic command line
Weblogic command line
Aditya Bhuyan
 
[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cooljavablend
 

What's hot (9)

Java secure development part 3
Java secure development   part 3Java secure development   part 3
Java secure development part 3
 
Os solve bs 301-0 s-lab10
Os solve bs 301-0 s-lab10Os solve bs 301-0 s-lab10
Os solve bs 301-0 s-lab10
 
Oracle OEM 12C : monitoring nouvelle génération - Pierre Sicot - dbi services
Oracle OEM 12C : monitoring nouvelle génération - Pierre Sicot - dbi servicesOracle OEM 12C : monitoring nouvelle génération - Pierre Sicot - dbi services
Oracle OEM 12C : monitoring nouvelle génération - Pierre Sicot - dbi services
 
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
 
Advanced Shell Scripting for Oracle professionals
Advanced Shell Scripting for Oracle professionalsAdvanced Shell Scripting for Oracle professionals
Advanced Shell Scripting for Oracle professionals
 
JUDCon Brazil 2013 - Domain Models with JBoss AS 7
JUDCon Brazil 2013 - Domain Models with JBoss AS 7JUDCon Brazil 2013 - Domain Models with JBoss AS 7
JUDCon Brazil 2013 - Domain Models with JBoss AS 7
 
Weblogic command line
Weblogic command lineWeblogic command line
Weblogic command line
 
[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool
 
Mysql tracing
Mysql tracingMysql tracing
Mysql tracing
 

Viewers also liked

COTA NextGen Evaluation Framework
COTA NextGen Evaluation FrameworkCOTA NextGen Evaluation Framework
COTA NextGen Evaluation Framework
COTA BUS
 
Pequeña y mediana empresa
Pequeña y mediana empresaPequeña y mediana empresa
Pequeña y mediana empresa
omarjesus0711
 
Oracle Data Redaction - EOUC
Oracle Data Redaction - EOUCOracle Data Redaction - EOUC
Oracle Data Redaction - EOUC
Alex Zaballa
 
Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Paris Container Day 2016 : Cloudunit v2 (Treeptik)Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Publicis Sapient Engineering
 
Q4 15 slides ugi-final
Q4 15 slides ugi-finalQ4 15 slides ugi-final
Q4 15 slides ugi-final
AmeriGas
 
Jeff and Kellyn's ECO Keynote, Pt. 2
Jeff and Kellyn's ECO Keynote, Pt. 2Jeff and Kellyn's ECO Keynote, Pt. 2
Jeff and Kellyn's ECO Keynote, Pt. 2
Kellyn Pot'Vin-Gorman
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
Kellyn Pot'Vin-Gorman
 
Partitioning tables and indexing them
Partitioning tables and indexing them Partitioning tables and indexing them
Partitioning tables and indexing them
Hemant K Chitale
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 
The Five Ways of Building Oracle Applications
The Five Ways of Building Oracle ApplicationsThe Five Ways of Building Oracle Applications
The Five Ways of Building Oracle Applications
Sten Vesterli
 
What's next after Upgrade to 12c
What's next after Upgrade to 12cWhat's next after Upgrade to 12c
What's next after Upgrade to 12c
Guatemala User Group
 
01 VHST-hot stamping die
01 VHST-hot stamping die01 VHST-hot stamping die
01 VHST-hot stamping dieTina Deng
 
Oracle 12.2 sharding learning more
Oracle 12.2 sharding learning moreOracle 12.2 sharding learning more
Oracle 12.2 sharding learning more
Leyi (Kamus) Zhang
 
Oracle ADF Overview
Oracle ADF OverviewOracle ADF Overview
Oracle ADF OverviewBahaa Farouk
 
Oracle Web Logic server
Oracle Web Logic serverOracle Web Logic server
Oracle Web Logic server
Rakesh Gujjarlapudi
 
Accenture Enkitec Group: Oracle database and Engineered Systems
Accenture Enkitec Group: Oracle database and Engineered SystemsAccenture Enkitec Group: Oracle database and Engineered Systems
Accenture Enkitec Group: Oracle database and Engineered Systems
Accenture Operations
 

Viewers also liked (17)

COTA NextGen Evaluation Framework
COTA NextGen Evaluation FrameworkCOTA NextGen Evaluation Framework
COTA NextGen Evaluation Framework
 
Pequeña y mediana empresa
Pequeña y mediana empresaPequeña y mediana empresa
Pequeña y mediana empresa
 
Oracle Data Redaction - EOUC
Oracle Data Redaction - EOUCOracle Data Redaction - EOUC
Oracle Data Redaction - EOUC
 
Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Paris Container Day 2016 : Cloudunit v2 (Treeptik)Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Paris Container Day 2016 : Cloudunit v2 (Treeptik)
 
Q4 15 slides ugi-final
Q4 15 slides ugi-finalQ4 15 slides ugi-final
Q4 15 slides ugi-final
 
Jeff and Kellyn's ECO Keynote, Pt. 2
Jeff and Kellyn's ECO Keynote, Pt. 2Jeff and Kellyn's ECO Keynote, Pt. 2
Jeff and Kellyn's ECO Keynote, Pt. 2
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
 
Partitioning tables and indexing them
Partitioning tables and indexing them Partitioning tables and indexing them
Partitioning tables and indexing them
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
The Five Ways of Building Oracle Applications
The Five Ways of Building Oracle ApplicationsThe Five Ways of Building Oracle Applications
The Five Ways of Building Oracle Applications
 
What's next after Upgrade to 12c
What's next after Upgrade to 12cWhat's next after Upgrade to 12c
What's next after Upgrade to 12c
 
01 VHST-hot stamping die
01 VHST-hot stamping die01 VHST-hot stamping die
01 VHST-hot stamping die
 
Denim wash
Denim washDenim wash
Denim wash
 
Oracle 12.2 sharding learning more
Oracle 12.2 sharding learning moreOracle 12.2 sharding learning more
Oracle 12.2 sharding learning more
 
Oracle ADF Overview
Oracle ADF OverviewOracle ADF Overview
Oracle ADF Overview
 
Oracle Web Logic server
Oracle Web Logic serverOracle Web Logic server
Oracle Web Logic server
 
Accenture Enkitec Group: Oracle database and Engineered Systems
Accenture Enkitec Group: Oracle database and Engineered SystemsAccenture Enkitec Group: Oracle database and Engineered Systems
Accenture Enkitec Group: Oracle database and Engineered Systems
 

Similar to Kscope emcli kpotvin

Oracle Enterprise Manager 12c: EMCLI Crash Course
Oracle Enterprise Manager 12c: EMCLI Crash CourseOracle Enterprise Manager 12c: EMCLI Crash Course
Oracle Enterprise Manager 12c: EMCLI Crash Course
Gokhan Atil
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTP
Mustafa TURAN
 
SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)
SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)
SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)webhostingguy
 
Sunil phani's take on windows powershell
Sunil phani's take on windows powershellSunil phani's take on windows powershell
Sunil phani's take on windows powershell
Sunil Phani
 
Powershell Tech Ed2009
Powershell Tech Ed2009Powershell Tech Ed2009
Powershell Tech Ed2009rsnarayanan
 
Jenkins Pipelines Advanced
Jenkins Pipelines AdvancedJenkins Pipelines Advanced
Jenkins Pipelines Advanced
Oliver Lemm
 
Monitoring Agile PLM with JConsole
Monitoring Agile PLM with JConsole Monitoring Agile PLM with JConsole
Monitoring Agile PLM with JConsole
PLM Mechanic .
 
Cognitive data capture with Elis - Rossum's technical webinar
Cognitive data capture with Elis - Rossum's technical webinarCognitive data capture with Elis - Rossum's technical webinar
Cognitive data capture with Elis - Rossum's technical webinar
Petr Baudis
 
Code Generation as a Service
Code Generation as a ServiceCode Generation as a Service
Code Generation as a Service
Dimitris Kolovos
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)
ÇözümPARK
 
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubPowershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge Club
Essam Salah
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
Ilias Okacha
 
Performance tuning a quick intoduction
Performance tuning   a quick intoductionPerformance tuning   a quick intoduction
Performance tuning a quick intoduction
Riyaj Shamsudeen
 
20201010 - Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
20201010 -  Collabdays 2020 - Sandro Pereira - Power Automates: best practice...20201010 -  Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
20201010 - Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
Sandro Pereira
 
AD102 - Break out of the Box
AD102 - Break out of the BoxAD102 - Break out of the Box
AD102 - Break out of the Box
Karl-Henry Martinsson
 
Building a cloud management megam.io
Building a cloud management megam.io Building a cloud management megam.io
Building a cloud management megam.io Yeshwanth Kumar
 
Oracle Solaris 11.1 New Features
Oracle Solaris 11.1 New FeaturesOracle Solaris 11.1 New Features
Oracle Solaris 11.1 New FeaturesOrgad Kimchi
 
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfLearn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
ClapperboardCinemaPV
 
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
Scott Sutherland
 
Drupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsDrupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on Windows
Alessandro Pilotti
 

Similar to Kscope emcli kpotvin (20)

Oracle Enterprise Manager 12c: EMCLI Crash Course
Oracle Enterprise Manager 12c: EMCLI Crash CourseOracle Enterprise Manager 12c: EMCLI Crash Course
Oracle Enterprise Manager 12c: EMCLI Crash Course
 
Re-Design with Elixir/OTP
Re-Design with Elixir/OTPRe-Design with Elixir/OTP
Re-Design with Elixir/OTP
 
SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)
SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)
SDC - Programming the CLR in SQL Server 2005.ppt (1.51 MB)
 
Sunil phani's take on windows powershell
Sunil phani's take on windows powershellSunil phani's take on windows powershell
Sunil phani's take on windows powershell
 
Powershell Tech Ed2009
Powershell Tech Ed2009Powershell Tech Ed2009
Powershell Tech Ed2009
 
Jenkins Pipelines Advanced
Jenkins Pipelines AdvancedJenkins Pipelines Advanced
Jenkins Pipelines Advanced
 
Monitoring Agile PLM with JConsole
Monitoring Agile PLM with JConsole Monitoring Agile PLM with JConsole
Monitoring Agile PLM with JConsole
 
Cognitive data capture with Elis - Rossum's technical webinar
Cognitive data capture with Elis - Rossum's technical webinarCognitive data capture with Elis - Rossum's technical webinar
Cognitive data capture with Elis - Rossum's technical webinar
 
Code Generation as a Service
Code Generation as a ServiceCode Generation as a Service
Code Generation as a Service
 
Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)Windows Server 2008 (PowerShell Scripting Uygulamaları)
Windows Server 2008 (PowerShell Scripting Uygulamaları)
 
Powershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge ClubPowershell Seminar @ ITWorx CuttingEdge Club
Powershell Seminar @ ITWorx CuttingEdge Club
 
Airflow presentation
Airflow presentationAirflow presentation
Airflow presentation
 
Performance tuning a quick intoduction
Performance tuning   a quick intoductionPerformance tuning   a quick intoduction
Performance tuning a quick intoduction
 
20201010 - Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
20201010 -  Collabdays 2020 - Sandro Pereira - Power Automates: best practice...20201010 -  Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
20201010 - Collabdays 2020 - Sandro Pereira - Power Automates: best practice...
 
AD102 - Break out of the Box
AD102 - Break out of the BoxAD102 - Break out of the Box
AD102 - Break out of the Box
 
Building a cloud management megam.io
Building a cloud management megam.io Building a cloud management megam.io
Building a cloud management megam.io
 
Oracle Solaris 11.1 New Features
Oracle Solaris 11.1 New FeaturesOracle Solaris 11.1 New Features
Oracle Solaris 11.1 New Features
 
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdfLearn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
Learn Powershell Scripting Tutorial Full Course 1dollarcart.com.pdf
 
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
SQL Server Exploitation, Escalation, Pilfering - AppSec USA 2012
 
Drupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on WindowsDrupal, Memcache and Solr on Windows
Drupal, Memcache and Solr on Windows
 

More from Kellyn Pot'Vin-Gorman

Redgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptxRedgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptx
Kellyn Pot'Vin-Gorman
 
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptxSQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
Kellyn Pot'Vin-Gorman
 
Boston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptxBoston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptx
Kellyn Pot'Vin-Gorman
 
Oracle on Azure IaaS 2023 Update
Oracle on Azure IaaS 2023 UpdateOracle on Azure IaaS 2023 Update
Oracle on Azure IaaS 2023 Update
Kellyn Pot'Vin-Gorman
 
IaaS for DBAs in Azure
IaaS for DBAs in AzureIaaS for DBAs in Azure
IaaS for DBAs in Azure
Kellyn Pot'Vin-Gorman
 
Being Successful with ADHD
Being Successful with ADHDBeing Successful with ADHD
Being Successful with ADHD
Kellyn Pot'Vin-Gorman
 
Azure DBA with IaaS
Azure DBA with IaaSAzure DBA with IaaS
Azure DBA with IaaS
Kellyn Pot'Vin-Gorman
 
Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"
Kellyn Pot'Vin-Gorman
 
PASS Summit 2020
PASS Summit 2020PASS Summit 2020
PASS Summit 2020
Kellyn Pot'Vin-Gorman
 
DevOps in Silos
DevOps in SilosDevOps in Silos
DevOps in Silos
Kellyn Pot'Vin-Gorman
 
Azure Databases with IaaS
Azure Databases with IaaSAzure Databases with IaaS
Azure Databases with IaaS
Kellyn Pot'Vin-Gorman
 
How to Win When Migrating to Azure
How to Win When Migrating to AzureHow to Win When Migrating to Azure
How to Win When Migrating to Azure
Kellyn Pot'Vin-Gorman
 
Securing Power BI Data
Securing Power BI DataSecuring Power BI Data
Securing Power BI Data
Kellyn Pot'Vin-Gorman
 
Cepta The Future of Data with Power BI
Cepta The Future of Data with Power BICepta The Future of Data with Power BI
Cepta The Future of Data with Power BI
Kellyn Pot'Vin-Gorman
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft Professional
Kellyn Pot'Vin-Gorman
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
Kellyn Pot'Vin-Gorman
 
PASS 24HOP Linux Scripting Tips and Tricks
PASS 24HOP Linux Scripting Tips and TricksPASS 24HOP Linux Scripting Tips and Tricks
PASS 24HOP Linux Scripting Tips and Tricks
Kellyn Pot'Vin-Gorman
 
Power BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudPower BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle Cloud
Kellyn Pot'Vin-Gorman
 
ODTUG Leadership Talk- WIT and Sponsorship
ODTUG Leadership Talk-  WIT and SponsorshipODTUG Leadership Talk-  WIT and Sponsorship
ODTUG Leadership Talk- WIT and Sponsorship
Kellyn Pot'Vin-Gorman
 
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys  How to Build a Successful Microsoft DevOps Including the DataDevOps and Decoys  How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
Kellyn Pot'Vin-Gorman
 

More from Kellyn Pot'Vin-Gorman (20)

Redgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptxRedgate_summit_atl_kgorman_intersection.pptx
Redgate_summit_atl_kgorman_intersection.pptx
 
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptxSQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
SQLSatOregon_kgorman_keynote_NIAIMLEC.pptx
 
Boston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptxBoston_sql_kegorman_highIO.pptx
Boston_sql_kegorman_highIO.pptx
 
Oracle on Azure IaaS 2023 Update
Oracle on Azure IaaS 2023 UpdateOracle on Azure IaaS 2023 Update
Oracle on Azure IaaS 2023 Update
 
IaaS for DBAs in Azure
IaaS for DBAs in AzureIaaS for DBAs in Azure
IaaS for DBAs in Azure
 
Being Successful with ADHD
Being Successful with ADHDBeing Successful with ADHD
Being Successful with ADHD
 
Azure DBA with IaaS
Azure DBA with IaaSAzure DBA with IaaS
Azure DBA with IaaS
 
Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"Turning ADHD into "Awesome Dynamic Highly Dependable"
Turning ADHD into "Awesome Dynamic Highly Dependable"
 
PASS Summit 2020
PASS Summit 2020PASS Summit 2020
PASS Summit 2020
 
DevOps in Silos
DevOps in SilosDevOps in Silos
DevOps in Silos
 
Azure Databases with IaaS
Azure Databases with IaaSAzure Databases with IaaS
Azure Databases with IaaS
 
How to Win When Migrating to Azure
How to Win When Migrating to AzureHow to Win When Migrating to Azure
How to Win When Migrating to Azure
 
Securing Power BI Data
Securing Power BI DataSecuring Power BI Data
Securing Power BI Data
 
Cepta The Future of Data with Power BI
Cepta The Future of Data with Power BICepta The Future of Data with Power BI
Cepta The Future of Data with Power BI
 
Pass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft ProfessionalPass Summit Linux Scripting for the Microsoft Professional
Pass Summit Linux Scripting for the Microsoft Professional
 
Taming the shrew Power BI
Taming the shrew Power BITaming the shrew Power BI
Taming the shrew Power BI
 
PASS 24HOP Linux Scripting Tips and Tricks
PASS 24HOP Linux Scripting Tips and TricksPASS 24HOP Linux Scripting Tips and Tricks
PASS 24HOP Linux Scripting Tips and Tricks
 
Power BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle CloudPower BI with Essbase in the Oracle Cloud
Power BI with Essbase in the Oracle Cloud
 
ODTUG Leadership Talk- WIT and Sponsorship
ODTUG Leadership Talk-  WIT and SponsorshipODTUG Leadership Talk-  WIT and Sponsorship
ODTUG Leadership Talk- WIT and Sponsorship
 
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys  How to Build a Successful Microsoft DevOps Including the DataDevOps and Decoys  How to Build a Successful Microsoft DevOps Including the Data
DevOps and Decoys How to Build a Successful Microsoft DevOps Including the Data
 

Kscope emcli kpotvin

  • 1. The Enterprise Manager Command Line Interface Kellyn Pot’Vin Sr. Technical Consultant Enkitec
  • 2. About Me  Kellyn Pot’Vin,  Westminster, Colorado  Oracle ACE Director, Sr. Technical Specialist at Enkitec  Finishing up EM12c book and starting EM CLI book  Specialize in performance and management of large enterprise environments.  Board of directors for RMOUG, Director of Training Days Conference, KSCOPE DB Track Lead 2013  Blog: DBAKevlar.com  Twitter: @DBAKevlar
  • 3. Challenges of Topic  What to Include?  What to Exclude?  What are the most important areas of the EM CLI?  What commands are best covered to create the best educational introduction to the topic?
  • 4. Agenda  Enterprise Manager Command Line Interface History  How EM12c has changed level of knowledge requirements for the administrator  The Command Line Interface Basics  Enterprise Manager commands  EM CLI Procedure Scripting
  • 5. EM CLI  Introduced in Oracle 9i with very limited use.  Access to EM functionality from text based consoles.  Ability to incorporate scripts, including SQL*Plus, Perl, Shell, Python, etc.  Fully integrated as part of the EM environment, including same security.  Ability to simplify multi-target tasks through command line interface.
  • 6. What We Can Do-  Create Jobs, schedule jobs, delete jobs  Administer groups, members, targets  Administer users and credentials.  Upload patches, delete patches-create patch plans.  Execute host and SQL commands.  Get information about all targets, monitoring.  Over 30 verb “groups” and 250 commands that I have documented “so far”.
  • 7. EM CLI Terminology  EM CLI Login- Online or Offline?  “Verbs” grant the administrator initial commands for the interface.  May Require one or more arguments.  Can utilize a argument file, aka properties file.  Syntax often changes with version of Enterprise Manager. emcli help <verb>
  • 8. Must be Logged in…  The Command Line must be logged into for the first time before commands will be accepted, (login dependent upon EM security time out feature or connection mode.) emcli login –username=<username>  Syncronize the EMCLI with the OMS: emcli sync
  • 9. Unless You Set to “Offline”  Check connection mode, if complete, then offline the EM CLI emcli get_connection_mode emcli set_connection_mode -mode="offline“ emcli get_jobs Set back to online mode if wanting to proceed.
  • 10. EM CLI Syntax emcli <verb> 1st_argument[-name, -procedure, -instance, -guid, -argfile, -input_file, -type, -targets, -action…] = <value> 2nd_argument [-xml, -tailLength, -info, -analyze, -grants, -scheduler, -notification] = <value>
  • 11. Redirection  Redirection example of output, (similar to Unix): emcli get_procedure_xml – procedure=“PROC_GUID” > test_proc.xml
  • 12. Common Verbs(aka arguments)  get_resolution_states - Incident Information  stop/start_agent - Manage Agents  create/stop_blackout - Manage Blackouts  clone_database_home - Clone home  execute_sql - Execute SQL  get_jobs - Get a list of jobs  clear_stateless_alerts - Clears stateless alerts  Argfile: File of verbs to execute from the emcli.
  • 13. Agenda: Baby Steps  EM CLI for EM12c support ● Checking Incidents ● Retrieve Targets Monitored ● Retrieve Agent Properties ● Agent Deployment ● Platform support ● Creating/Stopping Blackouts ● Executing Host Commands
  • 14. Checking the Incidents in EM12c emcli get_resolution_states
  • 15. Simple EM CLI Command  What database targets are being monitored, both single instance and RAC? emcli get_targets -targets="%database%"
  • 16. What’s Platforms are Supported? emcli get_supported_platforms
  • 17. Download for Agent Deploy emcli get_agentimage -destination=/home/oracle -platform="Microsoft Windows x64 (64-bit)" –version="12.1.0.1.0"
  • 18. Agent Deployment Steps emcli get_targets emcli delete_target –name="<trg_nm>“ emcli import_update –file="file_nm" –omslocal emcli deploy_plugin_on_server -plugin=oracle.sysman.db – sys_password=<passwd> emcli deploy_plugin_on_agent – plugin="oracle.sysman.db" – agent_name="<dbname>:<port>"
  • 19. Final Configuration of Target emcli set_credential -target_type=oracle_database -target_name="<preferred_nm>"- credential_set=DBCredsMonitoring - user=sysman - column="Role:SYSDBA;UserName:sys;passwor d:<passwd>"-monitoring
  • 20. Tips For Success  Save off Templates  Inventory Existing Jobs  Create secure credentials for targets  Create administrator groups to ease administration.  Reuse templates, post creating first one, easy updates!
  • 21. Create a Blackout emcli create_blackout -name="Linux Patch 120612" -reason="Needs to be Done" -add_targets="emrep12:oracle_databas e" -schedule="duration::60“ How fast could you blackout an entire environment for maintenance window with this scripted?
  • 22. Stop Blackout Simply state the name of the blackout and the agent will issue a stop to the OMS: emcli stop_blackout -name="Linux Patch 120612“ How quickly could you end a blackout of environment post maintenance?
  • 24. Executing Host Commands emcli execute_hostcmd –cmd=“ls -ltr /home/oracle” -credential_set_name=“HostCredsPriv” -targets=“<host>.com:host”
  • 25. Why jobs from EM CLI?  Simplify management of large number of targets with simple script vs. multiple steps through EM12c console.  This simplicity includes creating, managing, editing and purging of jobs and patching job tasks.  Retain EM12c security and single console monitoring if required.
  • 26. Verify Details of Job Execution  Need to verify job information emcli get_jobs
  • 27. Details Based off Execution emcli get_job_execution_detail -execution=C07388B855B44C38B5953B8C3 C7C6A5E -xml
  • 28. Patching Simplified through the EM CLI  Assumption is that patches are downloaded via EM12c.  Process: ● Verify Patch Available. ● Create Patch Plan ● Schedule Patches in Patch Plan ● Deploy Patch Plan
  • 29. Power of List_aru_xx cmds  list_aru_languages -- List ARU Language information.  list_aru_platforms -- List ARU platform information.  list_aru_products -- List ARU Product information.  list_aru_releases -- List ARU Release information.  list_patch_plans -- List existing Patch Plans.  search_patches -- Search patches from ARU site or Software
  • 30. Search Available Patches emcli search_patches -patch_name="patch number" -platform="platform id“ emcli search_patches –patch_name=“5875660” (BI Publisher) –platform=“233” (Windows 64 bit)
  • 31. Procedural Scripting in EM CLI  Multi-step, multi-tasked or chained scripting through the EM CLI.  Ability to execute SQL, Perl, OS Commands from one procedure.  Ability to use properties file to simplify work and reuse with other procedures.  EM Console access through Job Activity Interface.
  • 32. Submitting an EM CLI procedure emcli submit_procedure -name='<Procedure Name>' -input_file="<data:path to file>" -instance_name="<Procedure Instance>" -schedule=start_time:yyyy/mm/dd HH:mm;
  • 33. Example of Submit Procedure- EM Job emcli submit_procedure -input_file=data:data.xml -procedure=3D7F4D139E70453CB56D7621 BB56D390 -schedule="start_time:2012/12/03 21:00; tz:America/Central" -grants="KPOTVIN:VIEW_JOB; SYSMAN:FULL_JOB" -notification="action required, failed"
  • 34. Properties Files  Create a template to use for your new properties file, sourced from a procedure definition.  Fill in all pertinent information for the target lists.  Submit the procedure, using the properties file as part or whole of the entry at the command line.  Verify all was successful.
  • 35. Get the Procedure Name emcli get_procedures –type=DBPROV Example Output: $>BFC71D3485629B93E04014AC08001B7D, DBPROV, DBREPLAYCLIENTDP_NG, Provision Oracle Database Client, 6.2, ORACLE BFC71D3485599B93E04014AC08001B7D, DBPROV, SIHA_SIDB_PROC, Provision Oracle Database, 1.1, ORACLE
  • 36. Creating a Template Using the GUID, (or the procedure <NAME>, we can then generate a properties file template: emcli describe_procedure_input – procedure= BFC71D3485629B93E04014AC08001B7D > dbreplay_tst.properties $> Verifying parameters… $>
  • 37. Updating with a New Target Edit the new template properties file and add the new values for the following: $ vi dbreplay_tst.properties Source and Reference Host Data Agent Info Oracle Home Credentials
  • 38.
  • 39. Submit your Procedure with Properties File emcli submit_procedure – name=test_dbrpl_job -owner=sys_jobs -procedure= C23E10B1F427B4EEE040578CD74442G4 - input_file=/u01/emjobs/emcli/dbreplay_tst. properties -notification="action required, failed" -grants=“KPOTVIN:VIEW_JOB; SYSMAN:FULL_JOB" -schedule= "start_time:2012/12/06 01:00:00; tz:America/Denver"
  • 40. Verify from EM CLI emcli get_instance_status -instance=C23E10B1F427B4EEE040578CD7 4442G4 -details -showJobOutput Output: C23E10B1F427B4EEE040578CD74442G4 , test_job, test_job, SUCCESSFUL
  • 41. Want to Read More? Rob Zoeteweij, Patching with EM12c http://oemgc.wordpress.com/tag/oem-gc-12c/ Laurent Leturgez, Useful EMCLI Commands http://laurentleturgez.wordpress.com/2012/06/11/ useful-emcli-commands-in-em-cloud-control-12c/ Laurent Schneider, The EM CLI http://laurentschneider.com/wordpress/2011/11/e nterprise-manager-command-line-interface.html