()

Target Blackouts in OEM13c using EMCTL


In the literal sense, A blackout is a temporary condition that affects your memory. It’s characterized by a sense of lost time. In terms of the Oracle database, we can also perform a blackout in Oracle Enterprise Manager using EMCTL – Command Line utility. This is done to make the OEM unaware of the target which will undergo a planned interruption so that it won’t trigger alerts during that time.


In this article, we will be manually performing a blackout in OEM13c to avoid incidents or alerts during a specified time frame. This is implemented mostly when we have a planned outage or maintenance activity window scheduled in the target database/server. During a blackout, we can stop the data collection activity where a managed target is undergoing scheduled activities like database upgrade, hardware upgrade, OS patching, etc.


Blackout functionality is available from both the Enterprise Manager console as well as via command-line utility.

For blackout using OEM console, Please refer to the  below link :

Step by Step Demonstrations on Target Blackouts in OEM 13c


Here, I will list some of the few useful commands and their corresponding output which will give you a brief overview for performing a blackout using EMCTL commands on the database server:

  • Create a Blackout
  • Check the status of a Blackout
  • Stop a Blackout

Create a Blackout :

Before proceeding with the blackout, here is a screenshot of the target status in OEM:

This command starts blackout on a target.

 
blackout
Name of the blackout

nodelevel parameter is used to specify that the blackout will be applied to all targets on the same agent server.

-d hh: mm Duration should be specified in [days] hh: mm format.

./emctl start blackout DOWN_FOR_UNIX_PATCHING -nodeLevel -d 3:00

Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.
Blackout DOWN_FOR_UNIX_PATCHING added successfully
EMD reload completed successfully


Check the status of a Blackout:


This command provides the status of the target blackout. The status includes the type of blackout and whether it is a one-time action, or repeating, or a scheduled blackout. This command also specifies whether the blackout has started or stopped.

./emctl status blackout 

Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.
Blackoutname = DOWN_FOR_UNIX_PATCHING
Targets = (machine1:host,)
Time = ({2020-12-10|21:14:16|180 Min,|} )
Expired = False




After performing the blackout, here is snip of the target status in OEM :

Stop a Blackout:


Post activity completion, we need to stop the targets from Blackout, to enable the incident and notification services.

This command stops the blackout that was started on a particular target. Only those blackouts that are started by the emctl tool can be stopped using emctl. This command cannot stop the blackouts that are started using the console or emcli utility.

./emctl stop blackout DOWN_FOR_UNIX_PATCHING

Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.
Blackout DOWN_FOR_UNIX_PATCHING stopped successfully
EMD reload completed successfully

./emctl status blackout 

Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation.  All rights reserved.
No Blackout registered.



 

This document is just for learning purpose and always validate in the LAB environment first before applying in the LIVE environment.


Hope so you like this article
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to know more about our pursuit.

Related Articles


Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Sruti Banerjee

Hello and welcome to DBsGuru, I am Sruti Banerjee, having experience of 3 years as an Oracle DBA, I have good interpersonal skills that can help in attaining the desired level of team coordination, self-starter & quick learner. I am having rich experience in Oracle database management, Backup and Recovery, Security, Installation, Up-gradation, Patching, Migration, Cloning of databases, Dataguard (Physical), and a wide range of other database administration activities.Thanks for the visits!Share Learn Grow!