Any DBA from beginner to advanced level, who wants to fill in some gaps in his/her knowledge about Performance Tuning on an Oracle Database, will benefit from this workshop.
This is a recording of my Advanced Oracle Troubleshooting seminar preparation session - where I showed how I set up my command line environment and some of the main performance scripts I use!
Oracle Active Data Guard: Best Practices and New Features Deep Dive Glen Hawkins
Oracle Data Guard and Oracle Active Data Guard have long been the answer for the real-time protection, availability, and usability of Oracle data. This presentation provides an in-depth look at several key new features that will make your life easier and protect your data in new and more flexible ways. Learn how Oracle Active Data Guard 19c has been integrated with Oracle Database In-Memory and offers a faster application response after a role transition. See how DML can now be redirected from an Oracle Active Data Guard standby to its primary for more flexible data protection in today’s data centers or your data clouds. This technical deep dive on Active Data Guard is designed to give you a glimpse into upcoming new features brought to you by Oracle Development.
Oracle Data Guard ensures high availability, disaster recovery and data protection for enterprise data. This enable production Oracle databases to survive disasters and data corruptions. Oracle 18c and 19c offers many new features it will bring many advantages to organization.
Any DBA from beginner to advanced level, who wants to fill in some gaps in his/her knowledge about Performance Tuning on an Oracle Database, will benefit from this workshop.
This is a recording of my Advanced Oracle Troubleshooting seminar preparation session - where I showed how I set up my command line environment and some of the main performance scripts I use!
Oracle Active Data Guard: Best Practices and New Features Deep Dive Glen Hawkins
Oracle Data Guard and Oracle Active Data Guard have long been the answer for the real-time protection, availability, and usability of Oracle data. This presentation provides an in-depth look at several key new features that will make your life easier and protect your data in new and more flexible ways. Learn how Oracle Active Data Guard 19c has been integrated with Oracle Database In-Memory and offers a faster application response after a role transition. See how DML can now be redirected from an Oracle Active Data Guard standby to its primary for more flexible data protection in today’s data centers or your data clouds. This technical deep dive on Active Data Guard is designed to give you a glimpse into upcoming new features brought to you by Oracle Development.
Oracle Data Guard ensures high availability, disaster recovery and data protection for enterprise data. This enable production Oracle databases to survive disasters and data corruptions. Oracle 18c and 19c offers many new features it will bring many advantages to organization.
Oracle Database 19c, builds upon key architectural, distributed data and performance innovations established in earlier versions Oracle Database 12c and 18c releases. Oracle 19c has many new features, in this presentation we have covered below areas
Automated Installation, Configuration and Patching
AutoUpgrade and Database Utilities
Session aims at introducing less familiar audience to the Oracle database statistics concept, why statistics are necessary and how the Oracle Cost-Based Optimizer uses them
What to Expect From Oracle database 19cMaria Colgan
The Oracle Database has recently switched to an annual release model. Oracle Database 19c is only the second release in this new model. So what can you expect from the latest version of the Oracle Database? This presentation explains how Oracle Database 19c is really 12.2.0.3 the terminal release of the 12.2 family and the new features you can find in this release.
Understanding my database through SQL*Plus using the free tool eDB360Carlos Sierra
This session introduces eDB360 - a free tool that is executed from SQL*Plus and generates a set of reports providing a 360-degree view of an Oracle database; all without installing anything on the database.
If using Oracle Enterprise Manager (OEM) is off-limits for you or your team, and you can only access the database thorough a SQL*Plus connection with no direct access to the database server, then this tool is a perfect fit to provide you with a broad overview of the database configuration, performance, top SQL and much more. You only need a SQL*Plus account with read access to the data dictionary, and common Oracle licenses like the Diagnostics or the Tuning Pack.
Typical uses of this eDB360 tool include: databases health-checks, performance assessments, pre or post upgrade verifications, snapshots of the environment for later use, compare between two similar environments, documenting the state of a database when taking ownership of it, etc.
Once you learn how to use eDB360 and get to appreciate its value, you may want to execute this tool on all your databases on a regular basis, so you can keep track of things for long periods of time. This tool is becoming part of a large collection of goodies many DBAs use today.
During this session you will learn the basics about the free eDB360 tool, plus some cool tricks. The target audience is: DBAs, developers and consultants (some managers could also benefit).
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
From Tanel Poder's Troubleshooting Complex Performance Issues series - an example of Oracle SEG$ internal segment contention due to some direct path insert activity.
Oracle Database performance tuning using oratopSandesh Rao
Oratop is a text-based user interface tool for monitoring basic database operations in real-time. This presentation will go into depth on how to use the tool and some example scenarios. It can be used for both RAC and single-instance databases and in combination with top to get a more holistic view of system performance and identify any bottlenecks.
Maximum Availability Architecture - Best Practices for Oracle Database 19cGlen Hawkins
Provides the latest updates on high availability (HA) best practices in this well-established technical deep-dive session. Learn how to optimize all aspects of Oracle Active Data Guard 19c. See how to use session draining, transparent application continuity, Oracle RAC, and Oracle GoldenGate to mask outages and planned maintenance from users and to accelerate time to repair for single database or your fleet of databases. Hear about the latest HA best practices with Oracle Multitenant and understand how the new sharded architecture can achieve even higher levels of HA and fault isolation for OLTP applications. Find out how everything you know about Oracle Maximum Availability Architecture (MAA) on-premises can be deployed in the cloud.
Oracle Database 19c, builds upon key architectural, distributed data and performance innovations established in earlier versions Oracle Database 12c and 18c releases. Oracle 19c has many new features, in this presentation we have covered below areas
Automated Installation, Configuration and Patching
AutoUpgrade and Database Utilities
Session aims at introducing less familiar audience to the Oracle database statistics concept, why statistics are necessary and how the Oracle Cost-Based Optimizer uses them
What to Expect From Oracle database 19cMaria Colgan
The Oracle Database has recently switched to an annual release model. Oracle Database 19c is only the second release in this new model. So what can you expect from the latest version of the Oracle Database? This presentation explains how Oracle Database 19c is really 12.2.0.3 the terminal release of the 12.2 family and the new features you can find in this release.
Understanding my database through SQL*Plus using the free tool eDB360Carlos Sierra
This session introduces eDB360 - a free tool that is executed from SQL*Plus and generates a set of reports providing a 360-degree view of an Oracle database; all without installing anything on the database.
If using Oracle Enterprise Manager (OEM) is off-limits for you or your team, and you can only access the database thorough a SQL*Plus connection with no direct access to the database server, then this tool is a perfect fit to provide you with a broad overview of the database configuration, performance, top SQL and much more. You only need a SQL*Plus account with read access to the data dictionary, and common Oracle licenses like the Diagnostics or the Tuning Pack.
Typical uses of this eDB360 tool include: databases health-checks, performance assessments, pre or post upgrade verifications, snapshots of the environment for later use, compare between two similar environments, documenting the state of a database when taking ownership of it, etc.
Once you learn how to use eDB360 and get to appreciate its value, you may want to execute this tool on all your databases on a regular basis, so you can keep track of things for long periods of time. This tool is becoming part of a large collection of goodies many DBAs use today.
During this session you will learn the basics about the free eDB360 tool, plus some cool tricks. The target audience is: DBAs, developers and consultants (some managers could also benefit).
Troubleshooting Complex Performance issues - Oracle SEG$ contentionTanel Poder
From Tanel Poder's Troubleshooting Complex Performance Issues series - an example of Oracle SEG$ internal segment contention due to some direct path insert activity.
Oracle Database performance tuning using oratopSandesh Rao
Oratop is a text-based user interface tool for monitoring basic database operations in real-time. This presentation will go into depth on how to use the tool and some example scenarios. It can be used for both RAC and single-instance databases and in combination with top to get a more holistic view of system performance and identify any bottlenecks.
Maximum Availability Architecture - Best Practices for Oracle Database 19cGlen Hawkins
Provides the latest updates on high availability (HA) best practices in this well-established technical deep-dive session. Learn how to optimize all aspects of Oracle Active Data Guard 19c. See how to use session draining, transparent application continuity, Oracle RAC, and Oracle GoldenGate to mask outages and planned maintenance from users and to accelerate time to repair for single database or your fleet of databases. Hear about the latest HA best practices with Oracle Multitenant and understand how the new sharded architecture can achieve even higher levels of HA and fault isolation for OLTP applications. Find out how everything you know about Oracle Maximum Availability Architecture (MAA) on-premises can be deployed in the cloud.
A brief overview about how to write human readable and meaningful code. Here is described why and how to write meaningful names of variables or method, what to follow about writing a function for SRP / Open-Closed principle rule, when to write comments and rules of Code Formatting. Advantages of clean code is also described here.
This presentation covers a detailed overview of python advanced concepts. it covers the below aspects.
Comprehensions
Lambda with (map, filter and reduce)
Context managers
Iterator, Generators, Decorators
Python GIL and multiprocessing and multithreading
Python WSGI
Python Unittests
Oracle DB Standard Edition: Başka Bir Arzunuz?Gokhan Atil
Enterprise Edition'a gerçekten ihtiyacınız var mı? Standard Edition ile arasındaki farkları biliyor musunuz? Her projede Enterprise Edition kullanmak doğru mu?
Strategies for Successful Data Migration Tools.pptxvarshanayak241
Data migration is a complex but essential task for organizations aiming to modernize their IT infrastructure and leverage new technologies. By understanding common challenges and implementing these strategies, businesses can achieve a successful migration with minimal disruption. Data Migration Tool like Ask On Data play a pivotal role in this journey, offering features that streamline the process, ensure data integrity, and maintain security. With the right approach and tools, organizations can turn the challenge of data migration into an opportunity for growth and innovation.
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Hivelance Technology
Cryptocurrency trading bots are computer programs designed to automate buying, selling, and managing cryptocurrency transactions. These bots utilize advanced algorithms and machine learning techniques to analyze market data, identify trading opportunities, and execute trades on behalf of their users. By automating the decision-making process, crypto trading bots can react to market changes faster than human traders
Hivelance, a leading provider of cryptocurrency trading bot development services, stands out as the premier choice for crypto traders and developers. Hivelance boasts a team of seasoned cryptocurrency experts and software engineers who deeply understand the crypto market and the latest trends in automated trading, Hivelance leverages the latest technologies and tools in the industry, including advanced AI and machine learning algorithms, to create highly efficient and adaptable crypto trading bots
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
Tim Combridge from Sensible Giraffe and Salesforce Ben presents some important tips that all developers should know when dealing with Flows in Salesforce.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
Worried about document security while sharing them in Salesforce? Fret no more! Here are the top-notch security standards XfilesPro upholds to ensure strong security for your Salesforce documents while sharing with internal or external people.
To learn more, read the blog: https://www.xfilespro.com/how-does-xfilespro-make-document-sharing-secure-and-seamless-in-salesforce/
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Modern design is crucial in today's digital environment, and this is especially true for SharePoint intranets. The design of these digital hubs is critical to user engagement and productivity enhancement. They are the cornerstone of internal collaboration and interaction within enterprises.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
2. INTRODUCTION
GOKHAN ATIL
▸ DBA Team Lead with 15+ years of experience
▸ Oracle ACE (since 2011)
▸ 10g/11g and R12 OCP
▸ Founding Member and Vice President of TROUG
▸ Co-author of Expert Oracle Enterprise Manager 12c
▸ Blogger (since 2008) gokhanatil.com
▸ Twitter: @gokhanatil
2
5. INTRODUCTION TO EM CLI
WHAT IS EM CLI?
EMCLI is an alternative for the web interface. It enables you to access
OEM functionality from a text-based console.
Repository
EM CLI
Agent
OMS
Web Console
5
6. INTRODUCTION TO EM CLI
ALREADY INSTALLED
EM CLI is already installed and configured on OMS server:
cd $MIDDLEWARE_HOME/bin
./emcli (or emcli.bat on Windows servers)
6
7. INTRODUCTION TO EM CLI
YOU CAN INSTALL EM CLI TO YOUR PC
▸ Requires Java version 1.7.0_80 or greater
▸ Supported Operating Systems: Windows, Linux, Solaris,
HPUX, Tru64, AIX
▸ Go to “command line interface” page under “setup” page
to download the installation JAR file.
▸ Login is not required to download, so it’s possible to
download the JAR file with “wget”.
To run EM CLI on Java 1.8 or higher, you need apply patch 17555224 to
the weblogic server. Use"-no-check-certificate" parameter with wget.
7
9. INTRODUCTION TO EM CLI
EM CLI STANDARD KIT VS ADVANCED KIT
There are two different installation kits for EM CLI:
▸ EM CLI Standard Kit: This kit supports only the Standard
(command line) mode.
▸ EM CLI with Scripting mode (option): This “advanced”
kit supports Interactive and Script modes in addition to
standard mode.
9
10. INTRODUCTION TO EM CLI
3 MODES OF EM CLI:
▸ Standard mode: This mode provides a simple command-line interface to
Enterprise Manager, and supports the execution of one verb at a time from
the command line.
emcli get_targets
▸ Interactive mode: This mode enables you to create a single interactive
session with OMS. It is a Jython shell.
emcli
▸ Scripting mode: In Scripting mode, EM CLI runs Jython scripts containing EM
CLI verbs.
emcli @scriptname.py
10
11. INTRODUCTION TO EM CLI
SOMEONE SAID JYTHON?
Jython is an implementation of the Python programming
language designed to run on the Java platform.
11
12. INTRODUCTION TO EM CLI
SO WHAT’S PYTHON?
▸ Widely used general-purpose,
high-level programming language
▸ Supports multiple programming paradigms, including
OOP, imperative and functional programming
▸ Dynamic type system and automatic memory
management
▸ Batteries Included (!)
12
13. INTRODUCTION TO EM CLI
INSTALL AND CONFIGURE:
▸ After you download, set JAVA_HOME and install the JAR
file:
java -jar emcliadvancedkit.jar -install_dir=<home>
▸ Configure EM CLI:
emcli help setup
emcli setup -url="https://host:port/em"
-username=<emuser> -dir=<instancedir> -trustall
13
16. EM CLI VERBS
GET QUICK HELP
You can get the list of available verbs using “help”:
emcli help
emcli help get_targets
16
17. EM CLI VERBS
EM CLI VERBS IN STANDARD MODE
In standard mode, EM CLI expect you enter a verb as the first
parameter. Verbs may take zero or more arguments as input.
emcli verb -1st_argument="value"
[ -2nd_ argument="value" ]
[ -3rd_ argument="value" ]
[ -4th_ argument ]
…
17
18. EM CLI VERBS
EM CLI VERBS IN SCRIPTING MODE
▸ Verbs are defined as Python functions
▸ Arguments are entered as function parameters
verb( argument_name="value", 2nd_ argument="value")
▸ Results of verbs are formatted as JSON
18
19. SAMPLE VERBS
LOGIN
Login verb is used to log into Enterprise Manager with the
given credentials.
login( username="SYSMAN", password="123456",
force=true)
login( username="SYSMAN", password="123456" )
login( username=“SYSMAN" )
The EM CLI client should be logged in to OMS before other
EM CLI verbs are executed.
19
20. SAMPLE VERBS
GET_TARGETS
get_targets verb lists the targets (their names and their types) which are
discovered or monitored by Enterprise Manager.
get_targets()
get_targets( targets="targetname:targettype" )
get_targets( targets="targetname:%" )
get_targets( targets="targettype" )
get_targets( "unmanaged", targets="targettype" )
Target names, target types and even “verbs” are case sensitive, so be sure
that you use the exact name of a target and target type!
20
21. SAMPLE VERBS
ADD_TARGET
add_target verb adds a target to Enterprise Manager.
add_target( name="TESTDB",
type="oracle_database",
host="testdb.gokhanatil.com",
credentials="...",
properties="..." )
You must specify any required properties of a target type
when adding a new target of this type
21
22. SAMPLE VERBS
CLEAR_STATELESS_ALERTS
clear_stateless_alerts verb clears the stateless alerts associated
with the specified target. Stateless alerts are not cleared
automatically by the Enterprise Manager.
clear_stateless_alerts(
target_name="TESTDB",
target_type="oracle_database",
metric_internal_name="...",
older_than="0" )
To find the metric internal name associated with a stateless alert,
use the get_metrics_for_stateless_alerts verb.
22
23. SAMPLE VERBS
UPDATE_DB_PASSWORD
update_db_password verb updates the target database password
stored in the Enterprise Manager Credential sub-system and can
change the password on the target database as well.
update_db_password (target_name="TESTDB",
user_name="DBSNMP",
target_type="oracle_database",
change_at_target="yes",
old_password="oldone",
new_password="newone",
retype_new_password="newone" )
23
24. SAMPLE VERBS
LIST
▸ Although there are more than 85+ verbs to help you fetch
a specific information from OMS such as list of targets, list
of jobs etc, you may still need a more powerful verb which
can fetch information from the repository database.
▸ This command will show all resources that you can query:
emcli list -help
24
25. SAMPLE VERBS
LIST
▸ The following command will list the users defined in EM:
emcli list -resource="Administrators"
▸ This command shows the columns of the specified resource:
emcli list -resource="Administrators" -help
25
26. SAMPLE VERBS
LIST
▸ This command will list the EM users and their last logins:
emcli list -resource="Administrators"
-columns="USER_NAME,LAST_AUTHENTICATED_TS"
▸ The following command will list the EM users which are logged in at least one time:
emcli list -resource="Administrators"
-columns="USER_NAME,LAST_AUTHENTICATED_TS"
-search=“LAST_AUTHENTICATED_TS IS NOT NULL"
26
27. SAMPLE VERBS
LIST
Latest version of the “list” verb can query 30+ resources. If you
can not find the data you need among these resources, you
can even run SQL on repository database using list verb:
emcli list -sql="<query>"
You need ACCESS_EMCLI_SQL_LIST_VERB privilege to be
able to run query using “the list verb”.
27
29. FUNDAMENTALS OF PYTHON
VARIABLES
Python supports dynamic type variables. You don’t need to
declare a variable but you need to initialise it before you use:
▸ myvar = "TESTDB"
▸ myvar = myvar + ":oracle_database"
▸ myvar = 10
▸ myvar = myvar + 10
▸ myvar = 10 + "10"
TYPE ERROR:
UNSUPPORTED
OPERAND TYPE(S) FOR
+: 'INT' AND 'STR'
29
30. FUNDAMENTALS OF PYTHON
CONVERSIONS
You can convert numbers to string using “str” function, and
string variables to numbers using “int” function:
‣ myvar = int("2")
‣ myvar = int("5") + 10
‣ myvar = str(2)
‣ myvar = str(2) + "nd century"
30
31. FUNDAMENTALS OF PYTHON
CONDITIONAL STATEMENTS AND CODE BLOCKS
The indented block of code is executed if the condition is
true. You should use indents to create code blocks.
myvar = int("2")
myvar = myvar + 10
myvar = "2"
if ( myvar >= 10 ):
print "myvar is " + str(myvar)
else:
print "lower than 10"
CODE BLOCKS ARE IDENTIFIED
BY “INDENTATION”
THE COLON (:) SIGN
31
32. FUNDAMENTALS OF PYTHON
DICTIONARY AND LIST OBJECTS
Dictionary objects, list objects and iterations:
mydict = { 'Name':'Gokhan', 'Age':40 }
mydict['Name'] = "Gokhan"
mylist = ["Joe","William","Jack","Averell"]
mylist[0] = "Joe"
for i in mylist:
print i
SIMILAR TO
JSON. KEY=VALUE
IT WILL PRINT ALL ELEMENTS IN “MYLIST”
ARRAY. USE INDEX TO REACH VALUE
32
34. EM CLI AND PYTHON
EM CLI RESPONSE OBJECT
emcli.response represents the response object which
returned from invocation of a emcli verb from python script.
emcli.response.Response
error() error text
exit_code() error code (0=success)
isJson() is JSON? true/false
out() JSON or text
34
35. EM CLI AND PYTHON
EM CLI RESPONSE OBJECT
In scripting mode, default output format type is JSON. In
interactive mode, to change the output format to JSON, you
need to run the following command:
set_client_property('EMCLI_OUTPUT_TYPE', 'JSON')
It’s recommended to use JSON format because it directly
matches with Python “dictionary” object. There’s no need for
extra effort to parse the output.
35
36. EM CLI AND PYTHON
EM CLI RESPONSE OBJECT
Let’s get the response from a verb:
mytargets = get_targets( target="oracle_database" )
type(mytargets.out())
<type 'dict'>
mytargets.out()
{'data': [{'Status': 'Up', 'Warning': '6', 'Status ID': '0', 'Target
Type': 'oracle_database', 'Critical': '64', 'Target Name':
'TESTDB'}, {…}, {…}, {…}] }
36
37. EM CLI AND PYTHON
EM CLI RESPONSE OBJECT
A response always contain a “data” item which is a list object:
type(mytargets.out()['data'])
<type ‘list'>
mytargets.out()['data']
[ {'Status': 'Up', 'Warning': '6', 'Status ID': '0', 'Target Type':
'oracle_database', 'Critical': '64', 'Target Name': 'TESTDB'},{…},
{…}, {…} ]
type(mytargets.out()['data'][0])
<type 'dict'>
37
38. EM CLI AND PYTHON
EM CLI RESPONSE OBJECT
We can iterate over the items of the list:
for DB in mytargets.out()['data']:
print DB['Target Name'], DB['Status']
DICT / JSON
LIST (DATA)
DICT
DICT
DICT
DICT
DICT
38
40. SAMPLE SCRIPTS
CLEAR STATELESS ALERTS
Save the following code in a file (clearalerts.py) and run it as
“emcli @clearalerts.py”:
if login( username="GOKHAN" ).exit_code()==0:
mytargets=get_targets( targets="oracle_database" )
for DB in mytargets.out()['data']:
clear_stateless_alerts(
target_name=DB['Target Name'],
target_type=DB['Target Type'], older_than="0" )
40
41. SAMPLE SCRIPTS
CHANGE DBSNMP PASSWORDS
if len(sys.argv) <> 2:
print "Usage: emcli @change_dbsnmp_passwords.py oldpwd newpwd"
exit()
if login( username="GOKHAN" ).exit_code()==0:
mytargets=get_targets( targets="%_database" )
for DB in mytargets.out()['data']:
try:
update_db_password (target_name=DB['Target Name'],
target_type=DB['Target Type'] ,
change_at_target="yes",user_name="dbsnmp",
old_password=sys.argv[0],
new_password=sys.argv[1],
retype_new_password=sys.argv[1])
except emcli.exception.VerbExecutionError, e:
print e.error()
41
42. SAMPLE SCRIPTS
PROMOTE UNMANAGED DATABASES
lg = login( username="SYSMAN" )
if lg.exit_code() <> 0:
print lg.error()
exit()
utargets=get_targets( "unmanaged", properties=True,
targets="oracle_database" )
for target in utargets.out()['data']:
add_target( name=target['Target Name'], type=target['Target Type'],
host=target['Host Info'].split(';')[0].split(':')[1],
credentials="UserName:dbsnmp;password:xyz;Role:Normal",
properties=target['Properties'] )
POSITIONAL PARAMETERS
42
44. SUMMARY
WHY NOT BASH SCRIPTING WITH EM CLI STANDARD KIT?
▸ BASH scripting supports
environment variables, if
conditions, loops
▸ Linux tools (grep, awk
etc…) to parse output of
EM CLI
▸ Python is cross-platform
▸ Python scripts are easy to
be read and maintain
▸ Python scripts perform
better
44
45. SUMMARY
FURTHER READING
▸ OEM 12c Command-Line Interface
▸ My blog:
http://www.gokhanatil.com
▸ Kellyn Pot'Vin-Gorman
http://dbakevlar.com
▸ Ray Smith
https://oramanageability.wordpress.com
▸ Seth Miller
http://sethmiller.org
▸ The Definitive Guide to Jython
http://www.jython.org/jythonbook/en/1.0/
45