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.