Tuesday, May 10, 2016

HANGANALYZE and SYSTEMSTATE Dumps.

sqlplus -prelim “/as sysdba”
SQL> ORADEBUG SETORAPNAME DIAG
ORACLE PID: 7, UNIX PROCESS PID: 24593, IMAGE: ORACLE@MRPGTESTDB01 (DIAG)
SQL> ORADEBUG SETOSPID 24593
SQL> ORADEBUG DUMP HANGANALYZE 3
SQL> ORADEBUG TRACEFILE_NAME
/u01/app/oracle/diag/rdbms/tstrms/tstrms/trace/tstrms_diag_24593.trc
SQL> OORADEBUG SETMYPID
SQL> OORADEBUG UNLIMIT
SQL> OORADEBUG DUMP SYSTEMSTATE 266
SQL> OORADEBUG DUMP SYSTEMSTATE 266
SQL> OORADEBUG TRACEFILE_NAME
SQL> exit
Disconnected from ORACLE

Saturday, February 13, 2016

BEA-149205 Failed to initialize the application 'reports

weblogic.management.DeploymentException:
        at weblogic.application.internal.flow.BaseLifecycleFlow$CreateListenerAction.run(BaseLifecycleFlow.java:184)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.application.internal.flow.BaseLifecycleFlow$BaseAction.invoke(BaseLifecycleFlow.java:112)
        at weblogic.application.internal.flow.HeadLifecycleFlow.createListener(HeadLifecycleFlow.java:117)
        Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: oracle.reports.admin.runtime.lifecycle.ReportsVersionLifecycleListener
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
        at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
        Truncated. see log file for complete stacktrace


If this error is observed during the starup of weblogic server,the reason is of incorrect CLASSPATH. Validate the classpath from the log and try to re-start the application

Friday, November 20, 2015

Using expdp to export (only) data

Many a times we need to export the data from a schema/database.Following expdp command could be used for achieving it


expdp scott/tger  directory=DATA_DUMP  dumpfile=Scott.dmp logfile=Scott.log schemas=scott content=data_only

Thursday, November 19, 2015

Truncate table using synonyms

Had migrated a new set of code into our test instance,which had  truncate statement.This truncate procedure and  the table to be truncated were on separate schema.

Error was as below:

Error report -
SQL Error: ORA-00942: table or view does not exist
00942. 00000 -  "table or view does not exist"

Had created all the synonyms and also granted "DROP ANY TABLE" privilege to owner of the procedure.

As part of troubleshooting it was found that we cannot truncate a table through its synonym.Need to prefix the schema name of the object for the truncate to happen.

"Synonyms cannot be used in a drop table, drop view or truncate table/cluster statements." - http://www.adp-gmbh.ch/ora/concepts/synonyms.html


Tuesday, September 15, 2015

FRM-92091: unexpected fatal error in client-side Java code

FRM-92091: unexpected fatal error in client-side Java code
Java Exception:
java.lang.IllegalArgumentException: Attempt to read in an object of type 61440

Did a exhaustive search for this error in the net and also in My Oracle Support but without any results.Even application server logs was not giving any useful information.Even performed forms trace,but that just showed that network connection is getting disrupted.


Finally was able to find that main reason for this error is the tokens that are used for authentication are getting invalidated.Provided that you are running the application in Single Sign On mode.


Solution :  To increase token validity period in Oracle Access Manager server.

Reset Weblogic Admin Password

Following steps to be performed to update Weblogic Admin Password.

- Login to Console

- Security Realm->MyRealm->Users And Groups->Username->Password- Modifiy the password.

- Domains ->Security->General->Advanced->Update Node Manager Password

- Shutdown the instance

- Go to Domain_Home/servers/Admin/Security/
  Update boot.properties with the updated password and user id.

- Update the boot.properties file present in all ManagedServerHome/Security.

- Start the Admin Server.

- Start the Managed Servers.

--------------------------------------------------------------------------------------------------------------------------
In case if there are errors regarding authentication during the startup of Managed Servers,rename the existing ManagedServerHome/Data/ folder and re-try the activity.More details are present in this page: http://anoopbal.blogspot.com/2015/09/managed-server-startup-failed.html
--------------------------------------------------------------------------------------------------------------------------

Monday, September 14, 2015

Managed Server Startup Failed


Managed server startup failed after an admin user password update.Logs in the server has below entries:

weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:960)
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1054)
        at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:888)
        at weblogic.security.SecurityService.start(SecurityService.java:141)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: javax.security.auth.login.FailedLoginException: [Security:090304]Authentication Failed: User rmswladmin javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User rmswladmin denied
        at weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:261)
        at com.bea.common.security.internal.service.LoginModuleWrapper$1.run(LoginModuleWrapper.java:110)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.bea.common.security.internal.service.LoginModuleWrapper.login(LoginModuleWrapper.java:106)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762)
        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687)
        at javax.security.auth.login.LoginContext.login(LoginContext.java:595)



Solution for this issue is to perform the below:

- Backup the $MANAGED_SERVER_HOME/data/ldap
- Rename/Delete ldap folder.
- Update the $MANAGED_SERVER_HOM/security/boot.properties with password and user id.
- Startup the managed server.

Sunday, June 03, 2012

Restoring Archive Logs to a Different Location


In situations where the archived redo logs need to  be restored to a different location, from an existing backup, following steps could be followed.

1.Load the profile of the the database whose archivelog needs to be restored.
2.Connect to rman client.
@:oracle:/home/oracle> rman

Recovery Manager: Release 11.2.0.1.0 - Production on Thu May 31 10:05:37 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

3.Connect to target database.

RMAN> connect target /

connected to target database: PROD (DBID=3162812738)

4.Connect to catalog database.
RMAN> connect catalog rman/rman@RMAN

connected to recovery catalog database

5.Execute the below scripts to restore archivelogs from sequence 100278 to 100298 at location  '/stage'
RMAN>run
>{
>set archivelog destination to '/stage';
>restore archivelog from logseq 100278 until logseq 100298;
>}

executing command: SET ARCHIVELOG DESTINATION

Starting restore at 31-MAY-12
configuration for SBT_TAPE channel 2 is ignored
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=1556 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.5.2.0
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=16 device type=DISK

channel ORA_SBT_TAPE_1: starting archived log restore to user-specified destination
archived log destination=/home/oracle
channel ORA_SBT_TAPE_1: restoring archived log
archived log thread=1 sequence=98529
channel ORA_SBT_TAPE_1: reading from backup piece arch_784714064_61569_1
channel ORA_SBT_TAPE_1: piece handle=arch_784714064_61569_1 tag=TAG20120531T080713
channel ORA_SBT_TAPE_1: restored backup piece 1
channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:02:15
Finished restore at 31-MAY-12

RMAN>

6.Restore activity completed.