Visit Counter

Wednesday, February 24, 2021

Error: [INS-44002] The Oracle home location contains directories or files on following remote nodes

 

When trying to install grid 19.3 software on RAC01 getting below error..

I had below issue..I checked with "ls -la: there hidden files.   .opatchauto_storage  .patch_storage

I removed them with their own name "rm -rf ..opatchauto_storage  .patch_storage"






Solution:

======

Goto to second rac home /u02/softw 

$ cd /u02/softw

$ ls -la

.opatchauto_storage

.patch_storage

$ rm -rf .opatchauto_storage

$ rm -rf .patch_storage




Tuesday, February 16, 2021

Oracle Linux 7:Found /var/log/messages is Empty And Not Being Updated (Doc ID 2580481.1)

 


Found /var/log/messages is empty and no logs being written eventhough Rsyslog service is running.


Misconfiguration in /etc/rsyslog.d/ignore-systemd-session-slice.conf.



Solution


Edit /etc/rsyslog.d/ignore-systemd-session-slice.conf.

if $programname == "systemd-logind" and ($msg contains "New session" or $msg contains "Removed session" or $msg contains "Removed slice" or $msg contains "Stopping") then stop

if $programname == "systemd" and ($msg contains "Started Session" or $msg contains "Starting Session" or $msg contains "Created slice" or $msg contains "Starting user-0.slice" or $msg contains "Stopping user-0.slice" or $msg contains "Removed slice user-0.slic") then stop


Need to be changed as below .

 

if $programname == "systemd-logind" and ($msg contains "New session" or $msg contains "Removed session" or $msg contains "Removed slice" or $msg contains "Stopping") then stop

if $programname == "systemd" and ($msg contains "Started Session" or $msg contains "Starting Session" or $msg contains "Created slice" or $msg contains "Starting user-0.slice" or $msg contains "Stopping user-0.slice" or $msg contains "Removed slice user-0.slic" or $msg contains "Starting User Slice" or $msg contains "Removed slice User Slice" or $msg contains "Stopping User Slice") then stop


 After this restart the service

#systemctl restart rsyslog.service

After this check /var/log/messages .

Wednesday, February 10, 2021

Failed to load SELinux Policy Freezing



Scenario 1

I facing  below error while I copy data from host computer to Virtual Machine the host computer drive full. The virtual machine stuck...Once I restart the Virtual machine...it's given this error.


"Failed to load SELinux policy, freezing."


Solution:

=======

  • Press “e” at the boot screen to edit the startup parameters.

  • Modify the line that starts with “linux16” and append “selinux=0” to the end
  • Press “ctrl+x” to boot.

This allows us to boot with SELinux disabled. We can now re-edit the SELinux configuration file and fix our typo.


Scenario 2

Failed to load SELinux policy freezing. Well, that’s a new one – at least for me. So what went wrong?

While performing some configuration changes on one of my Linux hosts, I needed to temporarily disable SELinux to test. Easy enough, right? Edit /etc/selinux/config and change SELINUX to disabled.

Changes made, host rebooted. I go off to perform another task, and when I come back to check on it I cannot log in. I load up the console and it’s stuck at loading CentOS. When I pull up the console logs, I see this:

Failed to load SELinux policy freezing. Well, that’s a new one – at least for me. So what went wrong?

While performing some configuration changes on one of my Linux hosts, I needed to temporarily disable SELinux to test. Easy enough, right? Edit /etc/selinux/config and change SELINUX to disabled.

Changes made, host rebooted. I go off to perform another task, and when I come back to check on it I cannot log in. I load up the console and it’s stuck at loading CentOS. When I pull up the console logs, I see this:






Monday, February 1, 2021

Upgrade Oracle 11g to 19c using Expdp/Impdp

 

Upgrade Oracle 11.2.4 to 19.3.0 Using Expdp / Impdp


Example of Using Oracle Data Pump The steps for using Oracle Data Pump to upgrade or migrate a database have not changed from previous releases. If you would like to migrate with Oracle Data Pump using conventional dump files, the steps would be as follows: 

SQL> create directory bkup_dir as '/u02/oradb/bkup';

1. Export the source database to a dump file:

2.$ expdp srcadmin/password  DIRECTORY=bkup_dir DUMPFILE=expfulldb.dmp LOGFILE=expfulldb.log FULL=Y METRICS=Y PARALLEL=4 EXCLUDE=STATISTICS 

3. Make the dump file available on the destination system, either by copying it to the destination           

   system or placing it on a network-mounted disk. 

4. Create a CDB on the destination system, including a PDB into which you will import the source 

    database. 

5. In the destination PDB, create a directory object for the dump file to be imported.

6. SQL> create directory bkup_dir as '/u02/oradb/bkup'';

7. SQL> create user test identified by test123

 8. Import the Data Pump dump file into the destination PDB: 

$ impdp test/test123@pdb DIRECTORY=bkup_dir DUMPFILE=expfulldb.dmp LOGFILE=expfulldb.log PARALLEL=4 METRICS=Y LOGTIME=ALL 

In this example, we take advantage of Oracle Data Pump features such as the PARALLEL parameter to improve performance. In other cases, you might use network mode to eliminate the need for a dump file. Oracle Data Pump is fully documented in Oracle Database Utilities Guide.

Tuesday, January 26, 2021

Upgrade Oracle Application Express (APEX) manually.

I facing this error because running this scripts using full path like below example.

SQL>@/u02/app/oracle/product/11/db_home1/apex/apexins.sql SYSAUX SYSAUX temp /i/

(sp2-0310 unable to open file "coreins.sql")


First you have to go the apex directory and then run directly from SQL prompt

 cd /u02/app/oracle/product/11/db_home1/apex

sqlplus / as sysdba

SQL>@apexins.sql SYSAUX SYAAUX TEMP /i/


Recommendation 4: Upgrade Oracle Application Express (APEX) manually.

To upgrade to latest Application Express, download the latest version from the below link here

Upgrading APEX

Check the current APEX Version

SQL> Select Comp_name, status, Version

     From Dba_Registry

     where comp_id='APEX';

 

COMP_NAME                                STATUS       VERSION

---------------------------------------- ------------ ------------------------------

Oracle Application Express               VALID        3.2.1.00.12

 

SQL>

From the directory which holds the APEX unzipped software, connect to sqlplus as SYS user and run apexins.sql

cd /u01/app/oracle/product/11/db_home1/apex

sqlplus /as sysdba

SQL> @apexins.sql SYSAUX SYSAUX TEMP /i/





Saturday, January 16, 2021

Preupgrade command Fails with:"ERROR - Unable to run sqlplus due to:" (Doc ID 2246672.1)



 

[oracle@oraerptest19c bin]$ pwd

/u02/app/oracle/product/11.2.0/dbhome_1/jdk/bin

[oracle@oraerptest19c bin]$ /u02/app/oracle/product/11.2.0/dbhome_1/jdk/bin/java -jar /u02/softw-ora19c/rdbms/admin/preupgrade.jar FILE DIR /u02/preupgrade/

ERROR - Unable to run preupgrade due to: 

ERROR - the following error has been found: java.io.IOException: sqlplus: not found


Solution:

======


[oracle@oraerptest19c bin]$ export PATH=.:$ORACLE_HOME/bin:$PATH

[oracle@oraerptest19c bin]$ /u02/app/oracle/product/11.2.0/dbhome_1/jdk/bin/java -jar /u02/softw-ora19c/rdbms/admin/preupgrade.jar FILE DIR /u02/preupgrade/

==================

PREUPGRADE SUMMARY

==================

  /u02/preupgrade/preupgrade.log

  /u02/preupgrade/preupgrade_fixups.sql

  /u02/preupgrade/postupgrade_fixups.sql


Execute fixup scripts as indicated below:


Before upgrade:


Log into the database and execute the preupgrade fixups

@/u02/preupgrade/preupgrade_fixups.sql


After the upgrade:


Log into the database and execute the postupgrade fixups

@/u02/preupgrade/postupgrade_fixups.sql


Preupgrade complete: 2021-01-16T13:24:52

[oracle@oraerptest19c bin]$ 




ORA-01547 warning: RECOVER succeeded but OPEN RESETLOGS would get error below (Doc ID 1684437.1)


While Oracle DB recover getting below error.


RMAN> recover database;

Starting recover at  01-JAN-19

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

using channel ORA_DISK_4

using channel ORA_DISK_5

using channel ORA_DISK_6

using channel ORA_DISK_7

using channel ORA_DISK_8

starting media recovery

Oracle Error: 

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below

ORA-01194: file 1 needs more recovery to be consistent

ORA-01110: data file 1: '/u02/oradb/proddata/system01.dbf'


RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 01/01/2019 05:09:54

RMAN-06053: unable to perform media recovery because of missing log

RMAN-06025: no backup of archived log for thread 1 with sequence 91550 and starting SCN of 149247095 found to restore

RMAN-06025: no backup of archived log for thread 1 with sequence 91549 and starting SCN of 149235668 found to restore


I just move some missing archive log files to destination server.


RMAN> crosscheck archivelog all;


released channel: ORA_DISK_1

released channel: ORA_DISK_2

released channel: ORA_DISK_3

released channel: ORA_DISK_4

released channel: ORA_DISK_5

released channel: ORA_DISK_6

released channel: ORA_DISK_7

released channel: ORA_DISK_8

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=19 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=20 device type=DISK

allocated channel: ORA_DISK_3

channel ORA_DISK_3: SID=21 device type=DISK

allocated channel: ORA_DISK_4

channel ORA_DISK_4: SID=22 device type=DISK

allocated channel: ORA_DISK_5

channel ORA_DISK_5: SID=23 device type=DISK

allocated channel: ORA_DISK_6

channel ORA_DISK_6: SID=24 device type=DISK

allocated channel: ORA_DISK_7

channel ORA_DISK_7: SID=25 device type=DISK

allocated channel: ORA_DISK_8

channel ORA_DISK_8: SID=26 device type=DISK

validation succeeded for archived log

archived log file name=/u02/oradb/product/11.2.0/dbhome_1/dbs/arch1_91549_940168479.dbf RECID=90596 STAMP=1061762468

validation succeeded for archived log

archived log file name=/u02/oradb/product/11.2.0/dbhome_1/dbs/arch1_91550_940168479.dbf RECID=90597 STAMP=1061762775

Crosschecked 2 objects


RMAN> recover database;


Starting recover at 16-JAN-21

using channel ORA_DISK_1

using channel ORA_DISK_2

using channel ORA_DISK_3

using channel ORA_DISK_4

using channel ORA_DISK_5

using channel ORA_DISK_6

using channel ORA_DISK_7

using channel ORA_DISK_8


starting media recovery


unable to find archived log

archived log thread=1 sequence=91551

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 01/16/2021 05:17:16

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 91551 and starting SCN of 149248093


RMAN> alter database open resetlogs;


database opened


RMAN> 


Refer: Oracle (Doc ID 1684437.1)


SOLUTION

The ORA-01547 before database open indicates that Oracle sees the datafiles as inconsistent.  This is resolved by applying more recovery, to make the datafiles consistent.  


1. Check the current status of the datafiles:

set numwidth 30;

set pagesize 50000;

alter session set nls_date_format = 'DD-MON-RRRR HH24:MI:SS';

select status,checkpoint_change#,checkpoint_time, resetlogs_change#, resetlogs_time, count(*), fuzzy from v$datafile_header group by status,checkpoint_change#,checkpoint_time, resetlogs_change#, resetlogs_time, fuzzy;

The goal is to have the above query return 1 row and fuzzy column value as NO.


NOTE:  if checkpoint_change# in query returns 0, this indicates that Oracle cannot read the file header.  This is possibly because the location and name of the datafile within the controlfile is not the one on disk.  

2. Check the archivelog sequence numbers needed to recover the files.  Execute:

select min(fhrba_Seq), max(fhrba_Seq) from X$KCVFH;

This query will show the smallest and largest sequence needed by the datafiles.    To make the datafiles consistent, you must apply all archivelog files within the above range of sequence numbers.  This can be one or many archivelog files.  


NOTE:  This query will not be valid in a RAC environment.  In RAC, find the necessary sequences from all threads using the smallest (and largest) checkpoint_change# returned by the query in #1 and execute:


select thread#, first_change#, next_change# from v$archived_log where <smallest/largest checkpoint_change#> between first_change# and next_change#;


once the above is executed with the smallest and largest checkpoint_change#, you have the sequence range needed to be applied from all threads of the RAC database.  See Note 243760.1 'RMAN: RAC Backup and Recovery using RMAN' for more details.  


3. Once further recovery is applied, confirm the datafiles are consistent with query in #1, above, until the goal is accomplished.  

4. Once all datafiles are consistent and fuzzy=NO, the database can be opened and the ORA-01547 should no longer be returned.