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

OEM 13c Repository view gc$metric_values_daily

$
0
0

Oracle OEM 13c offers the possibility to generate reports about Oracle Database Tablespace Monthly Space Usage. The displayed information is quite useful and display a lot of information:

Screen Shot 2018-11-23 at 12.09.37

 

Screen Shot 2018-11-23 at 12.15.16

 

The report displays the details for each month and for each tablespace, but the GUI is sometimes painful: you have a nice report but many tablespaces and many numbers :=(

At a client’s site, I had the following behavior: a production database had its data files distributed across three file system /u01 /u01 and /u03. And I wanted to know the evolution of the data files available size for each disk.

My first idea was to write sql requests querying the tablespace history view dba_hist_tbspc_space_usage, but this view does not contain any information about the file system, and as a consequence it is not possible to know how much space will be needed by each file system in the future.

OEM 13c offers the capability of viewing graphs for most of the metrics within OEM, but forecasting and trending capabilities are not present, and most of the category of metrics are set up for real time alerting, not for historical trending.

And I did not find any views like dba_hist_datafiles_space_usage :=)

So I checked in EM13c to verify that the file system space usage is correctly monitored. Naturally each file system is monitored and triggers a warning when the available space is below 20%, or a critical alert when it is below 5%.

As a consequence I had the idea to query the OEM 13c repository views, and this was the good solution.

At first we can query the mgmt.$alert_current to display the alerts generated on the metric_name Filesystems over target of type host:

SQL> select target_name , target_type, metric_name, metric_column, column_label,alert_state, violation_level
  2  FROM MGMT$ALERT_CURRENT
  3  where metric_name ='Filesystems'
  4  and target_guid in (SELECT target_guid
  5  FROM mgmt$target
  6* WHERE target_type ='host');

em13c.localdomain
host
Filesystems
pctAvailable
Filesystem Space Available (%)
Warning 			20

There is a lot of management repository views providing access to target, metrics and monitoring information stored in the Management Repository. Those views offer the possibility to create your own scripts to query historical data from those views.

In my case I used the gc$metric_values_daily view corresponding to the data in the EM_METRIC_VALUES_DAILY table:

SQL> desc gc$metric_values_daily
 Name					   Null?    Type
 ----------------------------------------- -------- ----------------------------
 ENTITY_TYPE				   NOT NULL VARCHAR2(64)
 ENTITY_NAME				   NOT NULL VARCHAR2(256)
 ENTITY_GUID				   NOT NULL RAW(16)
 PARENT_ME_TYPE 				    VARCHAR2(64)
 PARENT_ME_NAME 				    VARCHAR2(256)
 PARENT_ME_GUID 			   NOT NULL RAW(16)
 TYPE_META_VER				   NOT NULL VARCHAR2(8)
 METRIC_GROUP_NAME			   NOT NULL VARCHAR2(64)
 METRIC_COLUMN_NAME			   NOT NULL VARCHAR2(64)
 COLUMN_TYPE				   NOT NULL NUMBER(1)
 COLUMN_INDEX				   NOT NULL NUMBER(3)
 DATA_COLUMN_TYPE			   NOT NULL NUMBER(2)
 METRIC_GROUP_ID			   NOT NULL NUMBER(38)
 METRIC_GROUP_LABEL				    VARCHAR2(64)
 METRIC_GROUP_LABEL_NLSID			    VARCHAR2(64)
 METRIC_COLUMN_ID			   NOT NULL NUMBER(38)
 METRIC_COLUMN_LABEL				    VARCHAR2(64)
 METRIC_COLUMN_LABEL_NLSID			    VARCHAR2(64)
 DESCRIPTION					    VARCHAR2(1024)
 SHORT_NAME					    VARCHAR2(40)
 UNIT						    VARCHAR2(64)
 IS_FOR_SUMMARY 				    NUMBER
 IS_STATEFUL					    NUMBER
 NON_THRESHOLDED_ALERTS 			    NUMBER
 METRIC_KEY_ID				   NOT NULL NUMBER(38)
 KEY_PART_1				   NOT NULL VARCHAR2(256)
 KEY_PART_2				   NOT NULL VARCHAR2(256)
 KEY_PART_3				   NOT NULL VARCHAR2(256)
 KEY_PART_4				   NOT NULL VARCHAR2(256)
 KEY_PART_5				   NOT NULL VARCHAR2(256)
 KEY_PART_6				   NOT NULL VARCHAR2(256)
 KEY_PART_7				   NOT NULL VARCHAR2(256)
 COLLECTION_TIME			   NOT NULL DATE
 COLLECTION_TIME_UTC				    DATE
 COUNT_OF_COLLECTIONS			   NOT NULL NUMBER(38)
 AVG_VALUE					    NUMBER
 MIN_VALUE					    NUMBER
 MAX_VALUE					    NUMBER
 STDDEV_VALUE					    NUMBER

The main column signification:

ENTITY_TYPE The type of the target. Host, oracle_database
ENTITY_NAME The target or component name for example the hostname
METRIC_GROUP_NAME Name of the metric group for example filesystems
METRIC_COLUMN_NAME Name of the metric column for example available, pct
KEY_PART_1 Key part 1 of composite key for example name of the file system
KEY_PART_2 Key part 2 of composite key
COLLECTION_TIME Collection time in target time zone
AVG_VALUE Average value of metric for the day
MIN_VALUE Minimum value of metric for the day
MAX_VALUE Maximum value of metric for the day

So in my case I only have to execute the following SQL request:

select entity_name, 
key_part_1,
collection_time, 
avg_value as avg, 
avg_value/1000000 as percent  from gc$metric_values_daily
where metric_group_name='Filesystems' 
and metric_column_name= 'available' 
and key_part_1='/u01' 
and entity_name ='oraprod.com'
order by 1,2
/

oraprod.com     /u01          04-OCT-16  169545.44  	.380928435
oraprod.com     /u01          05-OCT-16  169572.44	    .380928435
oraprod.com     /u01          06-OCT-16  169583.44	    .380928435
…
oraprod.com     /u01           17-NOV-18  169538.44 	.172295163
oraprod.com     /u01           18-NOV-18  169538.44 	.172295163
oraprod.com     /u01           19-NOV-18  169525.94 	.172282459
oraprod.com     /u01           20-NOV-18  169498.44 	.172254512

With this result I can easily know how much space is consumed by each file system during the time. We can use Excel’s capabilities to determine the trend of the file system available size.

Conclusion:

We often forget that OEM is not only a graphical administration tool, the main interesting part of OEM is that OEM stores date at regular intervals for important metrics into the management repository. If you understand the management repository views structure, you will have extraordinary possibilities to extract historical data, build graphs in order to analyze more precisely your infrastructure.

Cet article OEM 13c Repository view gc$metric_values_daily est apparu en premier sur Blog dbi services.


Discover target database 18c with EM12c

$
0
0

Working on Enterprise Manager 12.1.0.4 version at a client’s site, we would like to know if oracle database target in 18c version could be discovered and monitored, even if Enterprise Manager 12.1.0.4 does not support Oracle 18c database targets.

Installing the agent 12c on the target host did not cause any problem, the oracle database 18c discovery ran successfully, but the database was seen as down in the Enterprise Manager 12.1.0.4 console.

We tried several tricks without any positive results, but running the following command shows us that this was a connection problem:


oracle@em12c:/home/oracle/:> emctl getmetric agent DB18,oracle_database,Response
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.
All rights reserved.
Status,State,oraerr,Archiver,DatabaseStatus,ActiveState0,UNKNOWN,
Failed to connect: java.sql.SQLException: 
ORA-28040: No matching authentication protocol,UNKNOWN,UNKNOWN,UNKNOWN

With Oracle 18c, the default value for SQLNET.ALLOWED_LOGON_VERSION parameter is 12, it means that database clients using pre-12c jdbc thin drivers cannot authenticate to 18c database servers.

The workaround is to add in the database server sqlnet.ora the following lines:

SQLNET.ALLOWED_LOGON_VERSION_SERVER=11
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=11

We restart the database and the agent, and the Oracle database 18c is displayed up and running in Enterprise Manager 12.1.0.4:

Some more tests showed us that everything is working fine: incident management, performance, top activity ..aso

Nevertheless do not forget that oracle database target version 18c are not supported with Enterprise Manager 12.1.0.4. I will recommand to use the last Enterprise Manager 13.3 last version in order to administer and monitor Oracle database 18c.

Cet article Discover target database 18c with EM12c est apparu en premier sur Blog dbi services.

ORA-01000 and agent13c

$
0
0

Recently I received errors messages from OEM13c saying too many cursors were opened in a database:

instance_throughput:ORA-01000: maximum open cursors exceeded

My database had currently this open_cursors value:

SQL> show parameter open_cursors

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_cursors                         integer     300

I decided to increase its value to 800:

SQL> alter system set open_cursors=800;

System altered.

But a few minutes later I received again the same message. I decided to have a more precise look to discover what’s was happening.

SQL> SELECT  max(a.value) as highest_open_cur, p.value as max_open_cur FROM v$sesstat a, v$statname b, v$parameter p WHERE  a.statistic# = b.statistic#  and b.name = 'opened cursors current' and p.name= 'open_cursors' group by p.value;

HIGHEST_OPEN_CUR     MAX_OPEN_CUR
   300                 800

So I need to  find out which session is causing the error:

SQL> select a.value, s.username, s.sid, s.serial# from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic#  and s.sid=a.sid and b.name = 'opened cursors current' and s.username is not null;

     VALUE USERNAME                              SID    SERIAL#
---------- ------------------------------ ---------- ----------
         9 SYS                                     6      36943
         1 SYS                                   108      31137
         1 SYS                                   312      15397
       300 SYS                                   417      31049
        11 SYS                                   519      18527
         7 SYS                                   619      48609
         1 SYS                                   721      51139
         0 PUBLIC                                922         37
        17 SYS                                  1024          1
        14 SYS                                  1027      25319
         1 SYS                                  1129      40925

A sys connection is using 300 cursors :=(( let’s see what it is:

Great the agent 13c is causing the problem :=((

I already encountered this kind of problem on another client’s site. In fact the agent 13c is using metrics to determine the High Availability Disk or Media Backup every 15 minutes and is using a lot of cursors. The best way is to disable those metrics to avoid ORA-01000 errors:

After reloading the agent and reevaluating the alert, the incident disappeared successfully :=)

Cet article ORA-01000 and agent13c 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.

 

 

 

 

 

L’article EM13c Gold Agent Image est apparu en premier sur dbi Blog.

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.

L’article EM 13c corrective actions est apparu en premier sur dbi Blog.

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.

 

 

 

 

 

 

 

 

 

 

 

 

L’article EM13c and postgres plugin est apparu en premier sur dbi Blog.

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 :=)

 

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

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.

 

 

 

 

L’article UKOUG 2016 Day 2 est apparu en premier sur dbi Blog.


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.

 

 

 

 

 

 

 

L’article Upgrade to Enterprise Manager 13.2 est apparu en premier sur dbi Blog.

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

L’article Upgrade EM 13.2 to EM 13.3 est apparu en premier sur dbi Blog.

OEM 13c Repository view gc$metric_values_daily

$
0
0

Oracle OEM 13c offers the possibility to generate reports about Oracle Database Tablespace Monthly Space Usage. The displayed information is quite useful and display a lot of information:

Screen Shot 2018-11-23 at 12.09.37

 

Screen Shot 2018-11-23 at 12.15.16

 

The report displays the details for each month and for each tablespace, but the GUI is sometimes painful: you have a nice report but many tablespaces and many numbers :=(

At a client’s site, I had the following behavior: a production database had its data files distributed across three file system /u01 /u01 and /u03. And I wanted to know the evolution of the data files available size for each disk.

My first idea was to write sql requests querying the tablespace history view dba_hist_tbspc_space_usage, but this view does not contain any information about the file system, and as a consequence it is not possible to know how much space will be needed by each file system in the future.

OEM 13c offers the capability of viewing graphs for most of the metrics within OEM, but forecasting and trending capabilities are not present, and most of the category of metrics are set up for real time alerting, not for historical trending.

And I did not find any views like dba_hist_datafiles_space_usage :=)

So I checked in EM13c to verify that the file system space usage is correctly monitored. Naturally each file system is monitored and triggers a warning when the available space is below 20%, or a critical alert when it is below 5%.

As a consequence I had the idea to query the OEM 13c repository views, and this was the good solution.

At first we can query the mgmt.$alert_current to display the alerts generated on the metric_name Filesystems over target of type host:

SQL> select target_name , target_type, metric_name, metric_column, column_label,alert_state, violation_level
  2  FROM MGMT$ALERT_CURRENT
  3  where metric_name ='Filesystems'
  4  and target_guid in (SELECT target_guid
  5  FROM mgmt$target
  6* WHERE target_type ='host');

em13c.localdomain
host
Filesystems
pctAvailable
Filesystem Space Available (%)
Warning 			20

There is a lot of management repository views providing access to target, metrics and monitoring information stored in the Management Repository. Those views offer the possibility to create your own scripts to query historical data from those views.

In my case I used the gc$metric_values_daily view corresponding to the data in the EM_METRIC_VALUES_DAILY table:

SQL> desc gc$metric_values_daily
 Name					   Null?    Type
 ----------------------------------------- -------- ----------------------------
 ENTITY_TYPE				   NOT NULL VARCHAR2(64)
 ENTITY_NAME				   NOT NULL VARCHAR2(256)
 ENTITY_GUID				   NOT NULL RAW(16)
 PARENT_ME_TYPE 				    VARCHAR2(64)
 PARENT_ME_NAME 				    VARCHAR2(256)
 PARENT_ME_GUID 			   NOT NULL RAW(16)
 TYPE_META_VER				   NOT NULL VARCHAR2(8)
 METRIC_GROUP_NAME			   NOT NULL VARCHAR2(64)
 METRIC_COLUMN_NAME			   NOT NULL VARCHAR2(64)
 COLUMN_TYPE				   NOT NULL NUMBER(1)
 COLUMN_INDEX				   NOT NULL NUMBER(3)
 DATA_COLUMN_TYPE			   NOT NULL NUMBER(2)
 METRIC_GROUP_ID			   NOT NULL NUMBER(38)
 METRIC_GROUP_LABEL				    VARCHAR2(64)
 METRIC_GROUP_LABEL_NLSID			    VARCHAR2(64)
 METRIC_COLUMN_ID			   NOT NULL NUMBER(38)
 METRIC_COLUMN_LABEL				    VARCHAR2(64)
 METRIC_COLUMN_LABEL_NLSID			    VARCHAR2(64)
 DESCRIPTION					    VARCHAR2(1024)
 SHORT_NAME					    VARCHAR2(40)
 UNIT						    VARCHAR2(64)
 IS_FOR_SUMMARY 				    NUMBER
 IS_STATEFUL					    NUMBER
 NON_THRESHOLDED_ALERTS 			    NUMBER
 METRIC_KEY_ID				   NOT NULL NUMBER(38)
 KEY_PART_1				   NOT NULL VARCHAR2(256)
 KEY_PART_2				   NOT NULL VARCHAR2(256)
 KEY_PART_3				   NOT NULL VARCHAR2(256)
 KEY_PART_4				   NOT NULL VARCHAR2(256)
 KEY_PART_5				   NOT NULL VARCHAR2(256)
 KEY_PART_6				   NOT NULL VARCHAR2(256)
 KEY_PART_7				   NOT NULL VARCHAR2(256)
 COLLECTION_TIME			   NOT NULL DATE
 COLLECTION_TIME_UTC				    DATE
 COUNT_OF_COLLECTIONS			   NOT NULL NUMBER(38)
 AVG_VALUE					    NUMBER
 MIN_VALUE					    NUMBER
 MAX_VALUE					    NUMBER
 STDDEV_VALUE					    NUMBER

The main column signification:

ENTITY_TYPE The type of the target. Host, oracle_database
ENTITY_NAME The target or component name for example the hostname
METRIC_GROUP_NAME Name of the metric group for example filesystems
METRIC_COLUMN_NAME Name of the metric column for example available, pct
KEY_PART_1 Key part 1 of composite key for example name of the file system
KEY_PART_2 Key part 2 of composite key
COLLECTION_TIME Collection time in target time zone
AVG_VALUE Average value of metric for the day
MIN_VALUE Minimum value of metric for the day
MAX_VALUE Maximum value of metric for the day

So in my case I only have to execute the following SQL request:

select entity_name, 
key_part_1,
collection_time, 
avg_value as avg, 
avg_value/1000000 as percent  from gc$metric_values_daily
where metric_group_name='Filesystems' 
and metric_column_name= 'available' 
and key_part_1='/u01' 
and entity_name ='oraprod.com'
order by 1,2
/

oraprod.com     /u01          04-OCT-16  169545.44  	.380928435
oraprod.com     /u01          05-OCT-16  169572.44	    .380928435
oraprod.com     /u01          06-OCT-16  169583.44	    .380928435
…
oraprod.com     /u01           17-NOV-18  169538.44 	.172295163
oraprod.com     /u01           18-NOV-18  169538.44 	.172295163
oraprod.com     /u01           19-NOV-18  169525.94 	.172282459
oraprod.com     /u01           20-NOV-18  169498.44 	.172254512

With this result I can easily know how much space is consumed by each file system during the time. We can use Excel’s capabilities to determine the trend of the file system available size.

Conclusion:

We often forget that OEM is not only a graphical administration tool, the main interesting part of OEM is that OEM stores date at regular intervals for important metrics into the management repository. If you understand the management repository views structure, you will have extraordinary possibilities to extract historical data, build graphs in order to analyze more precisely your infrastructure.

L’article OEM 13c Repository view gc$metric_values_daily est apparu en premier sur dbi Blog.

Discover target database 18c with EM12c

$
0
0

Working on Enterprise Manager 12.1.0.4 version at a client’s site, we would like to know if oracle database target in 18c version could be discovered and monitored, even if Enterprise Manager 12.1.0.4 does not support Oracle 18c database targets.

Installing the agent 12c on the target host did not cause any problem, the oracle database 18c discovery ran successfully, but the database was seen as down in the Enterprise Manager 12.1.0.4 console.

We tried several tricks without any positive results, but running the following command shows us that this was a connection problem:


oracle@em12c:/home/oracle/:> emctl getmetric agent DB18,oracle_database,Response
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.
All rights reserved.
Status,State,oraerr,Archiver,DatabaseStatus,ActiveState0,UNKNOWN,
Failed to connect: java.sql.SQLException: 
ORA-28040: No matching authentication protocol,UNKNOWN,UNKNOWN,UNKNOWN

With Oracle 18c, the default value for SQLNET.ALLOWED_LOGON_VERSION parameter is 12, it means that database clients using pre-12c jdbc thin drivers cannot authenticate to 18c database servers.

The workaround is to add in the database server sqlnet.ora the following lines:

SQLNET.ALLOWED_LOGON_VERSION_SERVER=11
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=11

We restart the database and the agent, and the Oracle database 18c is displayed up and running in Enterprise Manager 12.1.0.4:

Some more tests showed us that everything is working fine: incident management, performance, top activity ..aso

Nevertheless do not forget that oracle database target version 18c are not supported with Enterprise Manager 12.1.0.4. I will recommand to use the last Enterprise Manager 13.3 last version in order to administer and monitor Oracle database 18c.

L’article Discover target database 18c with EM12c est apparu en premier sur dbi Blog.

ORA-01000 and agent13c

$
0
0

Recently I received errors messages from OEM13c saying too many cursors were opened in a database:

instance_throughput:ORA-01000: maximum open cursors exceeded

My database had currently this open_cursors value:

SQL> show parameter open_cursors

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_cursors                         integer     300

I decided to increase its value to 800:

SQL> alter system set open_cursors=800;

System altered.

But a few minutes later I received again the same message. I decided to have a more precise look to discover what’s was happening.

SQL> SELECT  max(a.value) as highest_open_cur, p.value as max_open_cur FROM v$sesstat a, v$statname b, v$parameter p WHERE  a.statistic# = b.statistic#  and b.name = 'opened cursors current' and p.name= 'open_cursors' group by p.value;

HIGHEST_OPEN_CUR     MAX_OPEN_CUR
   300                 800

So I need to  find out which session is causing the error:

SQL> select a.value, s.username, s.sid, s.serial# from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic#  and s.sid=a.sid and b.name = 'opened cursors current' and s.username is not null;

     VALUE USERNAME                              SID    SERIAL#
---------- ------------------------------ ---------- ----------
         9 SYS                                     6      36943
         1 SYS                                   108      31137
         1 SYS                                   312      15397
       300 SYS                                   417      31049
        11 SYS                                   519      18527
         7 SYS                                   619      48609
         1 SYS                                   721      51139
         0 PUBLIC                                922         37
        17 SYS                                  1024          1
        14 SYS                                  1027      25319
         1 SYS                                  1129      40925

A sys connection is using 300 cursors :=(( let’s see what it is:

Great the agent 13c is causing the problem :=((

I already encountered this kind of problem on another client’s site. In fact the agent 13c is using metrics to determine the High Availability Disk or Media Backup every 15 minutes and is using a lot of cursors. The best way is to disable those metrics to avoid ORA-01000 errors:

After reloading the agent and reevaluating the alert, the incident disappeared successfully :=)

L’article ORA-01000 and agent13c est apparu en premier sur dbi Blog.

OEM Cloud Control Release update to 13.5.0.23

$
0
0

Introduction

This is upgrade procedure to release update from 07 Aug 2024. 13.5.0.23

Its also one of prerequisites for integrating OEM with OCI Exadata Cloud@Customer

solution available on my other post under this link:

https://www.dbi-services.com/blog/exacc-oci-integration-with-oem-13-5-cloud-control-installed-on-premises

Patching procedure and process is basically regular with usage of standard OMSPatcher. We updating from version 13.5.0.16 to 13.5.0.23

This update release bring some improvements in below scopes:

New Management Packs for Advanced Management and Monitoring of Engineered Systems

To help address the key challenges in managing large distributed systems such as the Oracle Engineered Systems, RU23 introduces the Oracle Enterprise Manager Cloud Control Exadata Management Pack and Zero Data Loss Recovery Appliance (ZDLRA) Management Pack. These packs offer a comprehensive solution to optimize performance of your databases, maximize your Exadata capacity, and automate critical database backup operations. 

The key features of the Exadata Management pack include: 

  • At scale Exadata infrastructure patching using Fleet Maintenance
  • CPU allocation analysis with the Database Impact Advisor
  • I/O load capacity evaluation with  Exadata I/O Resource Management (IORM) Advisor
  • Advanced, holistic IOPS allocations visualization for optimal Exascale performance monitoring

The key features of the ZDLRA pack include: 

  • Automated Database Fleet Backup Management for Recovery Appliance
  • Database Fleet Advanced Backup Configuration for ZDLRA Using EM CLI
  • Recovery Appliance Protected Database Fleet Archival Backup Scheduling

Source: https://blogs.oracle.com/observability/post/oem13c-ru23-is-now-available

Full list of new features can be found here:

https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.5/emcon/new-features-release-update.html#GUID-4EF570C5-5434-4996-8435-9F0CF31EE738

So if you would like to have any of this new functionalities and better OCI integration with your Legacy OEM, please update first OMS to this version and then go to post related to OCI integration.

Below upgrade procedure.

Have fun!

Step-by-step OMS update Procedure

Download patches zip files:

In our case we will need patches:

p19999993_135000_Generic.zip omspatcher
p36494040_135000_Generic.zip OMS
p36494050_135000_Generic.zip OEM agent
+ 3 patches needed to jdbs:


1.Patch 35430934
2.Patch 31657681
3.Patch 34153238

p35430934_122140_Generic.zip
p31657681_191000_Generic.zip
p35430934_122140_Generic.zip

We copied patches to work directory oms1:/u02/inst/ 

Backup environment OMS/weblogic/Database

In our case we will need to backup 4 folders + enable on database restore point:

#1.	check OMS

oracle@oms1:/u02/inst/omspatcher/ [em1350] emctl status oms;
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up

#2. stop OMS
oracle@oms1:/u02/inst/omspatcher/ [em1350] emctl stop oms -all
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved.
Stopping Oracle Management Server...
WebTier Successfully Stopped
Oracle Management Server Successfully Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down
JVMD Engine is Down

#3. Do backup of OMS + database(just set guarantee restore point, dont forget to remove on the end of upgrade)


OMS:
mkdir /u02/inst/bkp
cd /u01/app/oracle/
tar cvf - em13c | gzip -9 > /u02/inst/bkp/em13c_bkp.tar.gz
tar cvf - gc_inst | gzip -9 > /u02/inst/bkp/gc_inst_bkp.tar.gz
tar cvf - swlib | gzip -9 > /u02/inst/bkp/swlib_bkp.tar.gz
cd /u01/app/
tar cvf - oraInventory | gzip -9 > /u02/inst/bkp/oraInventory_bkp.tar.gz

#Where folders em13c-OMS, gc_inst-weblogic, swlib- software libary

#4. Database garantee restore point:

SQL> create restore point EM13C_REPO_before_upgrade for pluggable database EM13C_REPO guarantee flashback database;
SQL> col name format a30;
SQL> select name , GUARANTEE_FLASHBACK_DATABASE,con_id from v$restore_point;

Install new OMSPatcher

cd $ORACLE_HOME
mv OMSPatcher OMSPatcher_bkp
cp -rp /u02/inst/omspatcher/OMSPatcher /u01/app/oracle/em13c/
cd /u01/app/oracle/em13c/OMSPatcher/
./omspatcher version
OMSPatcher Version: 13.9.5.21.0
OPlan Version: 12.2.0.1.16

Analyze patching requirements

cd /u02/inst/oms/36494040/

emctl start oms;

/u01/app/oracle/em13c/OMSPatcher/omspatcher apply -analyze
					OMSPatcher Automation Tool
					Copyright (c) 2017, Oracle Corporation.  All rights reserved.
					OMSPatcher version : 13.9.5.21.0
					OUI version        : 13.9.4.0.0
					Running from       : /u01/app/oracle/em13c
					Log file location  : /u01/app/oracle/em13c/cfgtoollogs/omspatcher/opatch2024-10-01_15-52-13PM_1.log
					WARNING:Apply the 12.2.1.4.0 version of the following JDBC Patch(es) on OMS Home before proceeding with patching.
					1.MLR patch 35430934(or its superset),which includes bugs 32720458 and 33607709
					2.Patch 31657681
					3.Patch 34153238
					OMSPatcher log file: /u01/app/oracle/em13c/cfgtoollogs/omspatcher/36494040/omspatcher_2024-10-01_15-52-21PM_analyze.log

					Please enter OMS weblogic admin server URL(t3s://oms1:7102):>
					Please enter OMS weblogic admin server username(oracle):>
					Please enter OMS weblogic admin server password:>
					Enter DB user name : sysman
					Enter 'SYSMAN' password :
					Checking if current repository database is a supported version
					Current repository database version is supported
					Prereq "checkComponents" for patch 36487738 passed.
					Prereq "checkComponents" for patch 36329231 passed.
					Prereq "checkComponents" for patch 36487989 passed.
					Prereq "checkComponents" for patch 36487743 passed.
					Prereq "checkComponents" for patch 36487747 passed.
					Prereq "checkComponents" for patch 36161799 passed.
					Prereq "checkComponents" for patch 36487829 passed.
					Configuration Validation: Success
					Running apply prerequisite checks for sub-patch(es) "36487738,36487747,36487989,36487829,36487743,36161799,36329231" and Oracle Home "/u01/app/oracle/em13c"...
					Sub-patch(es) "36487738,36487747,36487989,36487829,36487743,36161799,36329231" are successfully analyzed for Oracle Home "/u01/app/oracle/em13c"
					Complete Summary
					================
					All log file names referenced below can be accessed from the directory "/u01/app/oracle/em13c/cfgtoollogs/omspatcher/2024-10-01_15-52-13PM_SystemPatch_36494040_1"
					Prerequisites analysis summary:
					-------------------------------
					The following sub-patch(es) are applicable:
								 Featureset                                                      Sub-patches                                                                                           Log file
								 ----------                                                      -----------                                                                                           --------
					  oracle.sysman.top.oms   36487738,36487747,36487989,36487829,36487743,36161799,36329231   36487738,36487747,36487989,36487829,36487743,36161799,36329231_opatch2024-10-01_15-52-52PM_1.log
					The following sub-patches are incompatible with components installed in the OMS system:
					35582217,34430509,34706773,36487761,35854914,36329046,36487844,36329220
					--------------------------------------------------------------------------------
					The following warnings have occurred during OPatch execution:
					1) Apply the 12.2.1.4.0 version of the following JDBC Patch(es) on OMS Home before proceeding with patching.
					1.MLR patch 35430934(or its superset),which includes bugs 32720458 and 33607709
					2.Patch 31657681
					3.Patch 34153238
					--------------------------------------------------------------------------------
					Log file location: /u01/app/oracle/em13c/cfgtoollogs/omspatcher/36494040/omspatcher_2024-10-01_15-52-21PM_analyze.log

					OMSPatcher succeeded.

#in our case we install additionally 3 more patches:
1.MLR patch 35430934(or its superset),which includes bugs 32720458 and 33607709
2.Patch 31657681
3.Patch 34153238

oracle@oms1:/u02/inst/jdbc_patches/ [em1350] ls -al
total 1908
drwxr-xr-x. 2 oracle oinstall     114 Oct  1 16:20 .
drwxrwxrwx. 7 oracle oinstall      79 Oct  1 16:19 ..
-rw-r--r--. 1 oracle oinstall  468428 Oct  1 14:15 p31657681_191000_Generic.zip
-rw-r--r--. 1 oracle oinstall   58787 Oct  1 14:15 p34153238_122140_Generic.zip
-rw-r--r--. 1 oracle oinstall 1418389 Oct  1 14:15 p35430934_122140_Generic.zip


unzip p35430934_122140_Generic.zip
unzip p31657681_191000_Generic.zip
unzip p35430934_122140_Generic.zip

1. 
emctl stop oms
cd /u02/inst/jdbc_patches/35430934/
/u01/app/oracle/em13c/OPatch/opatch apply

2.
cd /u02/inst/jdbc_patches/34153238
/u01/app/oracle/em13c/OPatch/opatch apply

3.
cd /u02/inst/jdbc_patches/31657681/
/u01/app/oracle/em13c/OPatch/opatch apply


Analize with omspatcher again:

				oracle@oms1:/u02/inst/oms/36494040/ [em1350] /u01/app/oracle/em13c/OMSPatcher/omspatcher apply -analyze
						OMSPatcher Automation Tool
						Copyright (c) 2017, Oracle Corporation.  All rights reserved.
						OMSPatcher version : 13.9.5.21.0
						OUI version        : 13.9.4.0.0
						Running from       : /u01/app/oracle/em13c
						Log file location  : /u01/app/oracle/em13c/cfgtoollogs/omspatcher/opatch2024-10-01_16-32-12PM_1.log
						OMSPatcher log file: /u01/app/oracle/em13c/cfgtoollogs/omspatcher/36494040/omspatcher_2024-10-01_16-32-21PM_analyze.log
						Please enter OMS weblogic admin server URL(t3s://oms1:7102):>
						Please enter OMS weblogic admin server username(oracle):>
						Please enter OMS weblogic admin server password:>
						Enter DB user name : sysman
						Enter 'SYSMAN' password :
						Checking if current repository database is a supported version
						Current repository database version is supported
						Prereq "checkComponents" for patch 36487738 passed.
						Prereq "checkComponents" for patch 36329231 passed.
						Prereq "checkComponents" for patch 36487989 passed.
						Prereq "checkComponents" for patch 36487743 passed.
						Prereq "checkComponents" for patch 36487747 passed.
						Prereq "checkComponents" for patch 36161799 passed.
						Prereq "checkComponents" for patch 36487829 passed.
						Configuration Validation: Success
						Running apply prerequisite checks for sub-patch(es) "36487738,36487747,36487989,36487829,36487743,36161799,36329231" and Oracle Home "/u01/app/oracle/em13c"...
						Sub-patch(es) "36487738,36487747,36487989,36487829,36487743,36161799,36329231" are successfully analyzed for Oracle Home "/u01/app/oracle/em13c"
						Complete Summary
						================
						All log file names referenced below can be accessed from the directory "/u01/app/oracle/em13c/cfgtoollogs/omspatcher/2024-10-01_16-32-12PM_SystemPatch_36494040_1"
						Prerequisites analysis summary:
						-------------------------------
						The following sub-patch(es) are applicable:
								 Featureset                                                      Sub-patches                                                                                           Log file
									 ----------                                                      -----------                                                                                           --------
						  oracle.sysman.top.oms   36487738,36487747,36487989,36487829,36487743,36161799,36329231   36487738,36487747,36487989,36487829,36487743,36161799,36329231_opatch2024-10-01_16-32-43PM_1.log
						The following sub-patches are incompatible with components installed in the OMS system:
						35582217,34430509,34706773,36487761,35854914,36329046,36487844,36329220
						Log file location: /u01/app/oracle/em13c/cfgtoollogs/omspatcher/36494040/omspatcher_2024-10-01_16-32-21PM_analyze.log

						OMSPatcher succeeded

Now the output is with without warning so its safe to proceed with patching

Update OMS

emctl stop oms;
cd /u02/inst/oms/36494040/

/u01/app/oracle/em13c/OMSPatcher/omspatcher apply 

oracle@oms1:/u02/inst/oms/36494040/ [em1350] /u01/app/oracle/em13c/OMSPatcher/omspatcher apply
OMSPatcher Automation Tool
Copyright (c) 2017, Oracle Corporation.  All rights reserved.
OMSPatcher version : 13.9.5.21.0
OUI version        : 13.9.4.0.0
Running from       : /u01/app/oracle/em13c
Log file location  : /u01/app/oracle/em13c/cfgtoollogs/omspatcher/opatch2024-10-01_16-48-53PM_1.log

OMSPatcher log file: /u01/app/oracle/em13c/cfgtoollogs/omspatcher/36494040/omspatcher_2024-10-01_16-49-02PM_apply.log

Please enter OMS weblogic admin server URL(t3s://oms1:7102):>
Please enter OMS weblogic admin server username(oracle):>
Please enter OMS weblogic admin server password:>

Enter DB user name : sys
Enter 'sys' password :
Checking if current repository database is a supported version
Current repository database version is supported


Prereq "checkComponents" for patch 36487738 passed.
Prereq "checkComponents" for patch 36329231 passed.
Prereq "checkComponents" for patch 36487989 passed.
Prereq "checkComponents" for patch 36487743 passed.
Prereq "checkComponents" for patch 36487747 passed.
Prereq "checkComponents" for patch 36161799 passed.
Prereq "checkComponents" for patch 36487829 passed.

Configuration Validation: Success
Running apply prerequisite checks for sub-patch(es) "36487738,36487747,36487989,36487829,36487743,36161799,36329231" and Oracle Home "/u01/app/oracle/em13c"...
Sub-patch(es) "36487738,36487747,36487989,36487829,36487743,36161799,36329231" are successfully analyzed for Oracle Home "/u01/app/oracle/em13c"
To continue, OMSPatcher will do the following:
[Patch and deploy artifacts]   : Apply sub-patch(es) [ 36161799 36329231 36487738 36487743 36487747 36487829 36487989 ]
                                 Apply RCU artifact with patch "/u01/app/oracle/em13c/.omspatcher_storage/36487738_Aug_3_2024_00_57_51/original_patch";
                                 Apply RCU artifact with patch "/u01/app/oracle/em13c/.omspatcher_storage/36329231_May_8_2024_02_03_34/original_patch";
                                 Apply RCU artifact with patch "/u01/app/oracle/em13c/.omspatcher_storage/36487989_Aug_3_2024_02_10_51/original_patch";
...
...
...
emctl_register_gccompliance_2024-10-01_17-34-40PM.log
         MRS-SecurityClassManager          emctl_register_SecurityClassManager_2024-10-01_17-43-22PM.log
                 MRS-OutOfBoxRole                  emctl_register_OutOfBoxRole_2024-10-01_17-43-27PM.log
                       MRS-report                        emctl_register_report_2024-10-01_17-43-32PM.log
                     MRS-namedsql                      emctl_register_namedsql_2024-10-01_17-43-36PM.log
                     MRS-runbooks                      emctl_register_runbooks_2024-10-01_17-43-41PM.log
                MRS-derivedAssocs                 emctl_register_derivedAssocs_2024-10-01_17-43-45PM.log
                MRS-derivedAssocs                 emctl_register_derivedAssocs_2024-10-01_17-43-52PM.log
                MRS-derivedAssocs                 emctl_register_derivedAssocs_2024-10-01_17-43-56PM.log

Log file location: /u01/app/oracle/em13c/cfgtoollogs/omspatcher/36494040/omspatcher_2024-10-01_16-49-02PM_apply.log

OMSPatcher succeeded


#Execute Sync EM:
emctl sync;

#Restart OMS:(just to check that everything is OK)

emctl stop oms -all 

emctl start oms
Oracle Enterprise Manager Cloud Control 13c Release 5
Copyright (c) 1996, 2021 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

Check new OMS version:

Re-login to website, Click About Enterprise Manager on user drop down menu and check version:

Go to Manage Cloud Control > Health Overview and check overall oms status.

If all above operations successful, you can remove now database restore point:

Removing Restore point

#Remove flashback guarantee point on OMS REPO databases:

SQL> drop restore point EM13C_APP_001T_before_upgrade for pluggable database EM13C_REPO ;

SQL> col name format a30;
SQL> select name , GUARANTEE_FLASHBACK_DATABASE,con_id from v$restore_point;

Patching OEM Agents:

Now we can update OEM Agents.

There is many options to update /patch OEM Agents, please refer to oracle documentation which is most suitable for you environment. In this tutorial we will use automated ‘Provisioning and Patching’ using OEM.

Please go to Enterprise > Provisioning and Patching > Saved Patches and upload patch p36494050_135000_Generic.zip for OEM agent

After successful upload patch to OEM click patch number and create Deployment Plan

name the plan and choice targets for update:

After plan is create go to Enterprise > Provisioning and Patching > Patches update > choice your plan

Then Analyze plan, and Deploy > you will be able to see details in Jobs view.

After deployment finish you should have already agents updated and restarted of all nodes which you choice during plan Creation

If you have many agents some of them can have issue during upgrade , usually manual agent restart helps, if not then each case need to be investigate separately , in worse case you can also just redeploy Agent on monitoring server with new image.

That’s it!

We update OMS and OEM Agents to 13.5.0.23

Now if you interested in using new Exadata Cloud @ Customer integration OEM futures below link to my post how to do this:

ttps://www.dbi-services.com/blog/exacc-oci-integration-with-oem-13-5-cloud-control-installed-on-premises

L’article OEM Cloud Control Release update to 13.5.0.23 est apparu en premier sur dbi Blog.

ExaCC OCI integration with OEM 13.5 Cloud Control installed On-premises.

$
0
0

Introduction

I wrote this article to show how you can integrate Legacy OEM with your Cloud environment in this case Oracle ExaCC.To have overall view on your Exadata X9M Cloud Infrastructure, statistics related to CPU/Memory/ASM Storage usage. Your on premise monitoring OEM can read data from Oracle cloud using OCI libraries and present them in combination with your standard DB/VMs target monitoring, this give you powerful tool for overall view on your Enterprise environment.

Since version OEM release update 13.5.0.23 of OMS / Agents. There is few new interesting Dashboards and panels related to OCI Exadata Infrastructure, also RU23 introduces the Oracle Enterprise Manager Cloud Control Exadata Management Pack and Zero Data Loss Recovery Appliance (ZDLRA) Management Pack, some Dashboards, panels view below:

Biggest advantage of this integration is that you will have wider view to your cloud environment, Concept of ExaCC is that you see and have access to VMs and databases, hardware of Exadata Dbservers and Cellservers are normally managed by Oracle.

Adding this OCI integration to OEM give you viasability of physical cell servers and their statistics.

Now lets move on how this can be configured

Prerequisites:

  1. OEM OMS/Agents update to minimum 13.5.0.23 (AUG 07/2024), why? since this version there is OCI integration enhancements and new dashboards,management packs for ExaCC. I described this in another post link here: https://www.dbi-services.com/blog/oem-cloud-control-release-update-to-13-5-0-23
  2. Get your Exacli user/password to cellservers from your environment , in procedure I will describe how to do it
  3. Have OCI client/libraries installed on one of Agents host.
  4. Have access to OCI directly or over HTTPS proxy from Agent host.

Step by Step Procedure:

Get Exacli username and password to your ExaCC cellservers(this step is optional but recommend to have more statistics from cell servers.

Login to one of yours Virtual Exadata vm server and check username and password for StorageCells.

username usually have format: cloud_user_<crs_cluster_name>

to get clustername and password ,login as grid user end execute:

[grid@s***n1 ~]$ crsctl get cluster name; 
CRS-6724: Current cluster name is 'zh1234clua1' 

#so in this case username will be cloud_user_zh1234clua1

#now get Exadata initial password
[opc@s***n1 ~]$ sudo su - 
[root@s***n1 ~]# /opt/exacloud/get_cs_data.py 
*** WARNING : deprecated key derivation used. 
Using -iter or -pbkdf2 would be better. 
ExaCli initial password is: 
 **************************** 


#Collect the storage server IP address from 
/etc/oracle/cell/network-config/cellip.ora on the VM Guest. 

#Test Connection to one of cell IP addresses 
#using exacli provide username and password gathered above 
exacli -l cloud_user_zh1234clua1 -c 100.100.0.13 -e list physicaldisk 
Password: **************************** 

#in output you should receive disk list from Storage cell , if not then means that your username or passwords are incorrect.

Save credentials for later.

Create new named credentials in OEM:

Go to Setup > Security > Named Credentials and create new with user and passwords saved above:

Now we have connection between OEM and storage Cellservers.

Create user/group/policy for monitoring and assign proper policy’s in OCI.

Login to OCI and create new user,group and policys

Go to Identity > Domains > Groups and create new (use name which apply to your naming convention

Create New user and attache to Group created earler:

Create API keys:

Copy OCI configuration config file and save ssh key.

Create new policy with 2 Statements (privileges to be able to read your compartment objects) like below:

Go to Identity & Security > Policies

Download and install OCI Client on your server.

In our case, we installing OCI on OMS server and use EM Agent deployed to this machine. To use OCI API to connect and gather data from Oracle Cloud about our infrastructure using HTTPS_PROXY server.

To install OCI please follow official documentation, there are different options of installation and OS versions: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm#InstallingCLI__oraclelinux8

In our case we installing OCI Cli as oracle user on Oracle Linux 8

First we set http/s proxy :

oracle@agent1:~/ export HTTPS_PROXY=http://proxy.proxy.com:3038 
oracle@agent1:~/ export HTTP_PROXY=http://proxy.proxy.com:3038 

Download newest OCI libraries :

oracle@agent1:~/# mkdir -p /u01/app/oracle/oci/
oracle@agent1:~/# cd  /u01/app/oracle/oci/
oracle@agent1:/u01/app/oracle/oci/# bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" 

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current 
                                 Dload  Upload   Total   Spent    Left  Speed 
100 16926  100 16926    0     0   199k      0 --:--:-- --:--:-- --:--:--  199k 
    ****************************************************************************** 
    You have started the OCI CLI Installer in interactive mode. If you do not wish 
    to run this in interactive mode, please include the --accept-all-defaults option. 
    If you have the script locally and would like to know more about 
    input options for this script, then you can run: 
    ./install.sh -h 
    If you would like to know more about input options for this script, refer to: 
    https://github.com/oracle/oci-cli/blob/master/scripts/install/README.rst 
    ****************************************************************************** 
Downloading Oracle Cloud Infrastructure CLI install script from https://raw.githubusercontent.com/oracle/oci-cli/v3.2.1/scripts/install/install.py to /tmp/oci_cli_install_tmp_VwnM. 
######################################################################################################################################################################### 100.0% 
Running install script. 
python3 /tmp/oci_cli_install_tmp_VwnM 
-- Verifying Python version. 
-- Python version 3.6.8 okay. 
===> In what directory would you like to place the install? (leave blank to use '/home/oracle/lib/oracle-cli'): 
-- Creating directory '/home/oracle/lib/oracle-cli'. 
-- We will install at '/home/oracle/lib/oracle-cli'. 
===> In what directory would you like to place the 'oci' executable? (leave blank to use '/home/oracle/bin'): 
-- Creating directory '/home/oracle/bin'. 
-- The executable will be in '/home/oracle/bin'. 
===> In what directory would you like to place the OCI scripts? (leave blank to use '/home/oracle/bin/oci-cli-scripts'): 
-- Creating directory '/home/oracle/bin/oci-cli-scripts'. 
-- The scripts will be in '/home/oracle/bin/oci-cli-scripts'. 
===> Currently supported optional packages are: ['db (will install cx_Oracle)'] 
What optional CLI packages would you like to be installed (comma separated names; press enter if you don't need any optional packages)?: 
-- The optional packages installed will be ''. 
-- Trying to use python3 venv. 
-- Executing: ['/usr/bin/python3', '-m', 'venv', '/home/oracle/lib/oracle-cli'] 
-- Executing: ['/home/oracle/lib/oracle-cli/bin/pip', 'install', '--upgrade', 'pip'] 
Collecting pip 
  Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB) 
    100% |████████████████████████████████| 1.7MB 847kB/s 
Installing collected packages: pip 
  Found existing installation: pip 9.0.3 
    Uninstalling pip-9.0.3: 
      Successfully uninstalled pip-9.0.3 
Successfully installed pip-21.3.1 
You are using pip version 21.3.1, however version 24.2 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
-- Executing: ['/home/oracle/lib/oracle-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpk9na7c02', 'wheel', '--upgrade'] 
Collecting wheel 
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB) 
Installing collected packages: wheel 
Successfully installed wheel-0.37.1 
-- Executing: ['/home/oracle/lib/oracle-cli/bin/pip', 'install', '--cache-dir', '/tmp/tmpk9na7c02', 'oci_cli', '--upgrade'] 
Collecting oci_cli 
  Downloading oci_cli-3.48.0-py3-none-any.whl (50.7 MB) 
     |████████████████████████████████| 50.7 MB 2.6 MB/s 
Collecting jmespath==0.10.0 
  Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB) 
Collecting prompt-toolkit==3.0.29 
  Downloading prompt_toolkit-3.0.29-py3-none-any.whl (381 kB) 
     |████████████████████████████████| 381 kB 51.8 MB/s 
Collecting arrow>=1.0.0 
  Donloading arrow-1.2.3-py3-none-any.whl (66 kB) 
     |████████████████████████████████| 66 kB 14.0 MB/s 
Collecting PyYAML<=6.0.1,>=5.4 
  Downloading PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (677 kB) 
     |████████████████████████████████| 677 kB 47.5 MB/s 
Collecting oci==2.134.0 
  Downloading oci-2.134.0-py3-none-any.whl (27.9 MB) 
     |████████████████████████████████| 27.9 MB 96.5 MB/s 
Collecting terminaltables==3.1.10 
  Downloading terminaltables-3.1.10-py2.py3-none-any.whl (15 kB) 
Collecting certifi 
  Downloading certifi-2024.8.30-py3-none-any.whl (167 kB) 
     |████████████████████████████████| 167 kB 106.3 MB/s 
Collecting cryptography<43.0.0,>=3.2.1 
  Downloading cryptography-40.0.2-cp36-abi3-manylinux_2_28_x86_64.whl (3.7 MB) 
     |████████████████████████████████| 3.7 MB 25.3 MB/s 
Collecting six>=1.15.0 
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) 
Collecting pyOpenSSL<25.0.0,>=17.5.0 
  Downloading pyOpenSSL-23.2.0-py3-none-any.whl (59 kB) 
     |████████████████████████████████| 59 kB 18.3 MB/s 
Collecting python-dateutil<3.0.0,>=2.5.3 
  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB) 
     |████████████████████████████████| 229 kB 61.2 MB/s 
Collecting pytz>=2016.10 
  Downloading pytz-2024.2-py2.py3-none-any.whl (508 kB) 
     |████████████████████████████████| 508 kB 99.2 MB/s 
Collecting click==8.0.4 
  Downloading click-8.0.4-py3-none-any.whl (97 kB) 
     |████████████████████████████████| 97 kB 19.2 MB/s 
Collecting importlib-metadata 
  Downloading importlib_metadata-4.8.3-py3-none-any.whl (17 kB) 
Collecting circuitbreaker<2.0.0,>=1.3.1 
  Downloading circuitbreaker-1.4.0.tar.gz (9.7 kB) 
  Preparing metadata (setup.py) ... done 
Collecting wcwidth 
  Downloading wcwidth-0.2.13-py2.py3-none-any.whl (34 kB) 
Collecting typing-extensions 
  Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB) 
Collecting cffi>=1.12 
  Downloading cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (402 kB) 
     |████████████████████████████████| 402 kB 30.7 MB/s 
Collecting pycparser 
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB) 
     |████████████████████████████████| 118 kB 89.7 MB/s 
Collecting zipp>=0.5 
  Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB) 
Building wheels for collected packages: circuitbreaker 
  Building wheel for circuitbreaker (setup.py) ... done 
  Created wheel for circuitbreaker: filename=circuitbreaker-1.4.0-py3-none-any.whl size=7506 sha256=cd24462c8ab8bb71fba04fa996852c0cff6c93749f3a2c74591f3a1cbfa756ec 
  Stored in directory: /tmp/tmpk9na7c02/wheels/46/17/98/db2eb826e4a98da672cffe66ec16838182cde0cf19ad2c0c70 
Successfully built circuitbreaker 
Installing collected packages: pycparser, cffi, zipp, typing-extensions, six, cryptography, wcwidth, pytz, python-dateutil, pyOpenSSL, importlib-metadata, circuitbreaker, certifi, terminaltables, PyYAML, prompt-toolkit, oci, jmespath, click, arrow, oci-cli 
Successfully installed PyYAML-6.0.1 arrow-1.2.3 certifi-2024.8.30 cffi-1.15.1 circuitbreaker-1.4.0 click-8.0.4 cryptography-40.0.2 importlib-metadata-4.8.3 jmespath-0.10.0 oci-2.134.0 oci-cli-3.48.0 prompt-toolkit-3.0.29 pyOpenSSL-23.2.0 pycparser-2.21 python-dateutil-2.9.0.post0 pytz-2024.2 six-1.16.0 terminaltables-3.1.10 typing-extensions-4.1.1 wcwidth-0.2.13 zipp-3.6.0 

===> Modify profile to update your $PATH and enable shell/tab completion now? (Y/n): n 

-- If you change your mind, add 'source /home/oracle/lib/oracle-cli/lib/python3.6/site-packages/oci_cli/bin/oci_autocomplete.sh' to your rc file and restart your shell to enable tab completion. 

-- You can run the CLI with '/home/oracle/bin/oci'. 

-- Installation successful. 

-- Run the CLI with /home/oracle/bin/oci --help 

Configure credenials to OCI user and copy API private key to host:

oracle@agent1:~/# vi .oci/config 
[DEFAULT] 
user=ocid1.user.ooracle@agent1:~/#
fingerprint=.*********************************
tenancy=ocid1.tenancy..*********************************
region=eu-zurich-1 
key_file=/home/oracle/.oci/oem_ro.pem 

 
#Create private key you can copy or create by copy/past with vi
oracle@agent1:~/# vi /home/oracle/.oci/oem_ro.pem 
 -----BEGIN PRIVATE KEY----- 
*** 
*** 
*** 
*** 
*** 
-----END PRIVATE KEY----- 

# Test your connection and gather some info for example compartment list
oracle@agent1:~/#  oci iam compartment list
{ 
  "data": [ 
    { 
      "compartment-id": "ocid1.tenancy.oc1..*********************************", 
      "defined-tags": { 
        "Oracle-Tags": { 
          "CreatedBy": "*********************************@*********************************.com", 
          "CreatedOn": "2023-06-15T15:28:03.408Z" 
        } 
      }, 
      "description": "Exadata Cloud@Customer database service", 
      "freeform-tags": {}, 
      "id": "ocid1.compartment.o*********************************", 
      "inactive-status": null, 
      "is-accessible": null, 
      "lifecycle-state": "ACTIVE", 
      "name": "ExaCC*********************************", 
      "time-created": "2023-06-15T15:28:03.545000+00:00" 
    } 
  ] 
} 

Set https proxy for your OEM agent (which later will be used to communicate with OCI)

edit emd.properties and add on the end 2 extra parameters.

oci_http_proxy_host=

oci_http_proxy_port=

#Configure proxy on your agent installation folder: 

oracle@agent1:~/#  vi/u01/app/oracle/agent/agent_inst/sysman/config/emd.properties
oci_http_proxy_host=proxy.proxy.com 
oci_http_proxy_port=3038 

#Restart Agent
oracle@agent1:~/# emctl stop agent 
Oracle Enterprise Manager Cloud Control 13c Release 5 
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved. 
Stopping agent ... stopped. 

oracle@agent1:~/#  [emagent1350] emctl start agent 
Oracle Enterprise Manager Cloud Control 13c Release 5 
Copyright (c) 1996, 2021 Oracle Corporation.  All rights reserved. 
Starting agent ........... started. 

Configure named credentials in OEM for OCI :

Go to Setup > Security > Named Credentials Click Create tab and create credentials using keys and OCI tenants keys copied from config or credentials:

next you can test it choice agent on which we installed oci and configure proxy.

Deploy Exadata plugins on Agents:

Go to Setup > Extensibility > Plug-ins

Choice:

Engineered Systems > Oracle Exadata

Click Deploy on and choice targets you wanna deploy it:

Follow logs to check if deployment successful :

Discovering ExaCC targets

Now we have all prerequisites configured and tested so we can discover our ExaCC :

Go to > Setup > Add Target > Add Target Manually > Add Using Guided Process

Choice target ExaCC infrastructure you wanna add to OEM , you can Also specify ExaCLI credentials to monitor Cellservers and ASMs (optional) We gather this credentials earlier in this tutorial.

Now you can Click next and Promote , and watch status of Target Promotions.

Please also turn on management packs for ExaCC

Go to Setup > Management Pack > Management Pack Access >

After Promotion finish you should have new entry in Target tab:

and Few minutes later you should also see your Oracle Cloud ExaCC infrastructure with all VMs and Databases.


You can go to each Exadata Cluster and see more details, also to ASM Grid Infrastructure:

Cell Statistics:

Please wait for some metrics and statistics some of them need up to 24h to be gathered.

One more interesting functionality of this integration is that there are new Dashboards

For Example Exadata Fleet Aggregated Capacity , Configuration , etc.

They can help you with overall look and capacity planning for future, you can see your total storage, memory current usage and historical values so you can predict growing trend in future.

I hope you enjoy this tutorial and already plan your ExaCC integration 😉

L’article ExaCC OCI integration with OEM 13.5 Cloud Control installed On-premises. est apparu en premier sur dbi Blog.


Viewing all 55 articles
Browse latest View live