Quantcast
Channel: Archives des Oracle Enterprise Manager - dbi Blog
Viewing all 55 articles
Browse latest View live

Oracle Enterprise Manager 12c: Administration Groups & Template Collections

$
0
0

This post describes the implementation of the Administration Groups and Template Collections with Oracle Enterprise Manager Cloud Control 12c. Administration Groups (improvement of Grid 10g Target Groups) and Template Collections improve the management of targets and ease the implementation of the monitoring strategy.

Administration Groups allow to organize targets according to several criteria. For instance the Lifecycle status of the target (prod, dev, integration), the location of the target (its city or country), aso … The main goal is to apply common settings (i.e monitoring settings) to targets having the same purpose.

The first point about administration groups is to define a clear concept and the hierarchy between these several criteria. The administration groups must be organized in a convenient way according to the company organization. In the next chapter we will present how to handle the default hierarchy existing in Cloud Control 12c in order to change it in an administration group organization fitting to the company structure.

The target property is used to implement automatically the target in the appropriate administration group.

An example

In the following example, based on the existing administration groups we will create the following hierarchy which matches to the company organization:

Basically the company has two groups of systems, one for managing the sales and one for managing the costs. The “systems” can be any kind of targets: databases, Weblogic servers, hosts, etc. Each of these systems exist in PRODUCTION and DEVELOPMENT lifecycle status. It has been decided to group all production targets together and then separate the targets in underlying groups according to their “role”, COST or SALES, of course the same strategy has been followed for DEV.

Let’s see how we can realize this.

To create an Administration Group, you have to choose Setup → Add target → Add Administration Groups.

First of all, we have to select the “primary” criteria to sort the targets in the administration group hierarchy. In our case we use the “Lifecycle status” hierarchy level as root :

By default, the following hierarchy is created:

The different hierarchy levels are:

We can merge “Mission Critical” and “Production”, and on an other side we can merge “Test Staging” and “Development” we keep the control keypad and we select Development, Staging and Test , then we select Merge:

We have to perform the same operations for “Production” and “Mission Critical”. At the end, we have the following hierarchy:

We can modify the name of the Deve-Grp to DEV and make the same for the MC_GRP to PROD:

And finally we obtain:

Then, we can add a new hierarchy level by choosing Line of business, for example:

We now have the following organization for example with Costs and Sales:

Like in the previous stage we can change the name of the sub-groups:

Do not forget to click on the create button and the administration Group is created:

The next step is about Template Collections. Template collections is an extension of the existing monitoring templates (available since Grid Control 10g). Template collections allow to group several templates for several kinds of targets in one entity which can be “applied” to an Administration Group. To create a template collection we choose the Setup Menu → Administration Group and we select “Template Collections”:

The classical database, listener and host templates have already been created, we choose “Add” to create a Collection Template which consists of a set of these templates:

We have to associate the monitoring templates to the Admin Groups. We select “Association” and we select the DEV_GROUP , we choose Associate Template Collection and we associate the DEV_GRP to the DEV monitoring template:

We associate the PROD monitoring templates to the PROD_GRP. By doing this the sub group get the properties of their parent group. We can check for example the monitoring setting of the DEV_SALES_GROUP.  We select this sub-group and we select “View Aggregate Settings”:

Now, we have to associate the different targets to the groups. Let’s check how to realize this operation. For a database we select a Database and choose Oracle Database → Target Setup → Properties:

We edit the life cycle status to Production:

Another solution is to use emcli on the OMS server to modify the target properties in case of huge number of targets. At first, we setup emcli on the OMS server:

racle@eurorclg02:/u01/app/oracle/Middleware/oms/bin/ [oms12c] ./emcli setup -url=https://vmtestoraem12c.it.dbi-services.com:4900/em/ -username=sysman
Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.1.0.
Copyright (c) 1996, 2011 Oracle Corporation and/or its affiliates. A
ll rights reserved.
Enter password
Do you trust the certificate chain? [yes/no] yes
Emcli setup successful

We have to use the set_target_property_value to update the property for a target Watch out most of those arguments are case sensitive ! The official syntax is:

emcli set_target_property_value
-property_records="target_name:target_type:property_name:property_value"

If we need to update the property LifeCycle Status to Production for the DB112 database, we have to run:

oracle@eurorclg02:/u01/app/oracle/Middleware/oms/bin/ [oms12c] emcli set_target_property_value -property_records="DB112:oracle_database:LifeCycle Status:Production"
Properties updated successfully

If we now select the PROD_SALES_GROUP, let’s see if we have targets defined on it. We select the PROD_SALES_GROUP and we select Go To Group Home Page:

We can see the DB112 target database, however, this database is not synchronized. We have to select “Start Synchronization” to apply the templates right now, it takes a little time but finally the target gets synchronized:

We make the same operations for the other groups and finally, our Administration Group Infrastructure is ready !

Limitations

Hierarchy levels organization:

The hierarchy levels are “redundant”, which means that each level contains the same sub-levels.

In the following example : http://docs.oracle.com/cd/E24628_01/doc.121/e24473/administration_group.htm#autoId5 “Prod” and “Staging” have the same locations and each location has the same “line of businesses”. We might imagine systems with different “life cycle status” (i.e PROD/TEST) located at different place (i.e PROD at ZH/BSL for PROD and test at GVA/LS for TEST). However this does not seem to be possible with the current implementation.

Hierarchy maintenance:

To modify the hierarchy , the whole hierarchy is dropped and removed. This might also be a source of loosing some settings, therefore the concept must be correctly defined from scratch.

Definition of some monitoring settings (i.e monitoring configuration) :

It is not possible to setup the monitoring configuration (i.e dbsnmp username and password) for an administration group. Furthermore it is not possible to set a “generic” connect string like a SCAN IP in a cluster for instance. This feature would prevent to configure individually each target.

Conclusion

The use of Administration Groups and Template collections eases the automation of monitoring different kind of targets. The main advantage is the automatic registration of the target to a specific administration group as soon as a property is assigned to a target. This is quite interesting for DBAs, because they will not forget to administer targets in huge data centers, for example.

 

Cet article Oracle Enterprise Manager 12c: Administration Groups & Template Collections est apparu en premier sur Blog dbi services.


Oracle Enterprise Manager 12c: creation and management of administrators through emcli

$
0
0

Cloud Control 12c (and the former Grid Control 11g) offers the possibility to create administrators and manage their privileges through the “emcli” command line utility. The main advantage of this method (based on scripts) is to be able to reproduce the creation of the users as soon as a new Cloud Control infrastructure must be built up (for instance in order to migrate Grid Control 11g on Windows to Cloud Control 12c on Linux).

Indeed, whereas some objects like the monitoring templates can be easily exported and imported, there is no possibility to export and import the Grid/Cloud Control users.

Creating these users through scripts thus offers the advantage of being able to reproduce their creation on a new environment.

To get a complete help of the “emcli create_user” command, use the following statement:

# emcli help create_user
  emcli create_user
        -name="name"
        -password="password"
        [-type="type of user"]
        [-roles="role1;role2;..."]
        [-email="email1;email2;..."]
        [-privilege="name[;secure-resource-details]]"
        [-separator=privilege="sep_string"]
        [-subseparator=privilege="subsep_string"]
        [-profile="profile_name"]
        [-desc="user_description"]
        [-expired="true/false"]
        [-prevent_change_password="true/false"]
        [-department="department_name"]
        [-cost_center="cost_center"]
        [-line_of_business="line_of_business"]
        [-contact="contact"]
        [-location="location"]
        [-input_file="arg_name:file_path"]

The name and password of the user are mandatory parameters. Beside these parameters the other important settings for a Grid Control user are of course its privileges and access rights.

Concerning the privilege management Cloud Control 12c distinguishes between three main groups of privileges:

  • privileges concerning Jobs
  • privileges concerning Targets
  • System privileges

To get details about these privileges, use the following commands (once connected to CC 12c with “emcli login -username=”):

oracle@chhs-sora011:/home/oracle [oms12c] emcli get_supported_privileges -type=SYSTEM

As an example we will create a simple user having access to a particular database (The Enterprise Manager repository database):

emcli create_user -name=”useryann” -password=”useryann” -privilege=”view_target;EMREP12_SITE1.domain.ch:oracle_database”User “USERYANN” created successfully

To extend a user in order to provide aditionnal privileges, the modify_user command can be used (be careful the existing privileges must be specified during the modification, if not they will be lost):

emcli modify_user -name=”useryann” -privilege=”view_target;EMREP12_SITE1.domain.ch:oracle_database”
-privilege=”CONNECT_TARGET;EMREP12_SITE1.domain.ch:oracle_database”
User “USERYANN” modified successfully

The “connect_target” privilege allows to access the performance view of the database target, supposing the user also knows a database user credential to access it.

Drawback of the emcli/script-based method

Of course if Oracle changes/adds/removes some privileges in Cloud Control 12c, the script won’t be accurate anymore and must be adapted for the new releases of the Cloud Control infrastructure. This will however take less time than re-create all users through the Graphical User Interface.

Since Cloud Control 12c , the system privileges granularity is much more dense, more than 75 system privileges are available compared to the 11 system privileges in Grid Control 11g.

Details of the system privileges are available under:

http://docs.oracle.com/cd/E25178_01/doc.1111/e24473.pdf

In order to check the current privileges of a Cloud Control 12c administrator, emcli does not provide any command (or Verb), therefore the only possibility is to access the repository as Repository Owner (SYSMAN) and start the following select:

set lines 132
set pages 999

col GRANTEE format a20
col PRIV_NAME format a25
col TARGET_NAME format a40
col TARGET_TYPE format a25

select grantee, PRIV_NAME, TARGET_NAME, TARGET_TYPE
from MGMT_PRIV_GRANTS pg, MGMT_TARGETS mt
where pg.GUID = mt.TARGET_GUID
and grantee = ‘USERYANN’
/

Below some information about the available Cloud Control 12c privileges. List the supported privileges for Jobs management:

# emcli get_supported_privileges -type=JOB
 Privilege Name  Privilege Scope  Security Class  Resource Guid Column  Resource Id Columns
 MANAGE_JOB      Resource         JOB             JOB_ID
 GRANT_VIEW_JOB  Resource Type    JOB
 FULL_JOB        Resource         JOB             JOB_ID
 CREATE_JOB      Resource Type    JOB
 VIEW_JOB        Resource         JOB             JOB_ID

List of supported privileges for Targets:

# emcli get_supported_privileges -type=SYSTEM
Privilege Name                  Privilege Scope  Security Class           Resource Guid Column  Resource Id Columns
 MANAGE_PRIV_ANY_PATCH_PLAN      Resource Type    PATCH
 CREATE_PLAN_TEMPLATE            Resource Type    PATCH
 PATCH_SETUP                     Resource Type    PATCH
 CREATE_PATCH_PLAN               Resource Type    PATCH
 VIEW_ANY_PATCH_PLAN             Resource Type    PATCH
 FULL_ANY_PATCH_PLAN             Resource Type    PATCH
 CREATE_BUSINESS_RULESET         Resource Type    RULESET_SEC
 SWLIB_EXPORT                    Resource Type    SWLIB_ENTITY_MGMT
 SWLIB_EDIT_ANY_ENTITY           Resource Type    SWLIB_ENTITY_MGMT
 SWLIB_MANAGE_ANY_ENTITY         Resource Type    SWLIB_ENTITY_MGMT
 SWLIB_IMPORT                    Resource Type    SWLIB_ENTITY_MGMT
 SWLIB_CREATE_ANY_ENTITY         Resource Type    SWLIB_ENTITY_MGMT
 SWLIB_VIEW_ANY_ENTITY           Resource Type    SWLIB_ENTITY_MGMT
 SWLIB_GRANT_ANY_ENTITY_PRIV     Resource Type    SWLIB_ENTITY_MGMT
 GRANT_VIEW_JOB                  Resource Type    JOB
 CREATE_JOB                      Resource Type    JOB
 VIEW_ANY_TC                     Resource Type    TEMPLATECOLLECTION
 CREATE_TC                       Resource Type    TEMPLATECOLLECTION
 CREATE_OBJECT                   Resource Type    FMW_DIAG_SEC_CLASS
 VIEW_OBJECT                     Resource Type    FMW_DIAG_SEC_CLASS
 BTM_USER                        Resource Type    BTM
 BTM_ADMINISTRATOR               Resource Type    BTM
 SWLIB_STORAGE_ADMIN             Resource Type    SWLIB_ADMINISTRATION
 PUBLISH_REPORT                  Resource Type    REPORT_DEF
 VIEW_BA_MENU_ITEM               Resource Type    APM
 VIEW_APM_PAYLOAD                Resource Type    APM
 ACCESS_APM_SESSION_DIAG         Resource Type    APM
 ASSOCIATE_APM_ENTITIES          Resource Type    APM
 IMPORT_DP                       Resource Type    DP
 CREATE_DP                       Resource Type    DP
 GRANT_FULL_DP                   Resource Type    DP
 GRANT_LAUNCH_DP                 Resource Type    DP
 OPERATOR_ANY_TARGET             Resource Type    TARGET
 PERFORM_OPERATION_ANYWHERE      Resource Type    TARGET
 FULL_ANY_TARGET                 Resource Type    TARGET
 PUT_FILE_AS_ANY_AGENT           Resource Type    TARGET
 PERFORM_OPERATION_AS_ANY_AGENT  Resource Type    TARGET
 CREATE_TARGET                   Resource Type    TARGET
 CONNECT_ANY_VIEW_TARGET         Resource Type    TARGET
 CREATE_PROPAGATING_GROUP        Resource Type    TARGET
 VIEW_ANY_TARGET                 Resource Type    TARGET
 USE_ANY_BEACON                  Resource Type    TARGET
 EM_MONITOR                      Resource Type    TARGET
 CREATE_BACKUP_CONFIG            Resource Type    SBRM_BACKUP_CONFIG
 CREATE_MEXT                     Resource Type    MEXT_SECURE_CLASS
 FULL_ANY_CCS                    Resource Type    CCS_SECURE_CLASS
 FULL_OWNED_CCS                  Resource Type    CCS_SECURE_CLASS
 CREATE_CREDENTIAL               Resource Type    NAMED_CREDENTIALS
 SUPER_USER                      Resource Type    SYSTEM
 VIEW_ANY_TEMPLATE               Resource Type    TEMPLATE
 VIEW_ANY_SELFUPDATE             Resource Type    SELFUPDATE_SECURE_CLASS
 SELFUPDATE_ADMINISTRATOR        Resource Type    SELFUPDATE_SECURE_CLASS
 VIEW_ANY_DISC_TARGETS_ON_HOST   Resource Type    DISCOVERY
 VIEW_ANY_DISCOVERED_HOSTS       Resource Type    DISCOVERY
 CAN_SCAN_NETWORK_PRIVILEGE      Resource Type    DISCOVERY
 AD4J_ADMINISTRATOR              Resource Type    AD4J
 AD4J_USER                       Resource Type    AD4J
 JVMD_VIEW_LOCALS_PRIV           Resource Type    AD4J
 ACCESS_EM                       Resource Type    ACCESS
 PLUGIN_AGENT_ADMINISTRATOR      Resource Type    PLUGIN
 PLUGIN_OMS_ADMINISTRATOR        Resource Type    PLUGIN
 PLUGIN_VIEW                     Resource Type    PLUGIN
 ASREPLAY_VIEWER                 Resource Type    ASREPLAY_ENTITY_MGMT
 ASREPLAY_OPERATOR               Resource Type    ASREPLAY_ENTITY_MGMT
 MANAGE_ANY_CHANGE_PLAN          Resource Type    CHANGE_PLAN
 VIEW_ANY_OMS_PROPERTY           Resource Type    OMS_PROP_SECURE_CLASS
 MANAGE_ANY_OMS_PROPERTY         Resource Type    OMS_PROP_SECURE_CLASS
 CREATE_ANY_POLICY               Resource Type    CLOUDPOLICY
 VIEW_ANY_POLICY                 Resource Type    CLOUDPOLICY
 SVCD_CREATE_DASH                Resource Type    SVCD
 EMHA_ADMINISTRATION             Resource Type    EMHA_SECURE_CLASS
 VIEW_ANY_COMPLIANCE_FWK         Resource Type    COMPLIANCE_FWK
 CREATE_COMPLIANCE_ENTITY        Resource Type    COMPLIANCE_FWK
 FULL_ANY_COMPLIANCE_ENTITY      Resource Type    COMPLIANCE_FWK
 VIEW_ANY_POLICY_GROUP           Resource Type    CLOUDPOLICYGROUP
 CREATE_POLICY_GROUP             Resource Type    CLOUDPOLICYGROUP
 

Cet article Oracle Enterprise Manager 12c: creation and management of administrators through emcli est apparu en premier sur Blog dbi services.

Oracle Database 12c: Oracle OEM express

$
0
0

Together with Oracle Database 12c, Oracle has introduced a new administration console named Oracle Enterprise Manager Express (Oracle OEM Express). This “light” version of Enterprise Manager Database Console – which is not supported in Oracle 12c anymore – is a management product built into Oracle Database 12c.

There is no installation or management required, the database creation with dbca enables OEM Express and gives you the URL connect string.
As there is no mid-tier or middleware components in OEM Express, the performance overhead with the database server is not important.
The URL connection is: http://db_hostname:port/em/

OEM Express: the features

OEM Express only features the basic administration pages of Enterprise Manager Cloud 12c:

Configuration:

  • Initialization parameters
  • Memory
  • Database feature
  • Database properties

Storage:

  • Tablespace
  • Undo
  • Redo
  • Archive log
  • Control files

Performance hub:

  • Real-time performance monitoring and tuning
  • Historical performance and tuning
  • SQL monitoring
  • ADDM
  • Active Session History (ASH) analytics
  • Automatic SQL Tuning Advisor and SQL Tuning Advisor

Thus, OEM Express allows you to manage the basic features of an Oracle database: user security, database memory, and storage. You can also access real time performance charts.
OEM Express is easy to handle and the response times are very correct.
The database homepage looks like the Cloud 12c homepage with its performance, resource, and sql monitoring pages:

em1

The storage page displays the main properties of the tablespaces and datafiles (free space, datafile, etc.):

em2

The user page displays the different user properties (account status, creation date, expiration date, etc.):

em3

The performance hub page shows a lot of useful information (memory, I/O, monitored SQL, ADDM):

em4

Conclusion

OEM Express might be a good solution if you do not have 100 databases to administrate. In this last case, you should use Oracle Enterprise Manager Cloud Control 12c.
With OEM express, Oracle has replaced the old resource-consuming Oracle Enterprise Manager Database Console by a new, easy-to-handle, and nicely performing product.
One of the main advantages is that you do not need to install the product: OEM Express is built into the database, but the performance impact is really not important.

 

Cet article Oracle Database 12c: Oracle OEM express est apparu en premier sur Blog dbi services.

Oracle Open World 2013: Day four – Oracle WebLogic Server management

$
0
0

Today, I went to a session on Oracle WebLogic Server management. It was about the challenges of the application infrastructure to deliver a high quality of services in the cloud. The main goal is to optimize production and efficiency through automated management and administration. The speakers were David Cabetlus (Senior Principal Product Manager Oracle) and Glen Hawkins (Senior Director of Product Management Oracle). The session had two parts: Oracle WebLogic Server and Oracle Enterprise Manager Cloud Control 12cR3

Oracle WebLogic Server

This part focused on the WebLogic management tools for configuration, operations, and administration.

The following tools have been explained: WLST, JMX, Administration Console, REST API, and Mbean trees. WLDF has also been discussed. Let me add that WLST is specifically designed and optimized during all new version in terms of automation, standardization, and repeatability.

Do not forget the Oracle Enterprise pack for eclipse with is a specific plug-in for WLS management feature (WLST script coding, MBean Navigators and aso).

The WebLogic diagnostic framework (WLDF) features improved monitoring (logs, runtime metrics and instrumentation) and automation.
WLDF is capable of processing, capturing, exposing and retrieving information on WebLogic domains.

It includes a dashboard, watch rules, and notifications to easily diagnose WebLogic domains.

Cloud elasticity with dynamic, declaratively configured clusters was also discussed. The goal is to enable scalability for the cloud.

Unified management framework based on WLS management framework was also talked about, covering the management of the application server (WebLogic) and the data grid infrastructure (Coherence).

An other improvement is the Maven integration, which enables automation and production for building and developing WebLogic applications with a remote repository (jar and poms).

Oracle Enterprise Manager Cloud Control 12cR3

The full title of the presentation was “Taking to the next level with Oracle Enterprise Manager Cloud Control 12cR3″.

It focused on the following innovations:

  • Complete cloud life cycle management
  • Integrated cloud stack management
  • Business Driven application management

The complete cloud life cycle management describes the cycle plan to optimize passing through the setup, building, testing, deploying, monitoring, managing (meter & charge) of the Oracle Cloud stack. It’s now completely managed by Oracle Enterprise Manager.

Oracle Cloud Stack

 

OOW20130925_1_001

Integrated cloud stack management

Here is a summary of the innovations concerning OEM “Total Cloud Control” 12cR3:

  • Performance monitoring for availability and performance issues with the following features

– Visibility across the cloud stack
– Real time & hierarchical monitoring
– rectify automatically problem via already implemented WLST scripts.

  • Diagnose JVM for WebLogic and Java applications

– Complete visibility of the JVM stack
– Heap and threads, identify ECID in running thread
– Already deployed on production with no restart needed
– Middleware diagnostic advisor
– Root cause analysis (evaluate and provide guided help)
– Diagnose JMS, JDBC properties aso

  • Patching and provisioning

– Reduce effort, time and eliminate error
– automation and tracking
– Pre-validation

Oracle Enterprise Management is also designed to manage all Cloud Application Foundation products.

Business driven application management

Features have been added to manage Business Applications provided by Oracle, such as SOA, Webcenter, and User Experience Management from a business perspective (SLA, status, infra health). All business transactions (BT) are now tracked to monitor the user frequency usage. Middleware and Database request and diagnostic are also tracked for these business application.

After this session, I begin to understand why they are calling it OEM “Total Cloud Control”.

 

Cet article Oracle Open World 2013: Day four – Oracle WebLogic Server management est apparu en premier sur Blog dbi services.

Oracle EM agent 12c thread leak on RAC

$
0
0

In a previous post about nproc limit, I wrote that I had to investigate the nproc limit with the number of threads because my Oracle 12c EM agent was having thousands of threads. This post is a short feedback about this issue and the way I have found the root cause. It concerns the enterprise manager agent 12c on Grid Infrasctructure >= 11.2.0.2

NLWP

The issue was:

ps -o nlwp,pid,lwp,args -u oracle | sort -n
NLWP   PID   LWP COMMAND
   1  8444  8444 oracleOPRODP3 (LOCAL=NO)
   1  9397  9397 oracleOPRODP3 (LOCAL=NO)
   1  9542  9542 oracleOPRODP3 (LOCAL=NO)
   1  9803  9803 /u00/app/oracle/product/agent12c/core/12.1.0.3.0/perl/bin/perl /u00/app/oracle/product/agent12c/core/12.1.0.3.0/bin/emwd.pl agent /u00/app/oracle/product/agent12c/agent_inst/sysman/log/emagent.nohup
  19 11966 11966 /u00/app/11.2.0/grid/bin/oraagent.bin
1114  9963  9963 /u00/app/oracle/product/agent12c/core/12.1.0.3.0/jdk/bin/java ... emagentSDK.jar oracle.sysman.gcagent.tmmain.TMMain

By default ps has only one entry per process, but each processes can have several threads – implemented on linux as light-weight process (LWP). Here, the NLWP column shows that I have 1114 threads for my EM 12c agent – and it was increasing every day until it reached the limit and the node failed (‘Resource temporarily unavailable’).

The first thing to do is to know what those threads are. The ps entries do not have a lot of information, but I discovered jstack which every java developer should know, I presume. You probably know that java has very verbose (lengthy) stack traces. Jstack was able to show me thousands of them in only one command:

Jstack

$ jstack 9963
2014-06-03 13:29:04
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.14-b01 mixed mode):

"Attach Listener" daemon prio=10 tid=0x00007f3368002000 nid=0x4c9b waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"CRSeOns" prio=10 tid=0x00007f32c80b6800 nid=0x3863 in Object.wait() [0x00007f31fe11f000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at oracle.eons.impl.NotificationQueue.internalDequeue(NotificationQueue.java:278)
	- locked  (a java.lang.Object)
	at oracle.eons.impl.NotificationQueue.dequeue(NotificationQueue.java:255)
	at oracle.eons.proxy.impl.client.base.SubscriberImpl.receive(SubscriberImpl.java:98)
	at oracle.eons.proxy.impl.client.base.SubscriberImpl.receive(SubscriberImpl.java:79)
	at oracle.eons.proxy.impl.client.ProxySubscriber.receive(ProxySubscriber.java:29)
	at oracle.sysman.db.receivelet.eons.EonsMetric.beginSubscription(EonsMetric.java:872)
	at oracle.sysman.db.receivelet.eons.EonsMetricWlm.run(EonsMetricWlm.java:139)
	at oracle.sysman.gcagent.target.interaction.execution.ReceiveletInteractionMgr$3$1.run(ReceiveletInteractionMgr.java:1401)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at oracle.sysman.gcagent.util.system.GCAThread$RunnableWrapper.run(GCAThread.java:184)
	at java.lang.Thread.run(Thread.java:662)
...

CRSeOns

I don’t paste all of them here. We have the ‘main’, we have a few GCs and ‘Gang workers’ which are present in all JVMs and we have a few enterprise manager threads. And what was interesting was that I had thousands of “CRSeOns” that seemed to be increasing.

Some guesses: I’m on RAC, and I have a ‘ons’ resource and the EM agent tries to subscribe to it. Goggle search returned nothing, and that’s the reason I put that in a blog post now. Then I searched MOS, and bingo, there is a note: Doc ID 1486626.1. It has nothing to do with my issue, but has an interesting comment in it:

In cluster version 11.2.0.2 and higher, the ora.eons resource functionality has been moved to EVM. Because of this the ora.eons resource no longer exists or is controlled by crsctl.

It also explains how to disable EM agent subscription:

emctl setproperty agent -name disableEonsRcvlet -value true

I’m in 11.2.0.3 and I have thousands of threads related to a functionality that doesn’t exist anymore. And that leads to some failures in my 4 nodes cluster.

The solution was simple: disable it.

For a long time I have seen a lot of memory leaks or CPU usage leaks related to the enterprise manager agent. With this new issue, I discovered a thread leak and I also faced a SR leak when trying to get support for the ‘Resource temporarily unavailable’ error, going back and forth between OS, Database, Cluster and EM support teams…

 

Cet article Oracle EM agent 12c thread leak on RAC est apparu en premier sur Blog dbi services.

Oracle OEM Cloud Control 12c upgrade to 12.1.0.4

$
0
0

In this blog post, I will describe how to upgrade from Oracle Enterprise Manager Cloud Control 12.1.0.3 to OEM 12.1.0.4.0. I have already described the main new features of Cloud Control 12.1.0.4 version in an earlier post (Oracle OEM Cloud Control 12.1.0.4 – the new features). The first pre-requisite is to apply the patch 11061801 on the repository database in 11.2.0.3 version, using the classical opatch apply method. Then, we can begin the upgrade phase.

First, we should explicitly stop the OMS jvmd and adp engines:

oracle@vmtestoraem12c:/home/oracle/ [oms12c] emctl extended oms jvmd stop -allOracle Enterprise Manager Cloud Control 12c Release 3Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.Please enter the SYSMAN password:Stopping all Engines{}
No engines found for this operation
oracle@vmtestoraem12c:/home/oracle/ [oms12c] emctl extended oms adp stop -a
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
No valid registry entry found for verb jv

Then we stop the OMS:

oracle@vmtestoraem12c:/home/oracle/ [oms12c] emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation.
All rights reserved.Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down

We stop the management agent:

oracle@vmtestoraem12c:/home/oracle/ [agent12c] emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation.
All rights reserved.
Stopping agent ..... stopped.

Finally after unzipping the 12.1.0.4 binary files, we can run the installer:

cc1

We choose not to receive security updates:

cc2

cc3

We choose to skip the updates:

cc4

All the prerequisites checks have succeeded :=)

cc5

We select a One System Upgrade and the Oracle_Home where the 12.1.0.3 version is installed:

cc7

We select the new Middleware Home:

cc8

We enter the administration passwords:

cc9

The installer reminds you that you have correctly patched the repository database. Let’s check if it is correct:

Interim patches (1) :
Patch 11061801 : applied on Mon Aug 04 16:52:51 CEST 2014
Unique Patch ID: 16493357
Created on 24 Jun 2013, 23:28:20 hrs PST8PDT
Bugs fixed: 11061801

 

cc10

We did not copy the emkey to the repository, so we have to run:

oracle@vmtestoraem12c:/u01/app/oracle/MiddleWare_12103/oms/bin/ [oms12c] emctl config emkey -copy_to_repos_from_file -repos_conndesc '"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=vmtestoraem12c.it.dbi-services.com)(PORT=1521)))(CONNECT_DATA=(SID=OMSREP)))"' -repos_user sysman -emkey_file /u01/app/oracle/MiddleWare_12103/oms/sysman/config/emkey.ora
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation.
All rights reserved.
Enter Admin User's Password :
Enter Enterprise Manager Root (SYSMAN) Password :
The EMKey has been copied to the Management Repository.
This operation will cause the EMKey to become unsecure.

After the required operation has been completed, secure the EMKey by running “emctl config emkey -remove_from_repos”:

cc11

We select Yes to let the installer fix the isssue automatically:

cc12

We select Next:

cc13

We can select additionnal plugins:

cc14

We enter the weblogic password:

cc15

We select install:

cc16

And finally we run the allroot.sh script connected as root:

cc17

The upgrade is successfull! Let’s check the OMs status:

oracle@vmtestoraem12c:/u01/app/oracle/MiddleWare_12cR4/oms/ [oms12c] emctl status oms -details
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.
All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host : vmtestoraem12c.it.dbi-services.com
HTTP Console Port : 7789
HTTPS Console Port : 7801
HTTP Upload Port : 4890
HTTPS Upload Port : 4901
EM Instance Home : /u01/app/oracle/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://vmtestoraem12c.it.dbi-services.com:7801/em
Upload URL: https://vmtestoraem12c.it.dbi-services.com:4901/empbs/upload
WLS Domain InformationDomain Name : GCDomain
Admin Server Host : vmtestoraem12c.it.dbi-services.com
Admin Server HTTPS Port: 7102
Admin Server is RUNNING
Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: vmtestoraem12c.it.dbi-services.com
WebTier is Up
Oracle Management Server is Up
BI Publisher is not configured to run on this host.

Now we have access to the Enterprise Manager Cloud Control 12.1.0.4:

cc18

The next step consists in upgrading the management agents. From the Setup menu, we select Upgrade Agents:

cc19

cc20

The management agent is detected:

cc21

The operation is successfull:

cc22

The update to 12.1.0.4 Enterprise Manager version did not cause any problem and has a new feature which checks the correct patching of the Enterprise Manager repository database.

 

Cet article Oracle OEM Cloud Control 12c upgrade to 12.1.0.4 est apparu en premier sur Blog dbi services.

Query the Enterprise Manager collected metrics

$
0
0

Enterprise Manager (Cloud Control for example) gathers a lot of metrics. You can display them from the GUI, but you can also query the SYSMAN views directly. Today, I wanted to get the history of free space in an ASM disk group for the previous week. Here is how I got it.
Enterprise Manager metrics are aggregated in MGMT_METRICS_1HOUR (granularity 1 hour, retention 1 month) and MGMT_METRICS_1DAY (granularity 1 day, retention 1 year). But the detailed collected values are kept 7 days in MGMT_METRICS_RAW. This is what I ‘ll query.
All that is in the SYSMAN schema:

SQL> alter session set current_schema=SYSMAN;

The metrics are related to a target and a metric. Let’s find them.

target

First, let’s have a look at all available the targets types in MGMT_TARGETS:

select distinct target_type,type_display_name from mgmt_targets order by 1;

TARGET_TYPE TYPE_DISPLAY_NAME
cluster Cluster
composite Group
has Oracle High Availability Service
host Host
j2ee_application Application Deployment
metadata_repository Metadata Repository
microsoft_sqlserver_database Microsoft SQL Server
oracle_apache Oracle HTTP Server
oracle_beacon Beacon
oracle_database Database Instance
oracle_dbsys Database System
oracle_em_service EM Service
oracle_emd Agent
oracle_emrep OMS and Repository
oracle_emsvrs_sys EM Servers System
oracle_home Oracle Home
oracle_ias_farm Oracle Fusion Middleware Farm
oracle_listener Listener
oracle_oms Oracle Management Service
oracle_oms_console OMS Console
oracle_oms_pbs OMS Platform
osm_cluster Cluster ASM
osm_instance Automatic Storage Management
rac_database Cluster Database
weblogic_domain Oracle WebLogic Domain
weblogic_j2eeserver Oracle WebLogic Server

I want to see ASM metrics for my RAC cluster. The display name ‘Cluster ASM’ has the internal type as ‘osm_cluster’ (yes, it was initially called Oracle Storage Management).

Then here are all the targets I have for that target type:

SQL> select target_name,target_type,target_guid from mgmt_targets where target_type='osm_cluster';
TARGET_NAME TARGET_TYPE TARGET_GUID
+ASM_xxzhorac1 osm_cluster B8A5A42E2F8F6FCF6CF9FEB082B4CD79

In SYSMAN schema, we have GUID identifiers.

metric

Then, for each target type, there is a large number of metrics referenced in MGMT_METRICS:

select distinct target_type,metric_name,metric_label,metric_column,column_label,metric_guid 
from mgmt_metrics
where target_type='osm_cluster' and metric_label like 'Disk Group%'
order by target_type,metric_name,metric_column;

 

METRIC_NAME METRIC_LABEL COLUMN_LABEL
DiskGroup_Target_Component Disk Group Target Component
DiskGroup_Target_Component Disk Group Target Component Disk Group Name
DiskGroup_Target_Component Disk Group Target Component Disk Count
DiskGroup_Usage Disk Group Usage
DiskGroup_Usage Disk Group Usage Disk Group Name
DiskGroup_Usage Disk Group Usage Disk Group Free (MB)
DiskGroup_Usage Disk Group Usage Disk Group Used %
DiskGroup_Usage Disk Group Usage Used % of Safely Usable
DiskGroup_Usage Disk Group Usage Size (MB)
DiskGroup_Usage Disk Group Usage Redundancy
DiskGroup_Usage Disk Group Usage Disk Group Usable Free (MB)
DiskGroup_Usage Disk Group Usage Disk Group Usable (MB)
asm_diskgroup Disk Groups
asm_diskgroup Disk Groups Allocation Unit Size (MB)
asm_diskgroup Disk Groups Disk Count
asm_diskgroup Disk Groups Disk Group
asm_diskgroup Disk Groups Redundancy
asm_diskgroup Disk Groups Size (GB)
asm_diskgroup Disk Groups Contains Voting Files
asm_diskgroup_attribute Disk Group Attributes
asm_diskgroup_attribute Disk Group Attributes Attribute Name
asm_diskgroup_attribute Disk Group Attributes Disk Group
asm_diskgroup_attribute Disk Group Attributes Value
diskgroup_imbalance Disk Group Imbalance Status
diskgroup_imbalance Disk Group Imbalance Status Disk Group Imbalance (%) without Rebalance
diskgroup_imbalance Disk Group Imbalance Status Disk Maximum Used (%) with Rebalance
diskgroup_imbalance Disk Group Imbalance Status Disk Minimum Free (%) without Rebalance
diskgroup_imbalance Disk Group Imbalance Status Disk Count
diskgroup_imbalance Disk Group Imbalance Status Disk Group
diskgroup_imbalance Disk Group Imbalance Status Actual Imbalance (%)
diskgroup_imbalance Disk Group Imbalance Status Actual Minimum Percent Free
diskgroup_imbalance Disk Group Imbalance Status Rebalance In Progress
diskgroup_imbalance Disk Group Imbalance Status Disk Size Variance (%)

Ok there is a lot of metrics.
If you want more information about them, just go to the Enterprise manager documentation. I’m interrseted about disk group rebalancing and documentation for Disk Group Imbalance Status metrics is here.

collected values

Now let’s put that together and join to MGMT_METRICS_RAW where I’m interested in the ‘U90′ diskgroup:

select 
 to_char(collection_timestamp,'dd-mon-yyyy') day,to_char(collection_timestamp,'hh24:mi') hour
 ,metric_label||' - '||column_label label,key_value key,value
from
(select distinct target_name,target_type,target_guid from mgmt_targets where target_type='osm_cluster')
join (
 select distinct 
  target_type,metric_name,metric_label,metric_column,column_label,short_name,metric_guid 
 from mgmt_metrics
) using(target_type)
join mgmt_metrics_raw using(target_guid,metric_guid)
where key_value = 'U90' and collection_timestamp>sysdate-8
order by collection_timestamp desc,metric_label,column_label,key_value
;
DAY HOUR LABEL KEY VALUE
02-mar-2015 15:43 Disk Group Usage – Disk Group Free (MB) U90 939137
02-mar-2015 15:43 Disk Group Usage – Disk Group Usable (MB) U90 1279980
02-mar-2015 15:43 Disk Group Usage – Disk Group Usable Free (MB) U90 939137
02-mar-2015 15:43 Disk Group Usage – Disk Group Used % U90 26.629
02-mar-2015 15:43 Disk Group Usage – Size (MB) U90 1279980
02-mar-2015 15:43 Disk Group Usage – Used % of Safely Usable U90 26.629
02-mar-2015 15:39 Disk Group Imbalance Status – Actual Imbalance (%) U90 0.164381953

I usually get the result from SQL Developer and export it as html. This is what I’ve pasted above. And it’s easy to open it with Excel and get a nice pivot chart from it:

b2ap3_thumbnail_CaptureEM-Metrics.JPG

In my case, I was interested by the available free space in my diskgroup disks during the week. A disk has been added on 24-feb 20:00 but the re-balance hanged for 24 hours. The blue area is the minimum free space (among all the disgroup disks – which have the same size) and the grey part is the size of the newly added disk that has to be re-balanced among all disks.

But the goal of this post is only to show how to get collected statistics:

  • identify the target type
  • identify the target
  • identify the metric
  • join that with the raw statistics

I need that very rarely, but it can help to analyze something that happened in the past.

 

Cet article Query the Enterprise Manager collected metrics est apparu en premier sur Blog dbi services.

dbsnmp expiring password, manually triggering metrics collections

$
0
0

When you use Enterprise Manager Cloud control 12c, the monitor username commonly used is dbsnmp. Depending on the Oracle profile used for this user, the dbsnmp password can expire, and as a consequence multiple targets will be seen in a pending status by Enterprise Manager Cloud control 12c.

An interesting way to solve this problem is to create a metric extension detecting in how many days the password will expire:

You realize the operation as follows:

dbsnmp1

You define the collection frequency to 1 day

dbsnmp2

You define the SQL request

dbsnmp3

You define the metrics columns

dbsnmp4

The metric extension defined, saved as deployable, published and applied to your database targets you will be told when the dbsnmp password will expire.

In case the dbsnmp password is about to expire, such an incident will be created:

dbsnmp7

By the way, you will notice that the incident created by the password expiry will not be evaluated before one day, even if you change the password and the incident will remain in the EM12c incident manager.

Of course you can use the Reevaluate Alert button in the incident manager page:

dbsnmp6

Nevertheless with EM12c, you have the possibility to manually trigger the metric collection by using the emctl control agent runCollection command.

For example, if you need to reevaluate the dbsnmp_expiry metric collection manually and not waiting one day, you will have to use the following command:

emctl control agent runcollection OMSREP:oracle_database ‘ME$dbsnmp_expiry’

The metric will be reevaluated and the incident will disappear.

Manually triggering the metrics can be very helpful when you administer a lot of targets. The usual case is when you receive a tablespace full alert. You increase or add a data file to correct the error, but as previously the metric collection will not be evaluated immediately and the generated incident will always be present.

The syntax of the command described in the Oracle documentation is:

emctl control agent runCollection <targetName>:<targetType> <collectionItemName>

 

Oracle’s documentation tells us to look in xml files located in $AGENT_BASE/plugins in order to find the collectionItemName:

oracle@vm12c:/u01/app/oracle/agent12cR5/plugins/ [agent12c] ls
oracle.sysman.beacon.agent.plugin_12.1.0.5.0
oracle.sysman.emrep.agent.plugin_12.1.0.5.0
oracle.sysman.db.agent.plugin_12.1.0.8.0
oracle.sysman.oh.agent.plugin_12.1.0.5.0
oracle.sysman.db.discovery.plugin_12.1.0.8.0
oracle.sysman.oh.discovery.plugin_12.1.0.5.0
oracle.sysman.emas.agent.plugin_12.1.0.8.0
oracle.sysman.xa.discovery.plugin_12.1.0.6.0
oracle.sysman.emas.discovery.plugin_12.1.0.8.0

 

In our case we have a look in oracle.sysman.db.agent.plugin_12.1.0.8.0/default_collections and have a look at the database.xmlp file, you have to search Tablespaces Full:

======================================================================
== Category: Tablespaces Full - 10i - locally managed - not CDB
======================================================================
-->
<CollectionItem NAME="problemTbsp_10i_Loc">
<ValidIf>
<CategoryProp NAME="VersionCategory" CHOICES="10gR2;10gR203;10gR204;10gR205;11gR1;11gR2;11gR202;12c"/>

 

<CategoryProp NAME=”MetricScope” CHOICES=”DB”/>

<CategoryProp NAME=”DBCategoryDetails” CHOICES=”FullLLFile;none;TRUE;FALSE;1;0″/>

</ValidIf>

<Schedule>

<IntervalSchedule INTERVAL=”30″ TIME_UNIT=”Min”/>

</Schedule>

In order to manually trigger the tablespace full alert, we use the command:

oracle@vm12c:/u01/app/oracle/agent12cR5/ [agent12c] emctl control agent runCollection OMSREP:oracle_database problemTbsp_10i_Loc
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD runCollection completed successfully

There is also an easy way to find all the collectionItemName. All those collections are scheduled by the agent, so if you run the command:

oracle@vmtestoraem12c:/u01/app/oracle/ [agent12c] emctl status agent scheduler | grep oracle_database | grep OMSREP
2015-09-24 15:16:53.222 : oracle_database:OMSREP:UserLocksCollection
2015-09-24 15:16:55.432 : oracle_database:OMSREP:Response
2015-09-24 15:16:57.805 : oracle_database:OMSREP:wait_sess_cls_10i
2015-09-24 15:17:12.566 : oracle_database:OMSREP:observer_11g
2015-09-24 15:17:42.703 : oracle_database:OMSREP:haconfig2_collection
2015-09-24 15:18:41.928 : oracle_database:OMSREP:Recovery_Area
2015-09-24 15:18:51.331 : oracle_database:OMSREP:latest_hdm_findings_coll_item
2015-09-24 15:18:54.788 : oracle_database:OMSREP:dgprimarydb_collection
2015-09-24 15:19:09.136 : oracle_database:OMSREP:adr_alert_log_rollup
2015-09-24 15:19:38.388 : oracle_database:OMSREP:incident_meter
2015-09-24 15:19:59.818 : oracle_database:OMSREP:topWaitEvents_col
2015-09-24 15:20:16.315 : oracle_database:OMSREP:db_alertlog_coll_12
2015-09-24 15:20:32.234 : oracle_database:OMSREP:haconfig4_collection
2015-09-24 15:20:48.166 : oracle_database:OMSREP:memory_usage_coll_item
2015-09-24 15:20:48.307 : oracle_database:OMSREP:activity_pending
2015-09-24 15:20:49.534 : oracle_database:OMSREP:archFull
2015-09-24 15:20:59.886 : oracle_database:OMSREP:haconfig3_collection
2015-09-24 15:21:14.840 : oracle_database:OMSREP:db_inst_pga_alloc_11g
2015-09-24 15:21:43.593 : oracle_database:OMSREP:rac_global_cache_10i
2015-09-24 15:21:47.527 : oracle_database:OMSREP:dataguard_11gR2
2015-09-24 15:22:09.095 : oracle_database:OMSREP:memory_usage_sga_pga
2015-09-24 15:22:11.189 : oracle_database:OMSREP:sga_pool_wastage_10i
2015-09-24 15:22:19.278 : oracle_database:OMSREP:UserAudit
2015-09-24 15:22:21.311 : oracle_database:OMSREP:Database_Resource_Usage_10i
2015-09-24 15:22:45.416 : oracle_database:OMSREP:sysTimeModel_col
2015-09-24 15:23:41.486 : oracle_database:OMSREP:db_inst_opt_sga
2015-09-24 15:23:43.516 : oracle_database:OMSREP:instance_efficiency_10i
2015-09-24 15:23:51.902 : oracle_database:OMSREP:system_response_time_per_call_10i
2015-09-24 15:24:32.947 : oracle_database:OMSREP:wait_bottlenecks_10i
2015-09-24 15:24:53.137 : oracle_database:OMSREP:topSqlMonitoringList_col
2015-09-24 15:25:04.134 : oracle_database:OMSREP:instance_throughput_10i
2015-09-24 15:26:19.263 : oracle_database:OMSREP:service_10i
2015-09-24 15:33:34.681 : oracle_database:OMSREP:log_full
2015-09-24 15:33:35.160 : oracle_database:OMSREP:problemTbsp_10i_Loc
2015-09-24 15:33:35.223 : oracle_database:OMSREP:problemTbsp_10i_Dct
2015-09-24 15:33:35.474 : oracle_database:OMSREP:problemTbspTemp_10i_Loc
2015-09-24 15:33:35.504 : oracle_database:OMSREP:problemTbspUndo_10i_Loc
2015-09-24 15:33:35.797 : oracle_database:OMSREP:dbjob_status
2015-09-24 15:33:37.800 : oracle_database:OMSREP:audit_failed_logins
2015-09-24 15:33:38.363 : oracle_database:OMSREP:aq_monitoring_alerts
2015-09-24 15:33:38.455 : oracle_database:OMSREP:streams_processes_count_item
2015-09-24 15:33:38.762 : oracle_database:OMSREP:streams_statistics
2015-09-24 15:33:40.027 : oracle_database:OMSREP:Temporary File Status
2015-09-24 16:03:34.340 : oracle_database:OMSREP:scn_instance_collection
2015-09-24 16:03:34.671 : oracle_database:OMSREP:db_inst_cpu_usage
2015-09-24 16:03:38.055 : oracle_database:OMSREP:DatabaseVaultRealmViolation_collection
2015-09-24 16:03:38.222 : oracle_database:OMSREP:DatabaseVaultRealmConfigurationIssue_collection
2015-09-24 16:03:38.239 : oracle_database:OMSREP:DatabaseVaultCommandRuleViolation_collection
2015-09-24 16:03:38.542 : oracle_database:OMSREP:DatabaseVaultCommandRuleConfigurationIssue_collection
2015-09-24 16:03:39.403 : oracle_database:OMSREP:DatabaseVaultPolicyChanges_collection
2015-09-24 16:03:39.871 : oracle_database:OMSREP:scn_growth_collection
2015-09-24 18:03:25.455 : oracle_database:OMSREP:oracle_dbconfig
2015-09-24 18:03:33.694 : oracle_database:OMSREP:ocm_instrumentation
2015-09-24 18:03:33.712 : oracle_database:OMSREP:mgmt_sql
2015-09-24 18:03:33.714 : oracle_database:OMSREP:has_resources
2015-09-24 18:03:33.905 : oracle_database:OMSREP:sizeOfOSAuditFiles_collection
2015-09-24 18:03:34.589 : oracle_database:OMSREP:problemSegTbsp
2015-09-24 18:03:34.849 : oracle_database:OMSREP:ha_dg_target_summary
2015-09-24 18:03:34.858 : oracle_database:OMSREP:invalid_objects_rollup
2015-09-24 18:03:35.003 : oracle_database:OMSREP:tbspAllocation
2015-09-24 18:03:35.917 : oracle_database:OMSREP:haconfig1_collection
2015-09-24 18:03:36.848 : oracle_database:OMSREP:audit_failed_logins_historical
2015-09-24 18:03:38.968 : oracle_database:OMSREP:mgmt_database_listener_config
2015-09-24 18:03:38.996 : oracle_database:OMSREP:exadataCollection
2015-09-24 18:03:39.449 : oracle_database:OMSREP:scn_max_collection
2015-09-24 18:03:39.546 : oracle_database:OMSREP:db_instance_caging
2015-09-24 18:03:47.855 : oracle_database:OMSREP:oracle_cdbconfig
2015-09-24 22:08:59.848 : oracle_database:OMSREP:ME$dbsnmp_expiry

 

You will find the entire collection item name you can reevaluate with the emctl control agent runCollection command.

For a host target, the behavior is equivalent:

oracle@vmtestoraem12c:/u01/app/oracle/ [agent12c] emctl status agent scheduler | grep host | grep vmtestoraem12c

2015-09-24 15:22:12.565 : host:vm12c:Processes_diagnosticsLinux
2015-09-24 15:23:45.713 : host:vm12c:LoadLinux
2015-09-24 15:23:52.670 : host:vm12c:ProgramResourceUtilizationLinux
2015-09-24 15:24:10.227 : host:vm12c:PagingActivityLinux
2015-09-24 15:24:41.241 : host:vm12c:TotalDiskUsageLinux
2015-09-24 15:25:34.795 : host:vm12c:CPUUsageLinux
2015-09-24 15:26:19.727 : host:vm12c:FileMonitoringLinux
2015-09-24 15:26:31.792 : host:vm12c:NetworkLinux
2015-09-24 15:27:26.153 : host:vm12c:DiskActivityLinux
2015-09-24 15:33:35.080 : host:vm12c:proc_zombieLinux
2015-09-24 15:33:46.489 : host:vm12c:LogFileMonitorLinux
2015-09-24 15:34:22.695 : host:vm12c:FilesystemsLinux
2015-09-24 18:02:53.840 : host:vm12c:host_storage
2015-09-24 18:02:54.169 : host:vm12c:HostStorageSupport
2015-09-24 18:02:54.201 : host:vm12c:DiscoverTargets
2015-09-24 18:02:55.599 : host:vm12c:oracle_security
2015-09-24 18:02:56.532 : host:vm12c:Swap_Area_StatusLinux
2015-09-24 18:26:28.295 : host:vm12c:ll_host_config

 

Conclusion:

Depending of the metric evaluation frequency, it might be very useful to manually trigger the metric collections in order to cleanup false open incidents in the Enterprise Manager Cloud 12c console.

 

 

Cet article dbsnmp expiring password, manually triggering metrics collections est apparu en premier sur Blog dbi services.


Oracle EM Cloud Control 12c (CC12c)- Repeat alert notification

$
0
0

Oracle EM Cloud Control 12c (CC12c) – Repeat alert notification

In your EM installation, CC12c will notify your different administrators when specific incidents, events, or problems occurs.
But from standard configuration, you will receive only one warning or critical notification/alert … until the Clear or an Acknowledge of the alert.
Some times and for different reasons (human error, email was deleted, Mail server issues, …) you can lost or forgot this alert.
Hummm this is not good … especially for a critical alert on a productive environment!
To avoid such incomfortable case, you can configure Repeat of Notification in your Incident Rules.

Description:
Repeat notifications allow administrators to be notified repeatedly until an incident is either acknowledged or the number of Maximum Repeat Notifications has been reached.
CC12c supports repeat notification for all different notification methods (e-mail, OS command, PL/SQL procedure, and SNMP trap).
To enable this feature for a notification method, select the Send Repeat Notifications option.
In addition to setting the maximum number of repeat notifications, you can also set the time interval at which the notifications are sent.

Very important: Repeat notifications for rules will only be sent if the Send Repeat Notifications option is enabled in the Global Notification Methods page.

Here an example how to configure the Global Notification Methods in the Notification Methods page:

Repeat_in_Notification_Method_DA

Configuring Repeat Notifications in Incident Rules:

Setting repeat notifications globally at the notification method level may not be provide sufficient flexibility. For example, you may want to have different repeat notification settings based on event type. Enterprise Manager accomplishes this by allowing you to set repeat notifications for individual incident rule sets or individual rules within a rule set. Repeat notifications set at the rule level take precedence over those defined at the notification method level.

Here an example how to configure a Repeat Notifications in an individual incident Rule:

Edit one of your individual Incident Rule (within one of your Rule).

Repeat_Incident_rules_DA_Edit_Rule_1

Choose Next in your individual Incident Rule.

Repeat_Incident_rules_DA_Edit_Rule_2

On next page, “Add” or “Edit” an Action.

Repeat_Incident_rules_DA_Edit_Rule_3

In the Action pages, configure your Repeat Notification.

You can choice to select the Global Notification Methods or to create your own method for this rule. Click Continue.

Repeat_Incident_rules_DA_Edit_Rule_4

In the Review page, control your settings. Click Continue.

Repeat_Incident_rules_DA_Edit_Rule_5

Click “Save” to enable your settings. !!! Do not forget to save !!!

Repeat_Incident_rules_DA_Edit_Rule_6

Now you can simulate an incident or event to test that your Repeat settings are working correctly.

 

Visit our partner’s Oracle Website for more informations about Repeat Notification.

Ref: Oracle® Enterprise Manager Cloud Control Administrator’s Guide:
– Chapter 3. Notifications –> http://docs.oracle.com/cd/E25054_01/doc.1111/e24473/notification.htm
– Chapter 4. Using Notifications –> https://docs.oracle.com/cd/E24628_01/doc.121/e24473/notification.htm#EMADM9066
4.1.5 Setting Up Repeat Notifications –> https://docs.oracle.com/cd/E24628_01/doc.121/e24473/notification.htm#EMADM9072

That’s it.

 

Cet article Oracle EM Cloud Control 12c (CC12c)- Repeat alert notification est apparu en premier sur Blog dbi services.

EM 13c target is fully broken !!

$
0
0

At a client’ site I decided to install the Enterprise Manager Cloud Control 13c. I did not encountered any special problem :=) , then I installed an agent 13c on the development plattform and added targets as usual, but at this timeI discovered that half of my database targets in 11.2.0.3 version were in the following state :

2016-02-05 15:31:46,863 [2527:A154C6AD] INFO - Target: [oracle_database.TESTDBA] is fully broken: 
Dynamic Category property error (code=0x400)

The gcagent.log showed me the errors:

2016-01-28 13:41:11,423 [261843:CE28B2D8] INFO - >>> Reporting exception: 
oracle.sysman.emSDK.agent.client.exception.NoSuchTargetException: 
the oracle_database target "TESTDBA" does not exist (request id 1) <<< 
oracle.sysman.emSDK.agent.client.exception.NoSuchTargetException: 
the oracle_database target "TESTDBA" does not exist 
at oracle.sysman.gcagent.dispatch.cxl.GetMetricDataAction.satisfyRequest(GetMetricDataAction.java:175) 
at oracle.sysman.gcagent.dispatch.ProcessRequestAction._call(ProcessRequestAction.java:135) 
at oracle.sysman.gcagent.dispatch.ProcessRequestAction.call(ProcessRequestAction.java:96) 
at oracle.sysman.gcagent.dispatch.InlineDispatchCoordinator.dispatchRequest(InlineDispatchCoordinator.java:235) 
at oracle.sysman.gcagent.dispatch.DispatchRequestsAction.call(DispatchRequestsAction.java:111) 
at oracle.sysman.gcagent.dispatch.DispatchRequestsAction.call(DispatchRequestsAction.java:51) 
at oracle.sysman.gcagent.task.DiagWrappedAction.call(DiagWrappedAction.java:52) 
at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
at oracle.sysman.gcagent.task.SingleActionTask.run(SingleActionTask.java:76)

Looking at /https://agent:3872/emd/browser/main we can display the following error:

2016-01-22 11:49:34,661 ERROR - 
The target is fully broken (code=0x404) for the following reason: Invalid Input 
 2016-01-22 11:49:35,184 ERROR - The target is fully broken (code=0x406) for the following reason: 
No valid queryDescriptor or executionDescriptor found for target [oracle_database.TESTDBA$11] 
 2016-01-22 11:49:35,193 INFO - Dynamic property execution error for [DeduceAlertLogFile], 
error: Can't resolve a non-optional query descriptor property [background_dump_dest

I opened a SR and Oracle gave me an important hint by asking me to run the following query:

SQL> select v.version "DBVersion", p.value "DBDomain" from 
(select nvl((select version from (select version || '.'|| id version
from dba_registry_history where NAMESPACE = 'SERVER'
and BUNDLE_SERIES='PSU'
order by ACTION_TIME desc) where rownum = 1),
(select version from v$instance)) version from dual) v, v$parameter p
where p.name='db_domain';
and BUNDLE_SERIES='PSU'
     *
ERROR at line 3:
ORA-00904: "BUNDLE_SERIES": invalid identifier

We can notice the BUNDLE_SERIES column does not exist in the view dba_registry_history for my database target in a fully broken state.

By the way there is a bug number 9656976 :

Execution of catbundle.sql is not always required for new and upgraded databases. 
 The Readme documentation indicates when it is required. 
 However, you can execute catbundle.sql when it is not required so that the new or 
upgraded database has an updated dba_registry_history table

I tried a first solution by creating a table named dba_registry_history under the dbsnmp monitoring user in my broken database target, and the target was dicovered successfully, and was not anymore in a fully broken state.

Finally I choosed to run the catbundle.sql script on every database which were in a broken state, and the database target discovery was successfull for every database.

 

 

 

 

Cet article EM 13c target is fully broken !! est apparu en premier sur Blog dbi services.

Always-on Monitoring EM 13C

$
0
0

As the Enterprise Manager Cloud 12c is configured for sending warnings and alerts if a target database is down, what’s happening if the Enterprise Manager Repository database crashes? With Enterprise Manager Cloud Control 12c, a quite good solution is available: after an easy configuration, the management agent is able to run script to notify database administrators there is a problem with the repository. But what happens if the OMS itself is down? Enterprise Manager 13c offers a good solution wit ALWAYS-ON Monitoring.

AOM (Always-on Monitoring) allows the Enterprise Manager Administrators to keep informed of the target’s critical alerts even when the OMS is down.

I installed it on the Enterprise Manager 13c repository for testing but it would obviously be better to create a dedicated database.

Two pre-requisites are mandatory:

Optimizer_adaptive_features = FALSE:

SQL> ALTER SYSTEM SET OPTIMIZER_ADAPTIVE_FEATURES=FALSE SCOPE=BOTH SID=’*';

System altered.

Chearcter Set AL32UTF8

SQL> SELECT * from nls_database_parameters where parameter='NLS_CHARACTERSET';
PARAMETER                         VALUE
NLS_CHARACTERSET                  AL32UTF8

The emsca binaries are located in $MW_HOME/sysman/ems:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ [oms13c] ls
ems_13.1.0.0.0.zip

We uncompress the binaries:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ [oms13c] unzip ems_13.1.0.0.0.zip
Archive: ems_13.1.0.0.0.zip
   creating: ems/
   creating: ems/lib/
inflating: ems/lib/com.bea.core.apache.commons.lang_1.0.0.0_2-6.jar
inflating: ems/lib/com.oracle.http_client.http_client_12.1.3.jar
inflating: ems/lib/jackson-core-asl-1.9.2.jar
…

We copy the Emkey in the repository:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] emctl config emkey -copy_to_repos
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
The EMKey has been copied to the Management Repository. 
This operation will cause the EMKey to become unsecure.
After the required operation has been completed, secure the EMKey 
by running "emctl config emkey -remove_from_repos".

Then we run the emsca configuration script from /opt/oracle/Middleware13c/sysman/ems/ems/scripts/

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] ./emsca
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Always-On Monitoring Repository Connection String : cloud13c:1521:EMREP13C
Create Always-On Monitoring Repository User [n] : y
Always-On Monitoring Repository SYSDBA Username : sys
Always-On Monitoring Repository SYSDBA Password :
Always-On Monitoring Repository Username [ems] : aom
Always-On Monitoring Repository Password [ems] :
Enterprise Manager Repository Connection String : cloud13c:1521:EMREP13C
Enterprise Manager Repository Username : sysman
Enterprise Manager Repository Password :
Creating Always-On Monitoring repository user aom
Enter Enterprise Manager Middleware Home : /opt/oracle/Middleware13c/
Connecting to Always-On Monitoring repository.
Creating Always-On Monitoring repository schema
Creating repository storage for Targets data.
Creating repository storage for Alerts and Availability data.
Creating repository storage for Notification Metadata data.
Creating repository storage for Target Metric Metadata data.
Registering Always-On Monitoring instance
Always-On Monitoring Upload URL: https://cloud13c:8081/upload
Oracle PKI Tool : Version 12.1.3.0.0
Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
Certificate was added to keystore

We have to define downtime contacts in order AOM to be able to send notifications:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] emcli set_oms_property 
-property_name='oracle.sysman.core.events.ems.downtimeContact'
 -property_value='pierre.sicot@dbi-services.com'
Property "oracle.sysman.core.events.ems.downtimeContact" 
has been successfully set to value "pierre.sicot@dbi-services.com" on all Management Servers.
Server restart is not required for the property change to get reflected

 

You can also define downtime contact from the target property:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] emcli set_target_property_value 
-property_records="TESTDBA:oracle_database:Downtime Contact:pierre.sicot@dbi-services.com"
Properties updated successfully

 

Then we synchronize Always-on Monitoring with EM13c for the first time:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] ./emsctl sync
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
------------------------------------------------------------------
Connecting to Always-On Monitoring repository.
Starting synchronization with EM.
Synchronizing with EM repository: sysman@cloud13c:1521:EMREP13C
Synchronizing Targets data.
Synchronizing Alerts and Availability data.
Synchronizing Notification Metadata data.
Synchronizing Target Metric Metadata data.
Synchronization complete at : Fri Feb 12 11:56:32 CET 2016

 

We configure EM to work with Always-on:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] emctl set property 
-name "oracle.sysman.core.events.ems.emsURL" -value "https://cloud13c:8081/upload" -sysman_pwd manager1
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
Property oracle.sysman.core.events.ems.emsURL has been set to value
https://cloud13c:8081/upload for all Management Servers
OMS restart is not required to reflect the new property value

emsctl gives us the possibility to check the status:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] ./emsctl status
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
------------------------------------------------------------------
Always-On Monitoring Version               : 13.1.0.0.0
Always-On Monitoring Home                   : /opt/oracle/Middleware13c/sysman/ems/ems
Started At                                 : February 12, 2016 12:01:40 PM CET
Last Repository Sync                       : February 12, 2016 11:56:21 AM CET
Upload URL                                 : https://cloud13c:8081/upload
Always-On Monitoring Process ID             : 20588
Always-On Monitoring Repository             : cloud13c:1521:EMREP13C
Enterprise Manager Repository               : cloud13c:1521:EMREP13C
Notifications Enabled                       : false
Total Downtime Contacts Configured         : 1

 

We can check if the URL is present in the agent:

oracle@cloud13c:/opt/oracle/agent13c/agent_inst/sysman/config/ [agent13c] grep 8081 emd.properties
EMS_URL=https://cloud13c:8081/upload

 

It is also mandatory to enable the notifications (by default it is not …), the enable notification command will automatically run an incremental sync:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] ./emsctl enable_notification
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
------------------------------------------------------------------
Notifications have been enabled. There are downtime contacts configured.
Connecting to Always-On Monitoring repository.
Starting synchronization with EM.
Synchronizing with EM repository: sysman@cloud13c:1521:EMREP13C
Synchronizing Targets data.
Synchronizing Alerts and Availability data.
Synchronizing Notification Metadata data.
Synchronizing Target Metric Metadata data.
Synchronization complete at : Fri Feb 12 13:31:40 CET 2016

We can easily check if AOM is running:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/scripts/ [oms13c] ./emsctl ping
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
------------------------------------------------------------------
Always-On Monitoring is running.

 

The logfiles are located in $OMS_HOME/sysman/ems/ems/log:

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/log/ [oms13c] ls
emsca.err emsca.log.0 emsctl.err emsctl.log.0 ems.err ems.log.0 ems.log.0.lck ems.out

 

Finally we can test:

We shutdown the OMS

oracle@cloud13c:/opt/oracle/Middleware13c/sysman/ems/ems/log/ [oms13c] emctl stop oms -all
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
Stopping Oracle Management Server...
WebTier Successfully Stopped
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
JVMD Engine is Down
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command
Stopping BI Publisher Server...
BI Publisher Server Already Stopped
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command
AdminServer Successfully Stopped
BI Publisher Server is Down
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command

 

We stop our TESTDBA database, and we receive a mail telling us our database target is down:

aom1

Conclusion:

AOM is a nice feature allowing you to continue to receive critical alerts from your database targets when OMS is down or under maintenance.

 

 

Cet article Always-on Monitoring EM 13C est apparu en premier sur Blog dbi services.

Enterprise Manager 13c and BI Publisher

$
0
0

In Enterprise Manager 12c, if you need to display the database storage, from the report menu you have the following possibilities:

bi1

From now on, with Enterprise Manager 13c, this possibility does not exist anymore in the report menu, you have to use the BI publisher feature. If during the EM13c installation phase, you choose not to configure BI publisher, you will see the following message while trying to access the BIP page:

bi2

If you have a look at the Troubleshooting information, you will understand that as the previous 12c version, it is not necessary to setup the BI publisher, in EM 13c BI publisher is installed and automatically configured, you cannot de-install or de-configure it as it is a base framework component of Enterprise Manager.

We can check the status of BI publisher:

oracle@vmtestoraCC13c:/home/oracle/ [oms13c] emctl status oms -bip_only
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
BI Publisher Server is Down
BI Publisher is disabled, to enable BI Publisher on this host, 
use the 'emctl config oms -enable_bip' command

So  we enable BI publisher:

oracle@vmtestoraCC13c:/home/oracle/ [oms13c] emctl config oms -enable_bip
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
BI Publisher is enabled for startup on this host with the 'emctl start oms' 
 and 'emctl start oms -bip_only' commands.
Overall result of operations: SUCCESS

Then we only start the BI publisher:

oracle@vmtestoraCC13c:/home/oracle/ [oms13c] emctl start oms -bip_only
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Starting BI Publisher Server only.
Starting BI Publisher Server ...
WebTier Successfully Started
BI Publisher Server Successfully Started
BI Publisher Server is Up

And finally we have access to the BI publisher reports:

bi3

Watch out: Do not forget in Enterprise Manager, the included license for BI publisher only covers reporting against the Oracle Management Repository. If you use BI publisher against other targets, you will need to be licensed for each.

 

 

 

 

 

Cet article Enterprise Manager 13c and BI Publisher est apparu en premier sur Blog dbi services.

EM13c and Management Pack Annotations

$
0
0

Enterprise Manager 13c offers a new feature allowing displaying the management packs used by a feature.

To enable the Management Pack Annotations, you select Enable Annotations from the Setup Menu –> Management Pack:

mp1

From now on your menus are filled up with acronyms more or less comprehensive, from a performance page on a target database:

mp2

 

From now on your menus are filled up with acronyms more or less comprehensive, for example from a performance page on a target database:

mp3

You understand quickly that DD means Database Diagnostic, and DT means Database Tuning.

If you have a look at Compliance:

mp4

DBLM should mean Database Lifecycle Management ?

By the way if we look a little bit further, the acronyms begin to be difficutl to understand:

mp5

What does WLSEE, SOAM, MPWCS … mean ?

By the way,  enabling management pack annotations is a good hint to help the Oracle DBA to be conscious of the management packs thex are allowed to use or not.

If you need to disable the management pack annotations, you just have to select Enable Annotations from the Setup –> Management pack menu again.

 

 

Cet article EM13c and Management Pack Annotations est apparu en premier sur Blog dbi services.

EM13c Gold Agent Image

$
0
0

One of the most interseting new feature in Enterprise Manager 13c is the Gold Agent Image. This new feature will simplify the agent management.

The first thing to do is to create a Gold Agent image, from the setup menu , select Gold Agent Image:

ga1

Then select Manage All Images:

ga2

Select Create

ga3

Enter the image name, a description and the platform name, then submit:

Your gold image is created:

ga4

Before to subscribe an agent, we have to create a version for the gold agent image. In the Manage Images screen, we select Version and Drafts and we choose Create:

ga5

The gold agent image version is created as a draft:

ga6

You select Set Current Version, the status is now Current:

ga7

Now we can also install an agent using the gold agent image, from the Gold agent Image screen, we select Add Hosts:

ga8

You enter the hostname, the platform name and you choose to install With Gold Agent Image:

ga9

Then the classical agent installation is running fine. At the end we can display that our new agent is correctly subscribed to the gold image.

ga10

Now let’s patch the gold image agent, we apply the recently releaed agent pach 22568679 on the gold image:

Interim patches (2) :
 
Patch  22568679     : applied on Tue May 17 13:41:34 CEST 2016
Unique Patch ID:  19902660
   Created on 23 Feb 2016, 09:20:08 hrs PST8PDT
   Bugs fixed:
     22568679
 
Patch  18421945     : applied on Fri May 13 16:43:56 CEST 2016
Unique Patch ID:  18724707
  Created on 12 Aug 2015, 02:07:32 hrs PST8PDT
   Bugs fixed:
     18421945

We create a new version V2 and we can display the newly patch on this agent:

ga11

From now on, we have the gold agent image V2 on which the last agent patch has been applied. We have the possibility to update the agent on vmtestoradg2 to the last patch version. At first we unsubscribe this agent from the gold agent image V1, then we subscribe it to the gold agent image V2, then in the Subscription tab of the gold agent image, we select update to current version:

ga12

We select Next and the update process is launched:

ga13

The next screen displays the different options:

ga14

In this screen, we have a lot of possibilities, send Pre-Update or Post-Update scripts, receive mails when the update process is finished :=)

You can follow the update progress via the console or more practical via emcli:

oracle@vmtestoraCC13c:/home/oracle/psi/ [oms13c] emcli get_agent_update_status 
-op_name="GOLD_AGENT_IMAGE_UPDATE_2016_05_17_14_28_48_385"
 
Showing <AGENT_NAME, STATUS OF OPERATION, OPERATION START TIME, 
OPERATION END TIME, SEVERITY, REASON> 
for each agent in the operation GOLD_AGENT_IMAGE_UPDATE_2016_05_17_14_28_48_385
 
Total Agents                                      
Status             Started                Ended                                                 
------------        ------               -------                                          
Success       2016-05-17 12:30:23 GMT    2016-05-17 12:36:25 GMT  

Finally you agent is updated and has the same level of patch of your gold agent patch image:

oracle@vmtestoradg2:/home/oracle/ [agent13c] opatch lsinventory
Oracle Interim Patch Installer version 13.6.0.0.0
Copyright (c) 2016, Oracle Corporation.  All rights reserved.
Oracle Home       : /u00/app/oracle/agent13c/GoldImage_V2/agent_13.1.0.0.0
Central Inventory : /u00/app/oraInventory
   from           : /u00/app/oracle/agent13c/GoldImage_V2/
                    agent_13.1.0.0.0/oraInst.loc
OPatch version    : 13.6.0.0.0
OUI version       : 13.6.0.0.0
Log file location : /u00/app/oracle/agent13c/GoldImage_V2/
agent_13.1.0.0.0/cfgtoollogs/opatch/opatch2016-05-17_16-20-08PM_1.log
OPatch detects the Middleware Home as "/u00/app/oracle/agent13c/GoldImage_V2"
Lsinventory Output file location : /u00/app/oracle/agent13c/GoldImage_V2/
agent_13.1.0.0.0/cfgtoollogs/opatch/lsinv/lsinventory2016-05-17_16-20-08PM.txt
Local Machine Information::
Hostname: vmtestoradg2.it.dbi-services.com
ARU platform id: 226
ARU platform description:: Linux_AMD64
Interim patches (2) :
Patch  22568679     : applied on Tue May 17 13:41:34 CEST 2016
Unique Patch ID:  19902660
   Created on 23 Feb 2016, 09:20:08 hrs PST8PDT
   Bugs fixed:
     22568679
Patch  18421945     : applied on Fri May 13 16:43:56 CEST 2016
Unique Patch ID:  18724707
   Created on 12 Aug 2015, 02:07:32 hrs PST8PDT
Bugs fixed:
     18421945
OPatch succeeded.

Just one negative point, the agent home has changed and there are some consequences:

  • you have to de-install the old agent home, the old agent home was /u00/app/oracle/agent13c/agent_13.1.0.0 and the new one is now /u00/app/oracle/agent13c/GoldImageV2/agent_13.1.0.0.0
  • the agent home name is not free

ga15

All those operations can be realized with emcli:

emcli subscribe_agents -image_name=”gold_agent” -agents=”vmtestoradg2:3872″

or emcli update_agents -image_name=”gold_image” -agents=”vmtestoradg2:3872″

This new feature will ease the agent management on Enterprise Manager, using gold agent image will allow you to deploy or update the same agent at the most recent patch level on multiple hosts. I will recommend you to use emcli to realize all those operations.

 

 

 

 

 

 

Cet article EM13c Gold Agent Image est apparu en premier sur Blog dbi services.

EM 13c corrective actions

$
0
0

With Enterprise Manager 13c, we have the possibility to define corrective actions. Let me show you how to use it.

From the Enterprise à Monitoring select Corrective Actions :

ca1

Choose Add Space to Tablespace in the Create Library Corrective Action :

ca2

Enter the name, a description and choose Metric Alert as event:

ca3

Finally choose to Save to Library

ca4

You have to publish your corrective action as it has been created as a draft version, you select Publish.

You can edit the Add Space corrective action parameters to adapt it to your environment:

ca5

Now we create a tablespace and we affect the Corrective Action to the Metric Alert Tablespace Used. In the Oracle Database à Monitoring à Metric and Collection Settings

ca6

We edit the metric Tablespace Full, Tablespace Space Used (%):

ca7

In the Monitored Objects, we select Edit:

ca8

We select Add in the Warning Corrective Actions:

ca9

Enter a name, database and host credentials and choose the Add Space to Tablepace corrective actions.

Your corrective action is applied in the Tablespace Space Used. So if we insert a lot of data in our 5M size tablespace, the datafile must increase automatically. Let’s make the test:

ca10

Connected as a user with the default tablespace PSI, we insert some values :

SQL> create table test as select * from sys.dba_segments where rownum < 100;

Table created.

After some inserted values, the PSI tablespace is full, the corrective action has not yet run because its collection scheduled run every 30 minutes, we modify it to 5 minutes:

ca11

You also have the possibility to submit the job if you do not want to wait:

ca12

You can display how the job is running:

ca13

The job is done, the tablespace PSI has been increased automatically :=)

ca14

This corrective action allows to increase a tablespace size, but if we consider that in many Oracle production environment the data files are in auto extent mode on, this feature might not be very useful.

But we could use this corrective action to back up the database archive log when the archive log directory is filled more than the 80 % threshold.

In the Monitoring à Corrective Actions you select RMAN script and choose Go:

ca15

You enter the name , a shot description and you choose the event type Metric Alert

ca16

In the parameter tab, you enter your script to backup the archive logs:

ca17

Then for my test database in the Metric and Collection Settings, we select the metric Archive Area Used, and we add the corrective action backup archive log:

ca18

ca19

Now I modify the warning threshold for test purpose, I generate activity on the database to generate archive logs, the job is successfully launched:

ca20

This functionality is quite easy to implement and quite more practical for Oracle DBAs, specially to backup archive logs.

 

Cet article EM 13c corrective actions est apparu en premier sur Blog dbi services.


EM13c and postgres plugin

$
0
0

As an Oracle DBA I use Enterprise Manager to monitor Oracle databases at my client’s sites. I also administer more and more Postgres databases. I decided to download the Blue Medora plugin in order to monitor the postgresql databases with Enterprise Manager 13c, and to avoid to have different monitoring tools for each kinf of database.

Once you have downloaded the Blue Medora plugin for EM13c, you have to unzip it:

oracle@vmtestoraCC13c:/home/oracle/psi/ [rdbms12102] unzip bm.em.xpgs_12.1.0.2.0_2.0.3.zip
Archive:  bm.em.xpgs_12.1.0.2.0_2.0.3.zip
  inflating: bm.em.xpgs_12.1.0.2.0_2.0.3.opar
......

Then like other plugins, you have to import it in the OMS (Oracle Management Server):

oracle@vmtestoraCC13c:/home/oracle/psi/ [oms13c] emcli import_update
 -file=/home/oracle/psi/bm.em.xpgs_12.1.0.2.0_2.0.3.opar -omslocal
Processing update: Plug-in - PostgreSQL Monitoring
Successfully uploaded the update to Enterprise Manager. 
Use the Self Update Console to manage this update.

Once imported, from the Extensibility plugin page, we can display the PostgreSQL plugin:

pp1

We have to deploy the plugin to the OMS:

pp2

The next step consists now to deploy the plugin on an agent where there is an existing postgres environment, we select the adequate agent and we select Continue:

pp3

The postgresql plugin is successfully deployed to the agent:

pp4

Once the plugin is deployed, we need to add a postgres database target. I used the Add Target Declaratively and choosed Postgresql Database as Target Type:

pp5

In the next screen you enter the target name and useful informations such as hostname, login, password and port number:

pp6

Finally the postgresql database target has been added successfully:

pp7

Once the configuration phase finished, let’s have a look over how EM13c works with postgresql !

The newly postgresql database target exist in EM13c:

pp8

We have the same menus as we are used for Oracle database targets:

pp18

Now let’s try to create a monitoring template for postgresql database. From the EM13c Monitoring template menu, choose create:

pp9

Choose Target Type and select PosgreSQL database:

pp10

Enter the monitoring template name and a description:

pp11

You have the possibility to define thresholds for metrics:

pp12

Select Ok and the DBI_DB_POSTGRES is created.

Finally we apply the template to our postgres database as follows, we select the postgressql database and we select Apply:

pp13

The Home postgres EM13c page displays more informations:

pp14

The postgresql monitoring offers a lot of monitoring solutions:

pp161

 

We have the possibility to diplay the table or indices details:

pp15

Another good point is the possibility to use the reports. For example the target availability:

pp17

You can also create incident rules in the same way you did it for Oracle databases. Creating incident rules about Availability, Metric Alert or Metric Errors allows you the possibility to have incidents created and to receive alerts when something goes wrong in your posgresql database.

pp16

Once you have correctly configured your incident rules and their events, when you stop your postgres database, an incident is created and you receive a mail :=)

pp19

Deploying the Blue Medora’s plugin in order to administer your postgresql databases withe Enterprise Manager 13c will help you to administer heteregeneous databases environment. Furthermore you can use monitoring templates and incident rules.

 

 

 

 

 

 

 

 

 

 

 

 

 

Cet article EM13c and postgres plugin est apparu en premier sur Blog dbi services.

Enterprise Manager 13.1.0.0 does not display correct values for memory

$
0
0

I recently had problems with Enterprise Manager 13.1.0.0, receiving such alerts:

EM Event Critical hostname Memory Utilization is 93,205 % crossed warning (80%) or critical (90%)

When we have a look at the EM 13c console for the host:

me1

On the system the free -m command displays:

oracle@host:~/24437699/ [agent13c] free -m
             total       used       free     shared    buffers     cached
Mem:         48275      44762       3512          0        205      37483
-/+ buffers/cache:       7073      41201
Swap:         8189       2397       5791

Em 13c does not take into account the buffer / cached component.

In fact the memory calculation has changed from EM 12.1.0.5 and EM 13.1.0.0.  According to Metalink Note 2144976.1:

“While the total Memory available in the host target is displayed correctly after applying the latest PSU # 23030165 (Agent-Side 13.1.0.0.160429), the formula used for Memory Utilization is (100.0 * (realMem-freeMem) / realMem) and does not consider Buffers / Cached component for the calculation.”

To solve the problem we have to patch the OMS and the different agents:

For the oms: use the patch 23134365

For the agents : use the patch 24437699

Watch out, when you want to apply the 23134365 patch for oms, we have to install the latest version of omspatcher. We download  Patch 19999993 of Release 13.1.0.0.0 from MOS.

We backup the OMSPatcher directory in the $ORACLE_HOME oms13c environment:

oracle:OMS_HOME:/ [oms13c] mv OMSPatcher/ OMSPatcher_save

then we copy and unzip the p19999993_131000_Generic.zip from the $ORACLE_HOME directory:

oracle:$OMS_HOME/ [oms13c] unzip p19999993_131000_Generic.zip
Archive:  p19999993_131000_Generic.zip
   creating: OMSPatcher/
   creating: OMSPatcher/oms/
  inflating: OMSPatcher/oms/generateMultiOMSPatchingScripts.pl
   creating: OMSPatcher/jlib/
  inflating: OMSPatcher/jlib/oracle.omspatcher.classpath.jar
  inflating: OMSPatcher/jlib/oracle.omspatcher.classpath.unix.jar
  inflating: OMSPatcher/jlib/omspatcher.jar
  inflating: OMSPatcher/jlib/oracle.omspatcher.classpath.windows.jar
   creating: OMSPatcher/scripts/
   creating: OMSPatcher/scripts/oms/
   creating: OMSPatcher/scripts/oms/oms_child_scripts/
  inflating: OMSPatcher/scripts/oms/oms_child_scripts/omspatcher_wls.bat
  inflating: OMSPatcher/scripts/oms/oms_child_scripts/omspatcher_jvm_discovery
  inflating: OMSPatcher/scripts/oms/oms_child_scripts/omspatcher_jvm_discovery.bat
  inflating: OMSPatcher/scripts/oms/oms_child_scripts/omspatcher_wls
  inflating: OMSPatcher/scripts/oms/omspatcher
  inflating: OMSPatcher/scripts/oms/omspatcher.bat
  inflating: OMSPatcher/omspatcher
   creating: OMSPatcher/wlskeys/
  inflating: OMSPatcher/wlskeys/createkeys.cmd
  inflating: OMSPatcher/wlskeys/createkeys.sh
  inflating: OMSPatcher/omspatcher.bat
  inflating: readme.txt
  inflating: PatchSearch.xml

We check the OMSPatcher version:

oracle:/ [oms13c] ./omspatcher version
OMSPatcher Version: 13.6.0.0.1
OPlan Version: 12.1.0.2.2
OsysModel build: Wed Oct 14 06:21:23 PDT 2015
 
OMSPatcher succeeded.

We download from Metalink the p23134265_131000_Generic-zip file, and we run:

oracle@host:/home/oracle/23134365/ [oms13c] omspatcher apply -analyze
OMSPatcher Automation Tool
Copyright (c) 2015, Oracle Corporation.  All rights reserved.
OMSPatcher version : 13.6.0.0.1
OUI version        : 13.6.0.0.0
Running from       : /u00/app/oracle/product/13.1.0.0/middleware
Log file location  : /u00/app/oracle/product/13.1.0.0/middleware/
cfgtoollogs/omspatcher/opatch2016-09-26_11-06-30AM_1.log
 
OMSPatcher log file: /u00/app/oracle/product/13.1.0.0/middleware/
cfgtoollogs/omspatcher/23134365/omspatcher_2016-09-26_11-06-34AM_analyze.log
 
Please enter OMS weblogic admin server URL(t3s://hostname:7102):>
Please enter OMS weblogic admin server username(weblogic):>
Please enter OMS weblogic admin server password:>
 
Configuration Validation: Success
 
Running apply prerequisite checks for sub-patch(es) "23134365" 
and Oracle Home "/u00/app/oracle/product/13.1.0.0/middleware"...
Sub-patch(es) "23134365" are successfully analyzed for Oracle Home 
"/u00/app/oracle/product/13.1.0.0/middleware"

Complete Summary
================

OMSPatcher succeeded.

We stop the oms and we run:

oracle@hostname:/home/oracle/23134365/ [oms13c] omspatcher apply
OMSPatcher Automation Tool
Copyright (c) 2015, Oracle Corporation.  All rights reserved.
 
OMSPatcher version : 13.6.0.0.1
OUI version        : 13.6.0.0.0
Running from       : /u00/app/oracle/product/13.1.0.0/middleware
 
Please enter OMS weblogic admin server URL(t3s://hostname:7102):>
Please enter OMS weblogic admin server username(weblogic):>
Please enter OMS weblogic admin server password:>
 
Configuration Validation: Success
…

OMSPatcher succeeded.

We finally restart the OMS:

oracle@hostname:/home/oracle/ [oms13c] emctl start oms

Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up
JVMD Engine is Up
Starting BI Publisher Server ...
BI Publisher Server Already Started
BI Publisher Server is Up

 

Now we apply the patch to the agents:

After downloaded and unzipped the p24437699_131000_Generic.zip, we stop the management agent and we run:

oracle@hostname:/home/oracle/24437699/ [agent13c] opatch apply
Oracle Interim Patch Installer version 13.6.0.0.0
Copyright (c) 2016, Oracle Corporation.  All rights reserved.
 
Oracle Home       : /u00/app/oracle/product/13.1.0.0/agent/agent_13.1.0.0.0
Central Inventory : /u00/app/oraInventory
OPatch version    : 13.6.0.0.0
OUI version       : 13.6.0.0.0

OPatch detects the Middleware Home as "/u00/app/oracle/product/13.1.0.0/agent"
 
Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   24437699
 
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Backing up files...
Applying interim patch '24437699' to 
OH '/u00/app/oracle/product/13.1.0.0/agent/agent_13.1.0.0.0'
 
Patching component oracle.sysman.top.agent, 13.1.0.0.0...
Patch 24437699 successfully applied.
 
OPatch succeeded.

Finally we restart the agent with the emctl start agent command.

After the patches have been applied, the memory used displayed is correct:

me2

me3

And we do not receive critical alerts anymore :=)

 

 

Cet article Enterprise Manager 13.1.0.0 does not display correct values for memory est apparu en premier sur Blog dbi services.

UKOUG 2016 Day 2

$
0
0

uk2

Today I assisted at a first session about one of my favorite tool: Upgrade to EM 13c now. The session was presented by Phil Gric from Red Stack Tech.

At the begining he described us the most common mistakes while implementing Enterprise Manager:

- EM 13c is an enterprise application

- It is a critical part of your infrastructure

- it is designed to help you

- EM 13c is not a glorified db console

- IT manager should not see EM as a job for DBA

He described us the main pre requisites before to realize an EM 13c upgrade ( for example disable optimizer_adaptive_features). He also talked about isssues such as the upgrade will create users with the sysman password, we should ensure that the repository password policy accept such a password.

There is also an issue while upgrading agent on AIX to 13.2 version. There is a problem securing the agent due to SHA encryption (Metalink Note 1965676.1).

To complete his presentation, he described us the main new features in EM 13c: export and import of incident rules, incident compression, always on monitoring, in emcli more than 300 new verbs and a general functionnality improved, system broadcast , comparaison and drift management.

He finally explained us why for him it is important to regularly upgrade to the last EM13c version: it is easy to upgrade, and the longer you wait, the closer it is to the next upgrade :=))

The second presentation was about the 12c upgrade : the good , the bad and the ugly presented by Niall Litchfield. He talked about his experiences about upgrading to 12c a very huge infrastructure composed of more than 100 servers, with database version from 10.1 to 11.2.0.3, with RAC or single instances.

His first advice was to read the Mike Dietrich documentation (Update, Migrate , Consolidate to 12c), and to have a look at the Oracle recommanded patch list.

A good reason to upgrade is because the support for 11g ends at teh end of the year, and the extended support is expensive.

The good news after this huge upgrade was that there has been no upgrade failures (tens of clusters, hundreds of servers and databases), a performance benchmark showed a 50 % improvement.

The bad and ugly news concern the number of patches. It also concern the JSON bundle patches which require database bundle patches. He also adviced us to turn off the optimizer_adaptive_features (recommanded also to be disabled with EM13c, PeopleSoft and EBS). Finally a last ugly point is the documentation, there is no one place to read the documenation but many. He also recommended to allow significant time for testing the database and the applications after the upgrade to 12c.

Then I assisted at a session talking about Oracle database 12c on Windows animated by Christian Shay of Oracle.

He showed us the database certification on 64-bit Windows. In a short resume Oracle 12..2 is certified on Windows server 2012, Windows Server 2012 R2, Windows 10 and Windows Server 2016, as Oracle 12.1 is certified on the same servers except Windows Server 2016.

In Windows 8 and Windows Server 2012, Microsoft has introduced the Group Managed service Account (GMSA), i.e. a domain level account which can be used by multiple servers in that domain to run their services under this account. A GMSA can be the Oracle Home user for Oracle Database Real Application Clusters (Oracle RAC), single instance, and client installations. It has similarities with the ‘oracle’ user on Linux, as you are able to connect on windows with this user and perform administrative tasks  like create database, install Oracle or upgrade databases.

In Windows 7 and Windows Server 2008 R2, Microsoft introduced virtual accounts. A virtual account can be the Oracle home user for Oracle Database single instance and client installations.

The recommandations are the following: for DB server (single instance) use virtual account to avoid password management (12.2), for 12.1 specify a Windows user account during installation. For RAC DB and Grid infrastructure, use a domain user or group managed service account, for a GMSA you do not need to provide the password for any database operation.

He also talked about large page support for windows. When large page support is enabled, the CU are able to access the Oracle database buffers im RAM more quickly. It will address the buffers in 2 MB page size instead of 4 KB increments.

Large pages can be used in two modes : Regular or Mixed mode. The regular one means all the SGA is attempted to be allocated in large pages. By the way if the amount of large pages is not available the database will not come up. Thats the reason using the mixed mode is perhaps better, if all the SGA cannot be allocated in large pages, the rest of the pages will be allocated with regular pages and the instance will come up.

I finished my UKOUG day by assisting at Franck Pachot’s session talking about 12c Mutltitenant (not a revolution but an evolution). He clearly explained us that we did not have to fear about 12c mutlitenant, from the begining of Oracle there has been a lot of new features a lot people feared, but now they are impelemented and work correctly. By the way the patch upgrade optimization is partially implemented, we will see how 12c multitenant will evolve in the next years.

 

 

 

 

 

Cet article UKOUG 2016 Day 2 est apparu en premier sur Blog dbi services.

Upgrade to Enterprise Manager 13.2

$
0
0

I will describe how to upgrade Enterprise Manager 13.1.0.0 to the new 13.2.0.0 version.

At the beginning we have to ensure that we applied the latest PSU on the repository database.

It is mandatory to apply the following patch before upgrading to Enterprise Manager Cloud Control 13.2.0.0:

DATABASE PATCH SET UPDATE 12.1.0.2.160419

To install the patch you have to check the following point:

- you have to use Oracle Interim Patch Installer version 12.2.0.1.8

Once you have downloaded the patch and unzipped it, you can check for potential conflicts:

oracle@vmCC13c:/u01/app/oracle/ [EMREP13C] opatch prereq 
CheckConflictAgainstOHWithDetail 
-phBaseDir /oracle/u01/app/oracle/software/22899531/22806133
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2016, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed. 
OPatch succeeded.

 

oracle@vmCC13c:/u01/app/oracle/ [EMREP13C] opatch prereq 
CheckConflictAgainstOHWithDetail -phBaseDir 
/oracle/u01/app/oracle/software/22899531/23006522
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2016, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.

And finally, you check for the system space available:

oracle@vmCC13c:/u01/app/oracle/ [EMREP13C] $ORACLE_HOME/OPatch/opatch prereq 
CheckSystemSpace -phBaseFile /oracle/u01/app/oracle/software/patch_list_dbhome.txt
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2016, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Invoking prereq "checksystemspace"
Prereq "checkSystemSpace" passed.
OPatch succeeded.

Then once the pre requisites are ok, you stop the repository database, and you run the classical opatch apply command from the directory where you have unzipped the PSU.

You finally check the Oracle inventory:

oracle@vmtestoraCC13c:/home/oracle/ [EMREP13C] opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2016, Oracle Corporation.  All rights reserved.
Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
--------------------------------------------------------------------------------
Local Machine Information:
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 12c                                      12.1.0.2.0
There are 1 products installed in this Oracle Home. 
Interim patches (1) : 
Patch  22806133     : applied on Tue Nov 22 11:19:55 CET 2016
Unique Patch ID:  19983161
Patch description:  "DATABASE BUNDLE PATCH: 12.1.0.2.160419 (22806133)"

Secondly you have to disable the optimizer_adaptive_features parameter in the repository database:

SQL> alter system set optimizer_adaptive_features=false scope=both;

System altered.

Then we have to ensure that the tables in the Management Repository do not have any snapshots created:

SQL> select master , log_table from all_mview_logs where log_owner='SYSMAN';
no rows selected

Then we have to ensure that the tables in the Management Repository do not have any snapshots created:

SQL> select master , log_table from all_mview_logs where log_owner='SYSMAN';
no rows selected

We verify if any login triggers are set:

SQL> SELECT COUNT (trigger_name) FROM sys.dba_triggers 
WHERE TRIGGERING_EVENT LIKE 'LOGON%' AND status='ENABLED';
SQL> SELECT trigger_name FROM sys.dba_triggers 
WHERE TRIGGERING_EVENT LIKE 'LOGON%' AND status='ENABLED';

We verify if any logoff triggers are set:

SQL> SELECT COUNT (trigger_name) FROM sys.dba_triggers
WHERE TRIGGERING_EVENT LIKE 'LOGOFF%' AND status='ENABLED';
SQL> SELECT trigger_name FROM sys.dba_triggers
WHERE TRIGGERING_EVENT LIKE 'LOGOFF%' AND status='ENABLED';

If we find a trigger enabled, we disable it:

SQL> SELECT trigger_name, owner from sys.dba_triggers 
WHERE TRIGGERING_EVENT LIKE 'LOGOFF%' AND status='ENABLED';
 
TRIGGER_NAME         OWNER
GSMLOGOFF            GSMADMIN_INTERNAL
 
SQL> alter trigger gsmadmin_internal.gsmlogoff disable;

Then you have to copy the EMKEY to the repository database:

oracle@vmCC13c:/u03/app/oracle/oms13c/bin/ [oms13c] emctl config emkey 
-copy_to_repos -sysman_pwd dbi05manager
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
The EMKey has been copied to the Management Repository. 
This operation will cause the EMKey to become unsecure.
After the required operation has been completed, 
secure the EMKey by running "emctl config emkey -remove_from_repos".

Concerning the OMS shutdown we follow the following procedure:

We stop the JVMD and ADP engines explicitly:

oracle@vmCC13c:/u03/app/oracle/oms13c/bin/ [oms13c] emctl extended oms jvmd stop -all
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
No verb found to be registered with emctl extensibles framework
 
oracle@vmCC13c:/u03/app/oracle/oms13c/bin/ [oms13c] emctl extended oms adp stop -all
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
No verb found to be registered with emctl extensibles framework

Then we shut down completely the OMS:

oracle@v333:/home/oracle/ [oms13c] emctl stop oms -all
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Stopping Oracle Management Server...
WebTier Successfully Stopped
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
JVMD Engine is Down
Stopping BI Publisher Server...
BI Publisher Server Successfully Stopped
AdminServer Successfully Stopped
BI Publisher Server is Down

It is mandatory to stop the management agent in order to avoid errors during the migration phase:

oracle@vmtestoraCC13c:/home/oracle/ [agent13c] emctl stop agent
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Stopping agent ... stopped.

WATCH OUT: before running the installer unset PERLLIB and PERL5LIB variables (if for example you have environment variables defined for your oracle user) otherwise you will get the following error:

/opt/oracle/Middleware13c/perl/lib/5.10.0/x86_64-linux-thread-multi/auto/Cwd/Cwd.so: 
undefined symbol: Perl_Gthr_key_ptr
ERROR: Unable to continue with the installation 
because some one-off patches could not be applied successfully.

Then once the oms and the management agent are stopped you can run:

oracle@v333:/opt/software/ [oms13c] ./em13200_linux64.bin
Checking monitor: must be configured to display at least 256 colors.   
Actual 16777216    Passed
Checking swap space: must be greater than 512 MB.   Actual 7999 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    
Passed (64-bit not required)
Preparing to launch the Oracle Universal Installer 
from /tmp/OraInstall2016-11-18_10-07-45AM
====Prereq Config Location main===
/tmp/OraInstall2016-11-18_10-07-45AM/stage/prereq
EMGCInstaller args -scratchPath
EMGCInstaller args /tmp/OraInstall2016-11-18_10-07-45AM
EMGCInstaller args -sourceType
EMGCInstaller args network
EMGCInstaller args -timestamp
EMGCInstaller args 2016-11-18_10-07-45AM
EMGCInstaller args -paramFile
EMGCInstaller args /tmp/sfx_f8wrWz/Disk1/install/linux64/oraparam.ini
EMGCInstaller args -nocleanUpOnExit
DiskLoc inside SourceLoc/opt/software
EMFileLoc:/tmp/OraInstall2016-11-18_10-07-45AM/oui/em/
ScratchPathValue :/tmp/OraInstall2016-11-18_10-07-45AM

The first installer screen appears:

em1

I choosed not to receive Security alerts then I Select Next:

em2

I select Next, I skip the software Updates

em3

We check the prerequisites are ok

em4

We choose to upgrade an existing Enterprise Manager system, we enter the old Middleware home, and we select Next

em5

We enter the new Middleware home, and we select Next

em6

We enter the repository connection details, the sys and sysman passords, we confirm we have a correct repository backupm we disable the DDMP jobs and we select Next

em7

We select Yes to fix the issues

em8

We review the plugins and we select Next

em9

We have the possibility to add plugins we want to deploy while upgrading to EM 13.2

em10

We enter the weblogic username and password and we select Next

em11

I choosed not to configure a shared location for Oracle BI publisher

em12

We choose the default ports and we select Next

em13

We select Upgrade:

em14

The upgrade is running fine:=)

At the end of the upgrade, you have to run connected as root from the new OMS home the shell root.sh:

root@vmCC13c oms13cr2]# . root.sh
/etc exist
/u03/app/oracle/oms13cr2

Finally you have successfully upgraded to EM 13.2:

em15

Once the OMs is upgraded, you have to upgrade the management agents with the classical procedure. From the EM console you select upgrade agent as follows:

em16

em17

You add the management agent, and you select Submit

em18

You can follow the upgrade phase, finally you have to run the root.sh script on the management agent and cleanup the old agent environment with the EM console as follows:

You select the Post Agent Upgrade Tasks, you select the agent previously migrated:

em19

And you select Submit

The old agent home will be removed; you will just have to adapt your /etc/oratab file to give the new ORACLE_HOME for your agent 13.2

The last phase consists in deleting the old OMS home. As we were in 13.1 version, we only have to check nothing is running with the old environment, then delete the old home.

oracle@vmCC13c:/u03/app/oracle/oms13cr2/ [oms13c] ps -ef | grep oms | grep -v 13cr2
oracle   28463 27736  0 15:52 pts/5    00:00:00 grep --color=auto oms
 
oracle@vmCC13c:/u03/app/oracle/ [oms13c] ls
agent13c  CC13c_setupinfo.txt  gc_inst  gc_inst1  oms13c  oms13cr2  swlib
oracle@vmCC13c:/u03/app/oracle/ [oms13c] rm -rf oms13c

The new features are listed in the following URL and mainly concern the virtualization, the Middleware and Cloud Management, and some new features about incident management (always on monitoring installed on a different host for example).

http://docs.oracle.com/cd/E73210_01/EMCON/GUID-503991BC-D1CD-46EC-8373-8423B2D43437.htm#EMCON-GUID-503991BC-D1CD-46EC-8373-8423B2D43437

Finally the upgrade phase to EM 13.2 is finished in a couple of hours and did not present any errors.

 

 

 

 

 

 

 

 

Cet article Upgrade to Enterprise Manager 13.2 est apparu en premier sur Blog dbi services.

Upgrade EM 13.2 to EM 13.3

$
0
0

As the last Enterprise Manager Cloud Control 13.3 is out since a few days, I decided to test the upgrade procedure from the Enterprise Manager Cloud Control 13.2

You have to follow some pre-requisites:

First you copy the emkey :

oracle@localhost:/home/oracle/ [oms13c] emctl config emkey 
-copy_to_repos_from_file -repos_conndesc '"(DESCRIPTION=(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=em13c)(PORT=1521)))(CONNECT_DATA=
(SERVICE_NAME=EMREP13C)))"' -repos_user sysman -repos_pwd manager1 
-emkey_file /home/oracle/oms13c/sysman/config/emkey.ora
Oracle Enterprise Manager Cloud Control 13c Release 2  
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
Enter Admin User's Password : 
The EMKey has been copied to the Management Repository. 
This operation will cause the EMKey to become unsecure.
After the required operation has been completed, secure the EMKey by running 
"emctl config emkey -remove_from_repos".

Check that the parameter in the repository database “_allow_insert_with_update_check” is TRUE:

SQL> show parameter _allow

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
_allow_insert_with_update_check      boolean	 TRUE

Just before running the upgrade procedure, you have to stop the OMS with the command emctl stop oms -all , and to stop the agent with the classical command emctl stop agent.

I will also recommend to run a full rman backup of the repository database.

Then once you have unzipped the binaries you have downloaded, you simply run the command:

oracle@localhost:/home/oracle/software/ [oms13c] ./em13300_linux64.bin 
0%...........................................................................100%
Launcher log file is /tmp/OraInstall2018-08-13_10-45-07AM/
launcher2018-08-13_10-45-07AM.log.
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 2591.940 MHz    Passed
Checking monitor: must be configured to display at least 256 colors.   
Actual 16777216    Passed
Checking swap space: must be greater than 512 MB.   Actual 5567 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed 
Preparing to launch the Oracle Universal Installer from 
/tmp/OraInstall2018-08-13_10-45-07AM
====Prereq Config Location main=== 
/tmp/OraInstall2018-08-13_10-45-07AM/stage/prereq
EMGCInstaller args -scratchPath
EMGCInstaller args /tmp/OraInstall2018-08-13_10-45-07AM
EMGCInstaller args -sourceType
EMGCInstaller args network
EMGCInstaller args -timestamp
EMGCInstaller args 2018-08-13_10-45-07AM
EMGCInstaller args -paramFile
EMGCInstaller args /tmp/sfx_WIQ10z/Disk1/install/linux64/oraparam.ini
EMGCInstaller args -nocleanUpOnExit
DiskLoc inside SourceLoc/home/oracle/software
EMFileLoc:/tmp/OraInstall2018-08-13_10-45-07AM/oui/em/
ScratchPathValue :/tmp/OraInstall2018-08-13_10-45-07AM

Picture1

 

Picture2

I skipped the Updates

Picture3png

The check are successfull

Picture4

We upgrade an existing Enterprise Manager System, we enter the existing Middleware home.

Picture5

We enter the new Middleware home.

Picture6

We enter the sys and sysman passwords.

Picture7

We can select additional plug-ins

Picture8

We enter the Weblogic password

Picture9

We do not share location for Oracle BI Publisher, but we enable BI Publisher

Picture11

We choose the default configuration ports.

Picture12

Picture13

At this time you can drink some coffees because the upgrade procedure takes a long time …

Picture14

Just before the end of the upgrade process, you have to run the allroot.sh script:

[root@localhost oms133]# ./allroot.sh

Starting to execute allroot.sh ......... 

Starting to execute /u00/app/oracle/oms133/root.sh ......
/etc exist
/u00/app/oracle/oms133
Finished execution of  /u00/app/oracle/oms133/root.sh ......

Picture15

The upgrade is successful :=)

Picture16

But the upgrade is not yet finished, you have to restart and upgrade the management agent and delete the old OMS installation

In order to upgrade the agent, you select the Upgrade agent from the tool menu:

Picture17

But I had a problem with my agent in 13.2 version. The agent was in a non-upgradable state, and Oracle recommended to run emctl control agent runCollection <target>:oracle_home oracle_home_config but the command did not work and saying : EMD runCollection error:no target collection

So I decided to delete the agent and to install manually a new agent following the classical GUI method.

The agent in version 13.3 in now up and running:

Picture18

As in the previous Enterprise Manager versions, the deinstallation is very easy. You only have to check if any old processes are running:

oracle@localhost:/home/oracle/oms13c/oui/bin/ [oms13c] ps -ef | grep /home/oracle/oms13c
oracle    9565 15114  0 11:51 pts/0    00:00:00 grep --color=auto /home/oracle/oms13c

Then we simply delete the old OMS HOME:

oracle@localhost:/home/oracle/ [oms13c] rm -rf oms13c

There are not so many features in Enterprise Manager 13.3. they concern the framework and infrastructure, the Middleware Management,  the Cloud management and the Database management. You can have a look at those new features:

https://docs.oracle.com/cd/cloud-control-13.3/EMCON/GUID-503991BC-D1CD-46EC-8373-8423B2D43437.htm#EMCON-GUID-503991BC-D1CD-46EC-8373-8423B2D43437

Even if the upgrade procedure lasted a long time, I did not encounter any blocking errors. The upgrade procedure is quite the same as before.

Furthermore with Enterprise Manager 13.3, we have support for monitoring and management for Oracle databases version 18c:

Picture19

Cet article Upgrade EM 13.2 to EM 13.3 est apparu en premier sur Blog dbi services.

Viewing all 55 articles
Browse latest View live