Wednesday, March 21, 2012

Catbundle failed with ORA-20000: Write_Error during insertscriptFile while running catbundle after applying PSU Patches


####################################
CATBUNDLE ISSUE IN ABC DATABASE
####################################
SQL> @catbundle.sql psu apply

PL/SQL procedure successfully completed.

PL/SQL procedure successfully completed.

Generating apply and rollback scripts...
Check the following file for errors:
/u2590/app/oracle/product/11.1.0/db_1/cfgtoollogs/catbundle/catbundle_PSU_ABC_GENERATE_2011Sep06_23_59_46.log
Apply script: /u2590/app/oracle/product/11.1.0/db_1/rdbms/admin/catbundle_PSU_ABC_APPLY.sql
Rollback script: /u2590/app/oracle/product/11.1.0/db_1/rdbms/admin/catbundle_PSU_ABC_ROLLBACK.sql

PL/SQL procedure successfully completed.

Executing script file...

Here is the information available in the log.
------------------------------------------
Processing components and files for bundle 7: PSU 11.1.0.7.7                                                                                                 
Exception - patch NOT installed                                                                                                                              
ORA-20000: WRITE_ERROR during insertScriptFile                                                                                                               

Solution:
---------
It was some bug related to line size while opening the os file.
I have added the large line size explicitly to the below command in catbundle script and it ran good.

UTL_FILE.FOPEN('ADMIN_DIR', apply_file_name, 'w',32000) instead of UTL_FILE.FOPEN('ADMIN_DIR', apply_file_name, 'w')

No comments:

Post a Comment