Archive

Author Archive

How to Resolve “ORA-29548: Java system class reported” in 12c?

November 5, 2017 Leave a comment

Hello,

After applying PSU to 12.1.0.2.0, the application gets following error.

[Error] Execution (1: 1): ORA-29548: Java system class reported: release of classes.bin in the database does not match that of the oracle executable
ORA-06512: at “MDSYS.SDO_JAVA_STP”, line 370
ORA-06512: at “MDSYS.SDO_UTIL”, line 3188
ORA-06512: at “MDSYS.SDO_UTIL”, line 3211

When I checked the alert log file, it puts following messages.

joxcsys: release mismatch 12.1.0.2.160719 1.6 in database (classes.bin) vs 12.1.0.2.0 1.7 in executable

I checked any INVALID objects. But everything was OK. I did a small test about Java.

SQL> select dbms_java.get_jdk_version() from dual
*
ERROR at line 1:
ORA-29548: Java system class reported: release of classes.bin in the database
does not match that of the oracle executable

There was a problem with my java. Don’t worry about that there is a solution. Please run below script as sysdba.

SQL> @?/javavm/install/update_javavm_db.sql
SQL> SET FEEDBACK 1
SQL> SET NUMWIDTH 10
SQL> SET LINESIZE 80
SQL> SET TRIMSPOOL ON
SQL> SET TAB OFF
SQL> SET PAGESIZE 100
SQL>
SQL> alter session set “_ORACLE_SCRIPT”=true;

Session altered.

SQL>
SQL> — If Java is installed, do CJS.
SQL>
SQL> — If CJS can deal with the SROs inconsistent with the new JDK,
SQL> — the drop_sros() call here can be removed.
SQL> call initjvmaux.drop_sros();

Call completed.

SQL>
SQL> create or replace java system;
2 /

Java created.

SQL>
SQL> update dependency$
2 set p_timestamp=(select stime from obj$ where obj#=p_obj#)
3 where (select stime from obj$ where obj#=p_obj#)!=p_timestamp and
4 (select type# from obj$ where obj#=p_obj#)=29 and
5 (select owner# from obj$ where obj#=p_obj#)=0;

0 rows updated.

SQL>
SQL> commit;

Commit complete.

SQL>
SQL> alter session set “_ORACLE_SCRIPT”=false;

Session altered.

SQL>

Now, let’s do a test again.

SQL> select dbms_java.get_jdk_version() from dual;

DBMS_JAVA.GET_JDK_VERSION()
——————————————————————————–
1.7.0_51

1 row selected.

SQL> select dbms_java.longname(‘TEST’) from dual
2 ;

DBMS_JAVA.LONGNAME(‘TEST’)
——————————————————————————–
TEST

1 row selected.

SQL>

 

Hımm. It looks good. My application is also running.

Advertisements

let’s meet at Kutahya Dumlupinar University “Dev Fest 2017” Event!

October 19, 2017 Leave a comment

How to Rewind an OPEN RESETLOGS Operation with Flashback Database?

October 9, 2017 Leave a comment

Hi,

Steps for using Flashback Database to reverse an unwanted “ALTER DATABASE OPEN RESETLOGS” statement is similar to “FLASHBACK DATABASE”. You will use “FLASHBACK DATABASE TO BEFORE RESETLOGS” statement. Of course you must enable flashback database before performing “ALTER DATABASE OPEN RESETLOGS” operation.

To undo an OPEN RESETLOGS operation:

1. Connect SQL*Plus to the target database and verify that the beginning of the flashback window is earlier than the time of the most recent OPEN RESETLOGS. Run the following queries:

SELECT RESETLOGS_CHANGE#
FROM V$DATABASE;

SELECT OLDEST_FLASHBACK_SCN
FROM V$FLASHBACK_DATABASE_LOG;

If RESETLOGS_CHANGE# is greater than OLDEST_FLASHBACK_SCN, then you can use Flashback Database to reverse the OPEN RESETLOGS operation

2. Shut down the database,

SHUTDOWN IMMEDIATE;

3. mount it

STARTUP MOUNT;

4. Recheck the flashback window. If the resetlogs SCN is still within the flashback window, then proceed to the next step.
Connect RMAN to the target database.
rman target /

5. Perform a flashback to the SCN immediately before the RESETLOGS. You can use the following FLASHBACK DATABASE command:

FLASHBACK DATABASE TO BEFORE RESETLOGS;

As with other uses of FLASHBACK DATABASE (until SCN, until TIME, etc.), if the target SCN is before the beginning of the flashback database window, an error is returned and the database is not modified. If the command completes successfully, then the database is left mounted and recovered to the most recent SCN before the OPEN RESETLOGS operation in the previous incarnation.

6. Open the database read-only in SQL*Plus and perform queries to ensure that the effects of the logical corruption have been reversed.

ALTER DATABASE OPEN READ ONLY;

7. To make the database available for updates again, shut down the database, mount, and open the database with RESETLOGS.

ALTER DATABASE OPEN RESETLOGS;

let’s meet at Kocaeli University Information Technology Club “IT Fest 2017” Event!

September 26, 2017 Leave a comment

Flashing Back an Activated Standby Database (Primary) into a Physical Standby Database

September 24, 2017 Leave a comment

Hi,

One of my critical primary database was gone to the down due to an uncertain cause. We couldn’t open it.  I started the recovery on primary. During recovery, We also enabled flashback database and activated the standby as primary. When our team controls the new primary (activated standby database) the old primary is recovered and opened. We decided to use the old primary. But we activated standby database and want to back it  into physical standby.

Assume that a failover has been performed to a physical standby database and that Flashback Database was enabled at the time of the failover. The following steps bring the activated standby database (Now it is primary) back into the Oracle Data Guard configuration as a physical standby database.

On the new primary database, issue the following query to determine the SCN at which the old standby database became the new primary database:

SQL> SELECT TO_CHAR(STANDBY_BECAME_PRIMARY_SCN) FROM V$DATABASE;

Shut down the activated standby database mount it, and flash it back to the value for STANDBY_BECAME_PRIMARY_SCN that was determined in the previous step.

SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> FLASHBACK DATABASE TO SCN standby_became_primary_scn;

To convert the database to a physical standby database, issue the following statement on the activated standby database:

SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;

To start transporting redo to the new physical standby database, perform the following steps on the primary database:

Issue the following query to see the current state of the archive destinations:

SQL> SELECT DEST_ID, DEST_NAME, STATUS, PROTECTION_MODE, DESTINATION, ERROR,SRL FROM V$ARCHIVE_DEST_STATUS;

Enable the destination:

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_n=ENABLE;

Ensure the standby database begins receiving redo data from the primary database, and verify it was sent successfully.

Start Redo Apply on the physical standby database:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;

Redo applying automatically stops each time it encounters a redo record that is generated as the result of a role transition, so Redo Apply needs to be restarted one or more times until it has applied beyond the SCN at which the primary database became the primary database.

How to Change Lost SYSMAN Password On OEM Cloud Control 13c?

September 16, 2017 Leave a comment

Hi,

To change lost SYSMAN password on Oracle Enterprise Manager 13c, follow the below steps:

1- Change the password from SQL*Plus

alter user sysman identified by “oracle_test”;

2-Go to middleware home directory

cd /u01/app/oracle/middleware/bin/
./emctl config oms -list_repos_details
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
Repository Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=oem13c)(PORT=1521)))(CONNECT_DATA=(SID=emrep)))
Repository User : SYSMAN

3- Change the password as the following command

./emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd oracle_test -new_pwd oracle_test
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.

Changing passwords in backend …
Passwords changed in backend successfully.
Updating repository password in Credential Store…
Successfully updated Repository password in Credential Store.
Restart all the OMSs using ’emctl stop oms -all’ and ’emctl start oms’.
Successfully changed repository password.

4- Restart the OMS

./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

./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 Successfully Started
BI Publisher Server is Up

How to Resolve ‘Null Pointer Exception’ Error On Top Activity Page In Oracle Enterprise Manager 13c

September 9, 2017 Leave a comment

Hi,

When you login  Oracle Enterprise Manager 13c, the top activity page shows ‘Null Pointer Exception’ errors.   This is due to bug number 25455462. You can do following steps to resolve this issue.

oem13c_error

1-Set the following property on OEM 13c machine

emctl set property -name use_pooled_target_connections -value false

2-Restart the oms

cd <OMS_HOME>/bin

(cd /u01/app/oracle/middleware/bin/)

./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

./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 Successfully Started
BI Publisher Server is Up

%d bloggers like this: