Monday, June 15, 2020

The plugin BI publisher configuration has failed its perform method 13c

Workaround: If patching is not an option or the install/upgrade is already in progress, this issue can be fixed by following the steps:
1. Close the installer window.
2. Unset the CLASSPATH variable:
      $ export CLASSPATH=
3. Resume the Install/Upgrade using the runConfig.sh script:
      $ OMS_HOME/oui/bin> ./runConfig.sh ORACLE_HOME=$OMS_HOME MODE=perform ACTION=configure COMPONENT_XML={encap_oms.1_0_0_0_0.xml}











This takes a long time

Actually, it never opened. I was expecting it will show the GUI again

I just started it.  To know what the pots are. I went to 

/u04/app/oracle/product/Middleware/install/setupinfo.txt

Sunday, June 14, 2020

How To Increase Redo Log Size in Oracle

I was installing EM13c and there were so many checks. If I can do this again I would have used the template.


One of the checks is to increase the redo size 

We will need to drop inactive redo logs and recreate them.

1. List details about the redo log
     
col member format a60

SQL> select a.group#,b.status,a.member from v$logfile a, v$log b  where a.group#=b.group# order by 1,3;


    GROUP# STATUS           MEMBER
---------- ---------------- ------------------------------------------------------------
         1 CURRENT          /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrth9t_.log
         1 CURRENT          /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthlx_.log
         1 CURRENT          /u03/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthgd_.log
         2 INACTIVE         /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_2_hgfrthbp_.log
         2 INACTIVE         /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_2_hgfrthl8_.log
         2 INACTIVE         /u03/app/oracle/oradata/OEM/onlinelog/o1_mf_2_hgfrthgd_.log
         3 INACTIVE         /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_3_hgfrthc8_.log
         3 INACTIVE         /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_3_hgfrthnd_.log

         3 INACTIVE         /u03/app/oracle/oradata/OEM/onlinelog/o1_mf_3_hgfrthjo_.log

It was using the oracle managed file (OMF) naming convention. It is ugly also it is only multiplexed on 2 disks.


We see that Group 2 and # are inactive so let us start with that.

SQL> alter database drop logfile group 2;


Database altered.


SQL> alter database add logfile group 2
('/u02/app/oracle/oradata/OEM/onlinelog/u02_redo_2.log',
 '/u03/app/oracle/oradata/OEM/onlinelog/u03_redo_2.log',
 '/u04/app/oracle/oradata/OEM/onlinelog/u04_redo_2.log')
 size 400m;  2    3    4    5

Database altered.

SQL> alter database drop logfile group 3;

Database altered.

SQL> alter database add logfile group 3
('/u02/app/oracle/oradata/OEM/onlinelog/u02_redo_3.log',
 '/u03/app/oracle/oradata/OEM/onlinelog/u03_redo_3.log',
 '/u04/app/oracle/oradata/OEM/onlinelog/u04_redo_3.log')
 size 400m;  2    3    4    5

Database altered.

SQL>


Let us check the logfiles

SQL> select a.group#,b.status,a.member from v$logfile a, v$log b  where a.group#=b.group# order by 1,3;


    GROUP# STATUS           MEMBER
---------- ---------------- ------------------------------------------------------------
         1 CURRENT          /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrth9t_.log
         1 CURRENT          /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthlx_.log
         1 CURRENT          /u03/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthgd_.log
         2 UNUSED           /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_2.log
         2 UNUSED           /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_2.log
         2 UNUSED           /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_2.log
         3 UNUSED           /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_3.log
         3 UNUSED           /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_3.log
         3 UNUSED           /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_3.log

Now we need to move the redo group 1 to be unused. Do a switch logfile.

SQL> alter system switch logfile;

System altered.

SQL> select a.group#,b.status,a.member from v$logfile a, v$log b  where a.group#=b.group# order by 1,3;


    GROUP# STATUS           MEMBER
---------- ---------------- ------------------------------------------------------------
         1 ACTIVE           /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrth9t_.log
         1 ACTIVE           /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthlx_.log
         1 ACTIVE           /u03/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthgd_.log
         2 CURRENT          /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_2.log
         2 CURRENT          /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_2.log
         2 CURRENT          /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_2.log
         3 UNUSED           /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_3.log
         3 UNUSED           /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_3.log
         3 UNUSED           /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_3.log

9 rows selected.

Notice that  group #1 is still ACTIVE so if you try to drop it

SQL> alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance oem (thread 1)
ORA-00312: online log 1 thread 1: '/u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrth9t_.log'
ORA-00312: online log 1 thread 1: '/u03/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthgd_.log'
ORA-00312: online log 1 thread 1: '/u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthlx_.log'

 Do another switch logfile

SQL> select a.group#,b.status,a.member from v$logfile a, v$log b  where a.group#=b.group# order by 1,3;


    GROUP# STATUS           MEMBER
---------- ---------------- ------------------------------------------------------------
         1 ACTIVE           /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrth9t_.log
         1 ACTIVE           /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthlx_.log
         1 ACTIVE           /u03/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthgd_.log
         2 ACTIVE           /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_2.log
         2 ACTIVE           /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_2.log
         2 ACTIVE           /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_2.log
         3 CURRENT          /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_3.log
         3 CURRENT          /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_3.log
         3 CURRENT          /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_3.log

9 rows selected.

###--- wait for the checkpoint so it will write it to the archivelogs. Wait until Group#1 is INACTIVE -- give 2 minutes. Also, you can force the checkpoint if you want.

SQL> /


    GROUP# STATUS           MEMBER
---------- ---------------- ------------------------------------------------------------
         1 INACTIVE         /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrth9t_.log
         1 INACTIVE         /u02/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthlx_.log
         1 INACTIVE         /u03/app/oracle/oradata/OEM/onlinelog/o1_mf_1_hgfrthgd_.log
         2 ACTIVE           /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_2.log
         2 ACTIVE           /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_2.log
         2 ACTIVE           /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_2.log
         3 CURRENT          /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_3.log
         3 CURRENT          /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_3.log
         3 CURRENT          /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_3.log

9 rows selected.


Now Group 1 is INACTIVE, you can continue to recreate group1;

SQL> alter database drop logfile group 1;

Database altered.

SQL> alter database add logfile group 1
('/u02/app/oracle/oradata/OEM/onlinelog/u02_redo_1.log',
 '/u03/app/oracle/oradata/OEM/onlinelog/u03_redo_1.log',
 '/u04/app/oracle/oradata/OEM/onlinelog/u04_redo_1.log')
 size 400m;  2    3    4    5

Database altered.

SQL>


CONGRATULATIONS !!! you have successfully renamed, resize your redologs

SQL> select a.group#,b.status,a.member from v$logfile a, v$log b  where a.group#=b.group# order by 1,3;


    GROUP# STATUS           MEMBER
---------- ---------------- ------------------------------------------------------------
         1 UNUSED           /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_1.log
         1 UNUSED           /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_1.log
         1 UNUSED           /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_1.log
         2 INACTIVE         /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_2.log
         2 INACTIVE         /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_2.log
         2 INACTIVE         /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_2.log
         3 CURRENT          /u02/app/oracle/oradata/OEM/onlinelog/u02_redo_3.log
         3 CURRENT          /u03/app/oracle/oradata/OEM/onlinelog/u03_redo_3.log
         3 CURRENT          /u04/app/oracle/oradata/OEM/onlinelog/u04_redo_3.log

9 rows selected.

Friday, June 12, 2020

adoacorectl.sh: exiting with status 204

Solution:
=> Stop application services
=> Clear contents of the persistence directory 
=> Start application services

[applerp@linuxerp1 scripts]$ cd $ORA_CONFIG_HOME/10.1.3/j2ee/oacore


[applerp@linuxerp1 oacore]$ ls
application-deployments  config  persistence  tldcache
[applerp@linuxerp1 oacore]$ rm -rf persistence/
You have new mail in /var/spool/mail/applerp
[applerp@linuxerp1 oacore]$ mkdir persistence 


 hermes:/dbapps/applmgr/HRP/inst/apps/HRP_hermes/ora/10.1.3/j2ee/oacore/persistence/oacore_default_group_1>ls
jms.state              persistence       scheduler_events.lock  scheduler_jobstore.lock  scheduler_notifications.lock
Oc4jJmsExceptionQueue  scheduler_events  scheduler_jobstore     scheduler_notifications
 hermes:/dbapps/applmgr/HRP/inst/apps/HRP_hermes/ora/10.1.3/j2ee/oacore/persistence/oacore_default_group_1>cd .
 hermes:/dbapps/applmgr/HRP/inst/apps/HRP_hermes/ora/10.1.3/j2ee/oacore/persistence/oacore_default_group_1>cd ..
 hermes:/dbapps/applmgr/HRP/inst/apps/HRP_hermes/ora/10.1.3/j2ee/oacore/persistence>cd ..
 hermes:/dbapps/applmgr/HRP/inst/apps/HRP_hermes/ora/10.1.3/j2ee/oacore>ls
application-deployments  config  persistence  tldcache
 hermes:/dbapps/applmgr/HRP/inst/apps/HRP_hermes/ora/10.1.3/j2ee/oacore>mv persistence backuppersistence
 hermes:/dbapps/applmgr/HRP/inst/apps/HRP_hermes/ora/10.1.3/j2ee/oacore>

Thursday, June 11, 2020

Use Oracle Enterprise Manager For Free

Disable the following packs in OEM

But first how to disable them

Enabling and Disabling Management Packs in Oracle Enterprise Manager

To enable or disable the functionality for most packs in Oracle Enterprise Manager Cloud Control 13c:
  1. Log in to Oracle Enterprise Manager as a super administrator.
  2. From the Setup menu (in the upper-right corner of the page), select Management Packs, and then Management Pack Access.
    The Management Pack Access page allows you to enable or disable access for each Management Pack on each listed target. Select Licensable Targets (default) or All Targets to view management pack access information. The Pack Access view options are:
    • Target Based - For each target listed, you can enable or disable the management packs associated with the target. For the target listed in the Name column, select the management packs for which you have access and click the box for that pack.
      For a new target, click the box in the Pack Access Agreed column to agree to the terms of the licensing agreement. The Pack Access Agreed option is available for selection only for a newly added target for which you have not accepted the terms of the Licensing Agreement. By default, the Pack Access Agreed option is not selected.
      Click Apply to save your changes.
    • Pack Based Batch Update - You can enable or disable management packs as a group across all licensable targets or for a specific target type. Select the type from the drop-down list. The Available Packs list will update based on your selection.
      Select the pack you want to enable/disable. Hold the Control key to select multiple packs. Click Move and then either the Enable or Disable access options.
      Click Apply to save your changes.
    • Auto Licensing - You do not have to manually enable or disable management packs every time a new target is discovered. By using the Auto Licensing feature, you can define for each target type what packs a new target will be entitled to upon discovery.
      For example, if you add an additional database target, then all associated packs (such as, Oracle Database Lifecycle Management Pack, Database Tuning Pack) will be automatically assigned to the newly discovered database target. If you do not want these packs automatically enabled for new targets, you must disable Auto Licensing for the associated packs.
      Select the pack you want to enable/disable. Hold the Control key to select multiple packs. Click Move and then either the Enable or Disable Auto Licensing options. By default, Auto Licensing is enabled.
      If you disable any pack, it will appear in the Auto Licensing Disable List. Both the management pack name and the associated type will be included. Also, all targets of the associated target type discovered in the future will not get the pack by default.
      Click Apply to save your changes.
When you disable a Management Pack, links that are part of that pack will either be disabled or, when a link is clicked, a message will indicate that the associated pack is not licensed for use. After performing the previous steps to disable a pack, any administrator who logs in to Oracle Enterprise Manager Cloud Control 13c cannot access any Management Pack functionality that you have disabled.


DISABLE the following
1. 

ORACLE AWR LICENSING

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=360475143911266&id=1490798.1&_afrWindowMode=0&_adf.ctrl-state=eyocj0xiv_4



Diagnostics

Monday, June 8, 2020

SQL SERVER – Fix : Error: 4064 – Cannot open user default database. Login failed. Login failed for user

Database name ITAMS

connect to ITAMS db


EXEC sp_change_users_login 'Report'


EXEC sp_change_users_login 'Auto_Fix', 'itamsuser';

Sunday, June 7, 2020

How to resize Linux Filesystem

[root@serpentcustom u01]# lvs
  LV   VG   Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root rhel -wi-ao---- <44.00g
  swap rhel -wi-ao----   5.00g
[root@serpentcustom u01]# resize2fs /dev/sdd
resize2fs 1.42.9 (28-Dec-2013)
Filesystem at /dev/sdd is mounted on /u04; on-line resizing required
old_desc_blocks = 4, new_desc_blocks = 8
The filesystem on /dev/sdd is now 15728640 blocks long.

[root@serpentcustom u01]# df -h
Filesystem             Size  Used Avail Use% Mounted on
devtmpfs                16G     0   16G   0% /dev
tmpfs                   16G     0   16G   0% /dev/shm
tmpfs                   16G  9.9M   16G   1% /run
tmpfs                   16G     0   16G   0% /sys/fs/cgroup
/dev/mapper/rhel-root   44G   21G   24G  48% /
/dev/sda1             1014M  182M  833M  18% /boot
/dev/sde                25G   15G  9.1G  62% /u01
/dev/sdb               148G   42G   99G  30% /u02
/dev/sdc               148G   41G  100G  30% /u03
tmpfs                  3.2G  4.0K  3.2G   1% /run/user/42
tmpfs                  3.2G   28K  3.2G   1% /run/user/0
tmpfs                  3.2G     0  3.2G   0% /run/user/54321
/dev/sdd                59G   19G   38G  33% /u04
[root@serpentcustom u01]#