Oraclue

Oracle internals, debugging and undocumented features

Category Archives: Troubleshooting

Patch WDJ7 and “Unable to verify your status” error

According to Oracle Documentation WebLogic ( which is now part of new OEM 11g grid install )  must be updated with patch WDJ7.

When we tried  to authenticate to my Oracle Support with the smart update GUI I received an error message “Unable to verify your status“.

After some time dealing with this error and troubleshooting  I decided that easiest way is open service request and request  to download patch  WDJ7 .

Unfortunately I cannot place file here but if you have Oracle support they will send you a link to download it.Once you get a file you can manually install it.

Below are instructions to download and install.

1. Download the WLS WDJ7 patch (wls_patch.zip file provided by Oracle Support ) and unzip under  WLS_ORACLE_HOME/utils/bsu/cache_dir

2. Apply the patch by running the following command:

./bsu.sh -prod_dir=WLS_ORACLE_HOME/wlserver_10.3 -patchlist=patch number -verbose -install

For example:

./bsu.sh -prod_dir=/scratch/gc/Oracle/Middleware/wlserver_10.3 -patchlist=WDJ7 -verbose -install

Note: Since the patch WDJ7 is a MLR patch for other 3 patches, you will see that all the 3 patches are applied in a single go with status: Success

3. You can view the report of applied patched by running the following command:-
./bsu.sh -report -patch_id_mask=patch number

For example: ./bsu.sh -report -patch_id_mask=WDJ7

Advertisements

Tracing Database Replay

SQL> alter session set events ‘trace[rat_wcr.*] disk=high’;

Session altered.

SQL> BEGIN dbms_workload_capture.start_capture(UNISTR(‘CAPTURE-demo-20100601134908’),UNISTR(‘DATA_PUMP_DIR’), 60, ‘INCLUDE’, FALSE); END;
/

PL/SQL procedure successfully completed.

SQL> alter session set events ‘trace[rat_wcr.*] off’;

Session altered.

and trace file ( just a snippet ) looks like: Read more of this post

ORA-00752 on standby and DB_ULTRA_SAFE parameter

Alert file from standby database got following messages:

ORA-00752: recovery detected a lost write of a data block
ORA-10567: Redo is inconsistent with data block (file# 8, block# 351475)
ORA-10564: tablespace TD_DATA
ORA-01110: data file 8: ‘+TD_DATA/test/datafile/test01.dbf’
ORA-10561: block type ‘TRANSACTION MANAGED DATA BLOCK’, data object# 105684

and second part

ORA-10877: error signaled in parallel recovery slave PR00
ORA-00752: recovery detected a lost write of a data block
MRP0: Background Media Recovery process shutdown (test1)

The alert file  shows that an ORA-00752 error is raised on the standby database
and the managed recovery is cancelled:

The recommended procedure to recover from such errors is a failover to the physical standby!!!

If you read Oracle Documentation

http://download.oracle.com/docs/cd/B28359_01/server.111/b28294.pdf

Chapter 13.6

During media recovery in a Data Guard configuration, a physical standby database
can be used to detect lost-write data corruption errors on the primary database. This is
done by comparing SCNs of blocks stored in the redo log on the primary database to
SCNs of blocks on the physical standby database. If the SCN of the block on the
primary database is lower than the SCN on the standby database, then there was a
lost-write error on the primary database. Read more of this post

On Database Trigger and current schema issue

I run into this issue few months ago:

Login as sysdba

bash-3.2$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jan 5 15:13:49 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>  create table test as select * from dba_tables;
create table test as select * from dba_tables
*
ERROR at line 1:
ORA-01950: no privileges on tablespace ‘USERS’

or try to compile invalid objects:

SQL>  @?/rdbms/admin/utlrp.sql
SELECT dbms_registry_sys.time_stamp(‘utlrp_bgn’) as timestamp from dual
*
ERROR at line 1:
ORA-00904: “DBMS_REGISTRY_SYS”.”TIME_STAMP”: invalid identifier

——–

PL/SQL procedure successfully completed.

I got a bunch of errors.It seems that SYSDBA  does not have enough privileges to run this code.

SQL> show user
USER is “SYS”
Read more of this post

Tracing Oracle Data Guard

Data Guard Broker (DGMGRL) can connect to database using following options:

-echo
-silent
-xml
-debug
-logfile

So if I need to run dgmgrl command in debug mode I would execute following :

dgmgrl -debug / or

-bash-3.2$ dgmgrl -debug sys/secret@test

DGMGRL for Linux: Version 11.2.0.1.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
[W000 01/05 12:27:03.81] Connecting to database using test.
[W000 01/05 12:27:03.85] Executing query [select dbms_drs.dg_broker_info('VERSION') from dual].
[W000 01/05 12:27:03.86] Query result is '11.2.0.1.0'
Connected.

or dgmgrl  -debug / shutdown command  will shutdown instance ,generate trace file and then exit.

If Data Guard Broker is used then tracing can be enabled using DGMGRL command
and setting property LogArchiveTrace to value other than 0.

/** Tracing primary site **/

DGMGRL> edit database ‘primary_db_name’ set property LogArchiveTrace=’1′;

/** Tracing standby site **/

DGMGRL> edit database ‘standby_db_name’ set property LogArchiveTrace=’1′;

Also this parameter can be set by issueing a SQL statement :

SQL> ALTER SYSTEM SET LOG_ARCHIVE_TRACE=1;

Values are described in table bellow:

Level Meaning
0 Disables archived redo log tracing (default setting)
1 Tracks archiving of log files
2 Tracks archive status by archive log file destination
4 Tracks archive operational phase
8 Tracks archive log destination activity
16 Tracks detailed archive log destination activity
32 Tracks archive log destination parameter modifications
64 Tracks ARCn process state activity
128 Tracks FAL server process activity
256 Tracks RFS Logical Client
512 Tracks LGWR redo shipping network activity
1024 Tracks RFS physical client
2048 Tracks RFS/ARCn ping heartbeat
4096 Tracks real-time apply activity
8192 Tracks Redo Apply activity (media recovery or physical standby)