Oracle DBA Tips and Techniques

By Arjun Raja

Archive for July, 2011

Web login mandatory patch for 10.3.2

Posted by Arjun Raja on July 22, 2011

Once Web Logic 10.3.2 is installed, a mandatory patch is also required to be installed.

The metalink note point is 1072763.1

The patch mentioned in this note is WDJ7.

However since I did not have an internet connection from my AIX server, I decided to use the offline option instead of the smart update GUI option..

I downloaded the patch in the note – wdj7.zip but this file is corrupt – it does not unzip….so don’t waste time downloading this file.

The trick is to download the following patch from Metalink – it is the same as WDJ7.

The patch is 9438213 – search under ” Patches and Updates” tab in Metalink.

Download the patch- p9438213_10320_Generic.zip and copy it to your AIX server under the WLS_HOME/utils/bsu/cache_dir

The directory cache_dir will not exist in a fresh installation so create it.

cd /u01/oracle/Middleware/utils/bsu/cache_dir

unzip p9438213_10320_Generic.zip

Creates the foll files –

XLXA.jar
README.txt
NIXN.jar
4D53.jar
patch-catalog_15563.xml

– A glance of the README.txt fill confirm this patch is indeed the same as WDJ7 –

This patch contains Smart Update patch WDJ7 for WebLogic Server 10.3.2.0

Description:
============
Mandatory Patch required on WLS 10.3.2 for Oracle Grid Control (GC) 11.1 install

Now start the process of applying the patch –

Make sure the file bsu.sh is edited to avoid a java error –

vi /u01/oracle/Middleware/utils/bsu/bsu.sh

This is the original file –

#!/bin/sh

JAVA_HOME=”/usr/java6″

“$JAVA_HOME/bin/java” -jar patch-client.jar $*

But if I use this file – I get this error –

Exception in thread “main” java.lang.NoClassDefFoundError:
com.bea.plateng.patch.Patch
Caused by: java.lang.ClassNotFoundException: com.bea.plateng.patch.Patch at java.net.URLClassLoader.findClass(URLClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:653)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:346) at java.lang.ClassLoader.loadClass(ClassLoader.java:619)
Could not find the main class: com.bea.plateng.patch.Patch. Program will exit.

So I edited the file and forced it to use the patch-client.tar file under the bsu directory.

#!/bin/sh

JAVA_HOME=”/usr/java6″

“$JAVA_HOME/bin/java”
-jar /u01/oracle/Middleware/utils/bsu/patch-client.jar $*

Then there is no java error …..

Now apply patch…

cd /u01/oracle/Middleware/utils/bsu

./bsu.sh -prod_dir=/u01/oracle/Middleware/wlserver_10.3 -patch_download_dir=/u01/oracle/Middleware/utils/bsu/cache_dir -patchlist=4D53,NIXN, ,XLXA -verbose -install -log=/tmp/error.log

If fails with errors –

Encountered unrecognized patch ID: 4D53

Encountered unrecognized patch ID: NIXN

Encountered unrecognized patch ID: XLXA

To fix this –

Rename the file patch-catalog_15563.xml as patch-catalog.xml in the cache_dir .

It worked after that.

emrep:/u01/oracle/Middleware/utils/bsu/cache_dir> ls -lrt

-rw-r–r– 1 oracle dba 6585309 Jun 10 18:31 patch-catalog.xml
-rw-r–r– 1 oracle dba 4904 Jun 10 18:31 XLXA.jar
-rw-r–r– 1 oracle dba 449 Jun 10 18:31 README.txt
-rw-r–r– 1 oracle dba 3652 Jun 10 18:31 NIXN.jar
-rw-r–r– 1 oracle dba 8683 Jun 10 18:31 4D53.jar

emrep:/u01/oracle/Middleware/utils/bsu/cache_dir>
cd /u01/oracle/Middleware/utils/bsu

emrep:/u01/oracle/Middleware/utils/bsu> ./bsu.sh -prod_dir=/u01/oracle/Middleware/wlserver_10.3
-patch_download_dir=/u01/oracle/Middleware/utils/bsu/cache_dir -patchlist=4D53,NIXN, XLXA -verbose -install -log=/tmp/error.log

Checking for conflicts..
No conflict(s) detected

Starting installation of Patch ID: 4D53
Installing /u01/oracle/Middleware/utils/bsu/cache_dir/4D53.jar Extracting /u01/oracle/Middleware/patch_wls1032/patch_jars/Bug9100465_1032.jar

Updating /u01/oracle/Middleware/patch_wls1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar

Old manifest value: Class-Path=
New manifest value: Class-Path=../../../patch_jars/Bug9100465_1032.jar Result: Success

Starting installation of Patch ID: NIXN
Installing /u01/oracle/Middleware/utils/bsu/cache_dir/NIXN.jar Extracting /u01/oracle/Middleware/patch_wls1032/patch_jars/bug8990616_1032.jar

Updating /u01/oracle/Middleware/patch_wls1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar

Old manifest value: Class-Path=../../../patch_jars/Bug9100465_1032.jar New manifest value:
Class-Path=../../../patch_jars/bug8990616_1032.jar ../../../patch_jars/Bug9100465_1032.jar

Result: Success

Starting installation of Patch ID: XLXA
Installing /u01/oracle/Middleware/utils/bsu/cache_dir/XLXA.jar Extracting /u01/oracle/Middleware/patch_wls1032/patch_jars/Bug9221722_1032.jar

Updating /u01/oracle/Middleware/patch_wls1032/profiles/default/sys_manifest_classpath/weblogic_patch.jar

Old manifest value:
Class-Path=../../../patch_jars/bug8990616_1032.jar ../../../patch_jars/Bug9100465_1032.jar

New manifest value:
Class-Path=../../../patch_jars/Bug9221722_1032.jar ../../../patch_jars/bug8990616_1032.jar ../../../patch_jars/Bug9100465_1032.jar

Result: Success

emrep:/u01/oracle/Middleware/utils/bsu>

Posted in Backup and Recovery, Uncategorized | Tagged: , , | 2 Comments »

DATAPUMP – KILL JOBS ONLY USING THE DATAPUMP TOOL.

Posted by Arjun Raja on July 12, 2011

Killing an expdp or impdp process from the oslevel will not stop the job – so expdp or impdp jobs must be killed from the database level.

Example ?

Start an import job…..

Check the dba_datapump_jobs view…

sql > select job_name,state from dba_datapump_jobs;

Look for your job –

Job: SYS_IMPORT_SCHEMA_01

Owner: SYSTEM

Operation: IMPORT

Creator Privs: TRUE

GUID: A5E1F1E133EB0030E0430A35C8EC0030

Start Time: Friday, 17 June, 2011 12:37:39

Mode: SCHEMA

Instance: cmi1d

Max Parallelism: 1

EXPORT Job Parameters:

CLIENT_COMMAND system/******** directory=cmid schemas=EBS_FA_ARCHIVE dumpfile=ebs_fa.dmp logfile=ebsfa.log

IMPORT Job Parameters:

Parameter Name Parameter Value:

CLIENT_COMMAND system/******** schemas=ebs_fa_archive dumpfile=ebs_fa.dmp logfile=ebs_fa.log directory=cmid table_exists_action=replace

TABLE_EXISTS_ACTION REPLACE

State: EXECUTING

Bytes Processed: 1,022,819,072

Percent Done: 46

Current Parallelism: 1

Job Error Count: 0

Dump File: /u02/oradata/export/ebs_fa.dmp

Worker 1 Status:

Process Name: DW02

State: EXECUTING

Object Schema: EBS_FA_ARCHIVE

Object Name: FA_ASSETS_N1

Object Type: SCHEMA_EXPORT/TABLE/INDEX/INDEX

Worker Parallelism: 1

Import> KILL_JOB

Are you sure you wish to stop this job ([yes]/no): yes

When attaching a job -make sure you login with same user as user who ran the job.

Posted in Uncategorized | Leave a Comment »