Wednesday, March 31, 2021

AIX :OPatch fails with "The java.library.path system variable is missing or invalid

AIX :OPatch fails with "The java.library.path system variable is missing or invalid OPatch failed with error code 255"


# $ORACLE_HOME/OPatch/opatch lsinventory
The java.library.path system variable is missing or invalid. Please set java.library.path with a correct value and retry the operation.

OPatch failed with error code 255



# $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.18

OPatch succeeded.

 
Issue is due to unpublished Bug 31050164 .





SOLUTION
~~~~~~~~~~~~~~~~~~
$ORACLE_HOME/OPatch/opatch lsinventory -jre $ORACLE_HOME/jdk

Note: Issue will be fixed in upcoming OPatch version 12.2.0.1.20



Refer ORACLE support note for more info ---  (Doc ID 2653020.1)







Tuesday, March 30, 2021

Oracle database Startup report ORA-00704 ORA-39714

Oracle database Startup report ORA-00704 ORA-39714 

Database failed to start, reported ORA-00704, ORA-39714 error


TRY below first

ORA-39714: upgrade script utlmmig.sql failed

Cause: A normal database open was attempted, but the upgrade script utlmmig.sql failed to complete.

Action: Use the UPGRADE option when opening the database and then run utlmmig.sql.




If not working, you can check the below workaround, but on own risk



Sqlplus/as SYSDBA

Sql*plus:release 12.1.0.2.0 Production on Thu Aug 7 08:15:35 2014

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition release 12.1.0.2.0 - 64bit Production
With the partitioning, OLAP, Advanced Analytics and real application testing options

Sql> Startup
ORACLE instance started.

Total System Global area 663945216 bytes
Fixed Size 2291808 bytes
Variable Size 369100704 bytes
Database buffers 289406976 bytes
Redo buffers 3145728 bytes
Database mounted.
Ora-01092:oracle instance terminated. Disconnection forced
Ora-00704:bootstrap Process Failure
Ora-39714:upgrade Script Utlmmig.sql failed
Process id:11592
Session Id:1 Serial Number:5



Alert Log Error
~~~~~~~~~~~~~~~~~~~~~~~~
Thu Aug 07 07:42:25 2014
Smon:enabling Cache Recovery
Thu Aug 07 07:42:25 2014
Errors in FILEAPPL/ORA12102/DIAG/RDBMS/PROD/PROD/TRACE/ORCL_ORA_11592.TRC:
Ora-39714:upgrade Script Utlmmig.sql failed
Thu Aug 07 07:42:25 2014
Errors in FILEAPPL/ORA12102/DIAG/RDBMS/PROD/PROD/TRACE/ORCL_ORA_11592.TRC:
Ora-00704:bootstrap Process Failure
Ora-39714:upgrade Script Utlmmig.sql failed
Thu Aug 07 07:42:25 2014
Errors in FILEAPPL/ORA12102/DIAG/RDBMS/PROD/PROD/TRACE/ORCL_ORA_11592.TRC:
Ora-00704:bootstrap Process Failure
Ora-39714:upgrade Script Utlmmig.sql failed
Thu Aug 07 07:42:25 2014
Error 704 happened during DB Open, shutting down database
USER (ospid:11592): Terminating the instance due to error 704




By analyzing the Utlmmig.sql script, 
the database will insert Bootstrap_upgrade_error related records in the props$ table before upgrading bootstrap$, 
and the database will detect the value when it is started, if it is found, The database can only start in upgrade mode, 
clean up the related records, the database can start normally



Sqlplus/as SYSDBA

Sql*plus:release 12.1.0.2.0 Production on Thu Aug 7 07:42:44 2014

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to a idle instance.

Sql> Startup upgrade
ORACLE instance started.

Total System Global area 663945216 bytes
Fixed Size 2291808 bytes
Variable Size 369100704 bytes
Database buffers 289406976 bytes
Redo buffers 3145728 bytes
Database mounted.
Database opened.


Sql> Delete from props$ where name = ' Bootstrap_upgrade_error ';

1 row deleted.

Sql> Delete from props$ where name = ' Logmnr_bootstrap_upgrade_error ';

0 rows deleted.

Sql> commit;

Commit complete.

Sql>


sql> shutdown Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.




Sql> Startup
ORACLE instance started.

Total System Global area 663945216 bytes
Fixed Size 2291808 bytes
Variable Size 369100704 bytes
Database buffers 289406976 bytes
Redo buffers 3145728 bytes
Database mounted.
Database opened.
Sql>



The database is successfully started, 
but because the Bootstrap$ object upgrade failed, there is a significant follow-up risk, we recommend the analysis of the cause of the error, 
and then continue to upgrade the bootstrap$ base table




Tuesday, March 16, 2021

OEM PRE SETUP PARAMETERS

OEM PRE SETUP PARAMETERS 

Set the PDB to auto-start.
sqlplus / as sysdba <<EOF
alter system set db_create_file_dest='${DATA_DIR}';
alter pluggable database ${PDB_NAME} save state;


-- Recommended minimum settings.
alter system set "_allow_insert_with_update_check"=true scope=both;
alter system set session_cached_cursors=200 scope=spfile;

 
-- Recommended: processes=600
alter system set processes=600 scope=spfile;


-- Recommended: pga_aggregate_target=1G
alter system set pga_aggregate_target=450M scope=spfile;


-- Recommended: sga_target=3G
alter system set sga_target=800M scope=spfile;


-- Recommended: shared_pool_size=600M
--alter system set shared_pool_size=600M scope=spfile;


-- For 12.1.0.2 set the following.
--alter system set optimizer_adaptive_features=false scope=both;


-- Should not be needed for 19c, but installer fails without them.
alter system set "_optimizer_nlj_hj_adaptive_join"= FALSE scope=both sid='*';
alter system set "_optimizer_strans_adaptive_pruning" = FALSE scope=both sid='*';
alter system set "_px_adaptive_dist_method" = OFF scope=both sid='*';
alter system set "_sql_plan_directive_mgmt_control" = 0 scope=both sid='*';
alter system set "_optimizer_dsdir_usage_control" = 0 scope=both sid='*';
alter system set "_optimizer_use_feedback" = FALSE scope=both sid='*';
alter system set "_optimizer_gather_feedback" = FALSE scope=both sid='*';
alter system set "_optimizer_performance_feedback" = OFF scope=both sid='*';


SHUTDOWN IMMEDIATE;
STARTUP;

exit;

EOF






NOTE:-
Please be cautious and careful, refer the oracle documents before setting hidden parameters

  



EM 13.4 : Input of Different Temp Location fails with 'Cannot find component oracle.jdk.'

 

EM 13.4 : Input of Different Temp Location fails with 'Cannot find component oracle.jdk.'
While performing EM 13.4 Fresh Installation

Input of a different Temp Directory Location fails with 'Cannot find component oracle.jdk.'

$ ./em13400_linux64.bin


ERROR: Temporary directory /tmp does not have enough free space. At least 12289 MB of free space are required.
Please input another directory or [Exit]: /data
ERROR: Cannot find component oracle.jdk.
ERROR: Cannot find components specified in JRE_COMPONENT=oracle.jdk,oracle.jre.
ERROR: Installer execution failed (1).


SOLUTION
~~~~~~~~~~~~~
it is bug and forllow workaround provided below
Bug 30232302 : 13.4 stack uptake EM installer fails to load OUI while providing alternate tmp space
refer (Doc ID 2637530.1)  for reference 


Provide -J-Djava.io.tmpdir option for the new tmp directory location.

Example:
~~~~~~~~~~~~~
$ ./em13400_linux64.bin -J-Djava.io.tmpdir=/data