Thursday 29 June 2017

Corrupt block relative dba message in the Alert Log - Definition and Solution

What is the meaning of message "Corrupt block relative dba..." in the alert log?

message describing the block corruption:


Bad header found during buffer read
Data in bad block:
type: 2 format: 2 rdba: 0x21008dd0
last change scn: 0x0006.12114f8e seq: 0x37 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x4f8e0237
check value in block header: 0x6e5b
computed block checksum: 0x0
Reread of rdba: 0x3d808dd0 (file 246, block 36304) found same corrupted data
Errors in file /testsite/testdb/db/tech_st/11.1.0/admin/TEST_erptestappldb/diag/rdbms/test/TEST/trace/TEST_s000_11075614.trc
(incident=31537):
ORA-01578: ORACLE data block corrupted (file # 246, block # 36304)
ORA-01110: data file 246: '/testsite/testdb/db/apps_st/data/a_txn_data47.dbf'
Incident details in: /testsite/testdb/db/tech_st/11.1.0/admin/TEST_erptestappldb/diag/rdbms/test/TEST/incident/incdir_31537/T
EST_s000_11075614_i31537.trc
Wed Jun 28 11:42:12 2017
Corrupt Block Found
TSN = 10, TSNAME = APPS_TS_TX_DATA
RFN = 246, BLK = 36304, RDBA = 1031835088
OBJN = 87982, OBJD = 87982, OBJECT = OE_ORDER_HEADERS_ALL, SUBOBJECT =
SEGMENT OWNER = ONT, SEGMENT TYPE = Table Segment
Wed Jun 28 11:42:25 2017
Non critical error ORA-48913 caught while writing to trace file "/testsite/testdb/db/tech_st/11.1.0/admin/TEST_erptestappldb/
diag/rdbms/test/TEST/incident/incdir_31537/TEST_s000_11075614_i31537.trc"
Error message: ORA-48913: Writing into trace file failed, file size limit [10485760] reached
Writing to the above trace file is disabled for now on... 

Solution:

The corruption you are finding is misplaced block, which is a physical corruption introduced by the underlying system.

Corrupt block relative dba: 0x3d808dd0 (file 246, block 36304)
Bad header found during buffer read
Data in bad block:
type: 2 format: 2 rdba: 0x21008dd0 rdba: 0x21008dd0 != dba: 0x3d808dd0
last change scn: 0x0006.12114f8e seq: 0x37 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x4f8e0237
check value in block header: 0x6e5b
computed block checksum: 0x0
Reread of rdba: 0x3d808dd0 (file 246, block 36304) found same corrupted data 

This is fully solvable by blockrecovery operations. 

If RMAN backup is available and all archivelogs, than please run:

RMAN>recover corruption list;

Otherwise, the data in the affected blocks is lost and segments will need to be recreated.

To evaluate the overall database status, you can use:

RMAN> backup validate check logical database;

NOTE:
=====
This command will succeed if DB is running in ARCHIVELOG mode.
. If DB in NOARCHIVELOG mode, then this RMAN command *Must* be run against the database in MOUNT state.
. If you try to this RMAN command against an open DB running NOARCHIVELOG mode the following error will occur:

-> RMAN-03009: failure of backup command on d1 channel at 12/07/2009 18:55:25
-> ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

After RMAN validate finishes, the view v$database_block_corruption will be populated with all the affected blocks.

To identify the affected objects, below queries can be used:

set pagesize 2000
set linesize 280
SELECT e.owner, e.segment_type, e.segment_name, e.partition_name, c.file#
, greatest(e.block_id, c.block#) corr_start_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1) corr_end_block#
, least(e.block_id+e.blocks-1, c.block#+c.blocks-1)
- greatest(e.block_id, c.block#) + 1 blocks_corrupted
, corruption_type description
FROM dba_extents e, v$database_block_corruption c
WHERE e.file_id = c.file#
AND e.block_id <= c.block# + c.blocks - 1
AND e.block_id + e.blocks - 1 >= c.block#
UNION
SELECT s.owner, s.segment_type, s.segment_name, s.partition_name, c.file#
, header_block corr_start_block#
, header_block corr_end_block#
, 1 blocks_corrupted
, corruption_type||' Segment Header' description
FROM dba_segments s, v$database_block_corruption c
WHERE s.header_file = c.file#
AND s.header_block between c.block# and c.block# + c.blocks - 1
UNION
SELECT null owner, null segment_type, null segment_name, null partition_name, c.file#
, greatest(f.block_id, c.block#) corr_start_block#
, least(f.block_id+f.blocks-1, c.block#+c.blocks-1) corr_end_block#
, least(f.block_id+f.blocks-1, c.block#+c.blocks-1)
- greatest(f.block_id, c.block#) + 1 blocks_corrupted
, 'Free Block' description
FROM dba_free_space f, v$database_block_corruption c
WHERE f.file_id = c.file#
AND f.block_id <= c.block# + c.blocks - 1
AND f.block_id + f.blocks - 1 >= c.block#
order by file#, corr_start_block#; 

Tuesday 23 May 2017

Oracle Application Express (APEX) 5.x Installation With Oracle HTTP Server (OHS)

---Create a new tablespace to act as the default tablespace for APEX.
$sqlplus /as sysdba

-- For Oracle Managed Files (OMF).
SQL>CREATE TABLESPACE apex DATAFILE SIZE 1G AUTOEXTEND ON NEXT 100M;

-- For non-OMF.
SQL>CREATE TABLESPACE apex DATAFILE '/path/to/datafiles/apex01.dbf' SIZE 1G AUTOEXTEND ON NEXT 100M;

Remove the existing lower version of apex from database use below command.
---Uninstallation Process---

SQL>select * from dba_registry;

SQL>exit

$ cd $ORACLE_HOME/apex
$sqlplus /as sysdba

SQL>@apxremov.sql

SQL>exit

---Installation Process---

$ unzip apex_5.x.x_en.zip -d $ORACLE_HOME/

cd $ORACLE_HOME/apex

SQL>@apexins.sql APEX APEX TEMP1 /i/

SQL>@apxchpwd.sql

SQL> ALTER USER APEX_PUBLIC_USER IDENTIFIED BY myPassword ACCOUNT UNLOCK;

-----Installation and Configuration Oracle HTTP Server (OHS)----


----Login with oracle database user
#su - oracle

$mkdir -p /testsite/HTTP_Server ----software location
$mkdir -p /testsite/Oracle_WT ------Installation location

$ unzip ofm_webtier_ibm_aix_11.1.1.7.0_64_disk1_1of2 -d /testsite/HTTP_Server
$ unzip ofm_webtier_ibm_aix_11.1.1.7.0_64_disk1_2of2 -d /testsite/HTTP_Server

$cd /testsite/HTTP_Server

$ ls -l
Disk1
Disk2
Disk3
Disk4
Disk5

$cd Disk1

----Ignore Prerequisites.
$./runInstaller -ignoreSysPrereqs
$cd /testsite/Oracle_WT/Oracle_WT/instances/instance1/config/OHS/ohs1/mod_plsql

----Enter the below entry in the dads.conf file

Alias /i/ "/testsite/testdb/db/apex/images/"---Apex Image folder Location
<Location /apex>
   Order deny,allow
   PlsqlDocumentPath docs
   AllowOverride None
   PlsqlDocumentProcedure         wwv_flow_file_mgr.process_download
   PlsqlDatabaseConnectString     erptestappldb:1528:test ServiceNameFormat
   PlsqlNLSLanguage               AMERICAN_AMERICA.AL32UTF8
   PlsqlAuthenticationMode        Basic
   SetHandler                     pls_handler
   PlsqlDocumentTablename         wwv_flow_file_objects$
   PlsqlDatabaseUsername          APEX_PUBLIC_USER
   PlsqlDefaultPage               apex
   PlsqlDatabasePassword          myPassword
   PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
   PlsqlPathAlias                 i
   PlsqlPathAliasProcedure        wwv_flow.resolve_friendly_url
   Allow from all
</Location>

$cd Oracle_WT/Oracle_WT/instances/instance1/bin
$pwd
$ls -l
$./opmnctl stopall
$./opmnctl startall

----APEX should now be available from a URL like "http://machine:port/apex".--default port 7777


APP-FND-01516L Invalid application username, password, or database

Error:

APP-FND-01516L Invalid application username, password, or database

Username: APPLSYSPUB
Database: VIS




Solution:

Check the alter log file of the database for below error:

ORA-00020: maximum number of processes 0 exceeded
ORA-20 errors will not be written to the alert log for
 the next minute. Please look at trace files to see all
 the ORA-20 errors.

Shutdown the application and database

edit the init parameter file by increasing the parameter processes and sessions, then start the database with the edited init prameter file and start the application

E-Business Autoconfig Issues/Autoconfig Issues seen after a Patch, Clone, Migration or Installation

While doing the cloning of Oracle Application and after that  run auto config, then getting the  following error occurs. 

ERROR
-----------------------
ERROR at line 1:
ORA-04091: table APPLSYS.FND_PROFILE_OPTION_VALUES is mutating,
trigger/function may not see it
ORA-06512: at "APPS.FND_CORE_LOG", line 45
ORA-06512: at "APPS.FND_CORE_LOG", line 456
ORA-06512: at "APPS.FND_PROFILE", line 110
ORA-06512: at "APPS.ALR_FND_PROFILE_OPTIO_0_84_UAR", line 2
ORA-04088: error during execution of trigger
'APPS.ALR_FND_PROFILE_OPTIO_0_84_UAR'
ORA-06512: at line 43
ORA-06512: at line 123 

Error Codes
---------------------------------------------------
ORA-04091,ORA-06512,ORA-04088

Solution:

Run the below query and check triggers status:

SELECT * FROM DBA_TRIGGERS WHERE TABLE_NAME = 'FND_PROFILE_OPTION_VALUES' AND TABLE_OWNER = 'APPLSYS';

If below trigger status enable then I suggested to disable the triggers and retest the issue.

ALR_FND_PROFILE_OPTIO_0_84_UAR
ALR_FND_PROFILE_OPTIO_0_84_IAR
-----------------------



Saturday 4 March 2017

[Solved]Automatically objects are getting invalid after some days.

Issue:
we have facing some issue that some objects are automatically gets invalid after some days.
after running script utlrp.sql it will get valid but issue comes again after some days.

Solution:
Please follow the below steps.
1) Run 'Re-create grants and synonyms for APPS schema' in adadmin.
2) As sysdba, run the following twice in order to compile any dependent objects
SQL > @?/rdbms/admin/utlrp.sql
3) Run 'Compile APPS Schema' in adadmin
4) Run 'Validate APPS Schema' in adadmin
5) Run the following report:
$AD_TOP/sql/adutconf.sql


I hope issue has been resolved invalid objects.

Friday 3 March 2017

ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes

Question: 
I am using a procedure to try to pull data for reporting purposes.  I am getting the following ORA-20000 with ORU-10027 error:

ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes

I need the output for a report, so I cannot just disable it to eliminate the ORA-20000 ORU-10027.

What can I do to get rid of the ORA-20000 ORU-10027 error?

Answer: 
DBMS_OUTPUT has different default buffer sizes, depending on your Oracle version.  For your system, the limit is 2000 bytes.You can increase the buffer up to 1,000,000 using the following PL/SQL statement:

 DBMS_OUTPUT.ENABLE(1000000);

The SQL*Plus statement to achieve the same result is:

set serveroutput on size 1000000

Starting with Oracle release 10g, it is possible to use the following unlimited buffer settings:
  • PL/SQL: DBMS_OUTPUT.ENABLE (buffer_size => NULL);
  • SQL*Plus: set serveroutput on size unlimited
Since I do not have the code you are running, I cannot do a full diagnostic on it.  If the DBMS_OUTPUT settings in the code are acceptable for your version of Oracle and the client (SQL*Plus, etc.) you are using and you are still getting the ORA-20000 ORU-10027 buffer overflow error for the stated limits, you should check your full code to determine whether there are any other calls that include conflicting DBMS_OUTPUT.ENABLE settings that might be overriding yours.










Thursday 2 March 2017

[Solved]Error No: 53 File not found Bi Publisher

Issue:
Following error pop-up is coming when we hit Oracle BI Publisher > Preview > PDF/EXCEL 
Error No: 53
Desc: File not found
Please confirm that
1) Java runtime version is 1.3 or later is installed correctly
2) The Java executable is accessible through the Windows Path or the Java Home directory is entered in the Preview tab of the options dialog



Solution:
Select correct Java Home by clicking on Browser button next to it.
Navigation:
 Ms Word -->Tools -- > options --> preview tab.


Java home should be selected there, if not select it or update path


Wednesday 1 March 2017

BI Publisher desktop won’t install

I’m running windows 7, 8 with office 2010, 2013 respectively.  Have oracle 11G client.  I’m using this machine for some Report development.
But, I keep getting: “Template Builder Installer failed": Unexpected Error”


People are putting all sorts of stuff on forums that look like pot shots.  “Try uninstall and install again” – huh???,  but computers generally do the same thing given the same input.
How about I find some log files and go from there.
C:\Users\AmitGupta\AppData\Local\Temp has TemplateBuilderInstaller.log – WOW!  direct hit.
This has:
Word process check start
Error No.: 339
Description: Component 'MSCOMCTL.OCX' or one of its dependencies not correctly registered: a file is missing or invalid
WOW again, direct hit.
I need to install this file, mscomctl.ocx does not exist on my machine
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=25437d98-51d0-41c1-bb14-64662f5f62fe&displaylang=en
download this file, and install it.  You can install this on 64 windows.


Right…  That did not work, even when I tried the repair…  Damn!
I tried a few other things, and then.
Downloaded this file (MSCOMCTL.OCX)
And then put this file C:\Windows\SysWOW64 location.
Restart the installation!


Monday 16 January 2017

tar: 0511-195 An error occurred while writing to the storage media.


tar: 0511-195 An error occurred while writing to the storage media. There is an input or output error.

The error log is always descriptive on what the problem is, so it is helpful to take a look. 
similar issues that I have seen, have been caused by the following errors:

Firmware issues: You need to look and insure you have the most up to date firmware for your drive. 
Media: Bad media can create similar issues, but this would show up on the error log. You can verify by trying a different tape. 
Cleaning: This will also show up on the error logs, but this is one of the most common problems with tape drives. 


This error can be media or tape but is generally an incorrect setting in the backup. 

File Size Issue: See if any file is over 8GB that you are trying to tar. If any individual file is over 8GB then exclude it from getting tar-ed.
Command Issue: This error occurred when you type /dev/rmto instead of /dev/rmt0 (wrongly used alphabet ‘o’ instead of digit’0’).