You are previewing Oracle Enterprise Manager 12c Command-Line Interface.
O'Reilly logo
Oracle Enterprise Manager 12c Command-Line Interface

Book Description

Oracle Enterprise Manager 12c Command-Line Interface shows how to use Enterprise Manager’s powerful scripting language to automate your database administration work and save time by scripting routine tasks, and then executing those scripts across collections of databases and instances in your environment. This book is chock full of ready-made scripting examples contributed by the authors and leading members of the community. For example, you'll find scripts and examples of commands to:

  • Remove an Enterprise Manager agent and its related targets
  • Quickly create administrator accounts that are fully-configured with pre-expired passwords and all needed roles
  • Invoke batch files to execute sequences of related commands with consistency against multiple targets
  • Batch create large groups of user logins with a single command
  • and more!
  • The Enterprise Manager Command Line Interface (EM CLI) is the administrator's key to unlocking the power of Enterprise Manager 12c (EM12c) with scalability, repeatability, and confidence. In previous versions, most administrators ventured into the command-line interface only with the assistance of Oracle Support. But now there are many features in EM12c that are accessible only from the command-line. This is far from a disadvantage! Enterprise Manager is now a powerful tool for automation in the hands of a skilled database administrator.

    Enterprise Manager scripting offers potential for all administrators who manage Oracle’s enterprise-level products in their environment. You can automate from the smallest, single-instance configuration all the way up to a broadly distributed enterprise-level rollout having database instances strewn across broad geographical distributions. The power of the EM CLI returns the administrator to the golden age, where the entire environment, from database to application to infrastructure, can often be managed from this powerful command line tool secured by the robust Enterprise Manager framework.

  • Brings a golden-age of automation to Oracle Database administrators
  • Provides ready-made scripts contributed by leading members of the community
  • Covers advanced techniques involving Jython and Python
  • Table of Contents

    1. Cover
    2. Title
    3. Copyright
    4. Dedication
    5. Contents at a Glance
    6. Contents
    7. About the Authors
    8. About the Technical Reviewers
    9. Acknowledgments
    10. Chapter 1: Architecture
      1. Enterprise Manager Framework
      2. EM CLI Verbs
      3. EM CLI Client Software
      4. EM CLI and EMCTL
        1. Agent Start and Stop
        2. Centralization
        3. Access
      5. Safety Net
    11. Chapter 2: Installation and Security Framework and EM12c Release 4
      1. EM CLI and WebLogic Installation
        1. Requirements
        2. Creating the WebLogic Domain Provisioning Profile
        3. Filtering Out Fusion Middleware
        4. Jython
        5. Supported Java Versions
        6. Path and Environment Variables
      2. Client or Remote Target Installation
      3. EM CLI Advanced Kit
        1. EMCLI Installation via the OMS
      4. Post-Installation
      5. Patching and Upgrades
        1. Patching with the EM CLI Clients
        2. Patching Remote Client Installations
      6. EM Security Framework
        1. Security in the EM CLI
        2. Secure Mode for EM CLI Setup
        3. HTTPS Trusted Certificate
      7. Verbs of Great Value in Release 4
        1. Gold Agent Update Verbs
        2. BI Publisher Reports Verbs
        3. Cloud Service Verbs
        4. Miscellaneous Verbs
        5. Fusion Middleware Provisioning Verbs
        6. Job Verbs
        7. Target Data Verbs
      8. Summary
    12. Chapter 3: Terminology and Basics
      1. Terminology: Verbs
      2. Modes
        1. Command-line
        2. Interactive
        3. Scripting
      3. Help!
      4. Understanding Error Codes
      5. Syntax
      6. Setup
      7. Communication
        1. EM CLI
        2. EMCTL
      8. EMCTL versus EM CLI
        1. Task: Establish a Login
        2. Task: Get a List of Targets
        3. Task: Using Blackouts
        4. Task: Create Targets
        5. Task: Manipulating Jobs
      9. Summary
    13. Chapter 4: Working at the Command Line
      1. Start an EM CLI Session
      2. CLI References
      3. The get_targets Verb
        1. Output Formats
      4. Agent Administration
      5. Deleting EM Targets with EM CLI
        1. Find Exact Target Names
        2. Delete the Target
      6. How to Remove an Enterprise Manager Agent with One Command
      7. Transferring Targets to Another EM Agent
        1. How It Works
        2. OMS-Mediated Targets
      8. Managing OEM Administrators
        1. Role Management
      9. Tracking Management Server Login
      10. Summary
    14. Chapter 5: Automation Through Shell Scripts
      1. Best Practices for Shell Scripting
        1. Logging
        2. Passwords and Shell Scripts
      2. Calling EM CLI from a Shell Script
        1. Shell Script Functions
        2. GetTargetName Function
        3. Name Argument
        4. Add Targets Argument
        5. Schedule Argument
        6. A Robust Solution for Scheduled Blackouts
      3. Summary
    15. Chapter 6: Advanced Scripting
      1. History of Python
      2. Jython
      3. JSON
      4. Getting Started
      5. Hello World!
      6. Finding Help
      7. Python Objects
        1. Numbers and Strings
        2. Lists
        3. Simple Lists
        4. Lists in EM CLI
        5. Strings and Lists
        6. Dictionaries
      8. Logon Script
      9. Python Scripting with EM CLI to Set Target Properties
      10. Python Class with EM CLI to Set Target Properties
        1. Using the updateProps() Class
        2. Understanding the Code
      11. Summary
    16. Chapter 7: Using the Software Library and Oracle Extensibility Exchange
      1. The OEM Software Library
      2. Software Library
      3. Setting Up Software Library Storage
      4. Checking In Entities
      5. Adding Scripts to the Software Library
      6. Building a Report Definition Library
      7. OEM Jobs Using CLI Calls
        1. Create a Job
        2. Step 1: Upgrade Agents
        3. Step 2: Remove Old Agents
      8. Export/Import Capabilities for Information Publisher Reports
      9. Store Definition Library in Software Library
      10. Oracle Extensibility Exchange
      11. Extensibility Exchange
      12. Classic View
      13. Development Resources
      14. Contribute
      15. At a Glance
      16. Summary
    17. Chapter 8: Sample EM CLI Scripts
      1. Section 1: Function Library and Shell Scripts
        1. Command-Line Inputs
        2. Evidence of Life
        3. Sample Function Library
        4. Function-Related Shell Scripts
      2. Section 2: EM CLI and Veritas Cluster Server
        1. Program Logic
        2. Veritas Cluster Server
        3. Oracle Enterprise Manager
        4. Implementation
      3. Section 3: Essential Server-Management Scripts
        1. Configuration Backup Script
        2. Transitory File Cleanup Script
      4. Section 4: EM CLI Scripting and Interactive Scripts
        1. Simple Logon Script (start.py)
        2. Secure Logon Script (secureStart.py)
        3. Update Target Properties Commands (updatePropsFunc.py)
        4. Update Target Properties Class (updateProps.py)
    18. Index