Friday, September 27, 2013

ORA-04031 during IMPDP 11g

Scenario:

Received the following error while trying to import data using datapump.

ORA-39097: Data Pump job encountered unexpected error -4031
ORA-39065: unexpected master process exception in MAIN
ORA-04031: unable to allocate 2024 bytes of shared memory ("streams pool","unknown object","streams pool","kodpaih3 image")
Job "SYS"."SYS_IMPORT_FULL_01" stopped due to fatal error at 11:19:39

Version:

Oracle EE 11.2.0.2.0

Reason:

The ORA-4031 error message in the above error stack, indicates a problem with the Streams pool. The database, where the operation failed, was set to follow AMM and individually  STREAMS_POOL_SIZE instance parameter was set to 0. Data Pump operations utilize the Oracle Streams pool and the size of the stream role in ideal case should be increased automatically on demand. In this case that has not happened and resulted in the above error.

Solution:

Set STREAMS_POOL_SIZE>0 to guarantee a minimum size for the streams pool when using DB  that is set to use AMM (or even ASSM).

alter system set streams_pool_size=150m;

Restarted the IMPDP operation. This time the ORA-4031 errors were missing.

 

Thursday, September 26, 2013

How to change the weblogic Admin server port number

Task:

To change the port number of weblogic Admin server. The port number was set to the default value of 7001.

Version:

Weblogic 12.1.2.0.0

Action:

The easiest method is to simply update the port number in the weblogic conole page and save the change. 

Connect to weblogic conole using the current port number

Eg: http:<hostname>:7001/console

Navigate to Servers => Click on the AdminServer(admin)
We would be at the configuration tab of AdminServer now. Just update the value in the Listen Port: column to new value. For eg: 7010 and then click Save button, available at the bottom of that page. That would make the trick.

We can immediately verify the change by accessing the URL through the new port number. But the page would be accessible through both new and old port numbers until we restart the AdminServer. So better to restart the AdminServer so that the console URL is accessible only through the modified port number.

Alternative Approach:

Add the port number in the config.xml file.

Stop the weblogic services. Take a backup of config.xml file. If we are using the default port number of 7001, then its entry would not be there in the file. So we have to add the tags to reflect the new port number.

Add following two lines to the config.xml under <Server> <name>AdminServer</name> tag

<listen-port>7010</listen-port>
<listen-port-enabled>true</listen-port-enabled>

Restart the AdminServer. Now it would be running in new port


Wednesday, September 18, 2013

Command to find weblogic version

Command:

weblogic.version

Usage:

   1. Source the environment variables

       . $WL_HOME/server/bin/setWLSEnv.sh

   2. Issue weblogic.version command

       java weblogic.version

Output:

WebLogic Server 10.3.6.0.5 PSU Patch for BUG16619891 Tue Apr 23 13:24:29 IST 2013
WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 

Use 'weblogic.version -verbose' to get subsystem information

Use 'weblogic.utils.Versions' to get version information for all modules


You can use "java weblogic.version -verbose" and "java weblogic.utils.Versions" to get more granule level details.
In the above example the weblogic version is 10.3.6.0.5 with Jul 2013 PSU applied.

Change GLOBAL_NAME in oracle database

Scenario:


Wanted to change the global_name of a database, which was having SID + Domain name. 

Version: 12.1.0.1.0 (Applicable to all versions)

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ORCL.MYDOMAIN.COM

Official documents mentioned to use "ALTER DATABASE RENAME GLOBAL_NAME TO <NEW_NAME>;" which did not work in my case.

Solution:

Since global_name is a table, from where we query for the global_name, we can update it to make changes.

SQL> desc global_name
 Name                                          Null?    Type
 ----------------------------------------- -------- ----------------------------
 GLOBAL_NAME                                        VARCHAR2(4000)

SQL> update global_name set global_name='ORCL';

1 row updated.

SQL> commit;

Commit complete.

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
ORCL

Tuesday, September 10, 2013

Linux-x86_64 Error: 12: Cannot allocate memory on RAC conversion using rconfig in NFS mount

Scenario:

A stand alone database is getting converted to RAC/ASM using rconfig command, which internally uses RMAN for the conversion.
DB Version: 11.2.0.3.0

The DB conversion was failing every time on the redo logs addition phase of the conversion.
The source database was in an NFS shared storage. And the conversion was to an Exadata box.

Error:

ORA-00321: log 1 of thread 1, cannot update log file header
ORA-00312: online log 1 thread 1: '/redo_log_path/log3.dbf'
ORA-27072: File I/O error
Linux-x86_64 Error: 12: Cannot allocate memory


Verification:

Since there was not much beyond the above mentioned error in any of the log files, it was difficult to fix the issue. The DB folder had to be physically removed from the ASM instance each time rconfig was run, on the basis of a trial and error approach. This is because the DB instance creation was succesfull every time when rconfig is run.

Luckily we got hold of a support doc which had resemblance with the issue we had.

The Doc ID: 1532488.1 was about failure of RMAN and EXPDP in NFS mount, when Exadata11.2.3.2.1 image is used.

Solution:

Applied patch 16432033 on all compute nodes.
Restarted the RAC conversion after restoring DB from a backup

The patch helped in fixing the error and RAC/ASM conversion was successful.

Note: The patch is not persistent across reboots.  If the system is rebooted, the customer needs to reapply the patch each time