Friday, December 11, 2009

Be very careful when using tar

I often use tar to make cold database file backup since one big file is faster to copy via network. One time I accidentally entered wrong command on tar, I entered 'tar cvfj /u01/oracle/DEV/db/apps_st/data/* data.tar.bz2'. The tar ran fine until encountered error at the end with no tar file created. Then I realized that the tar command should be 'tar cvfj data.tar.bz2 /u01/oracle/DEV/db/apps_st/data/'.
When I tried to start the DEV database instance, it woudn't start. It said a_archive01 is corrupted (I don't remember the exact error). Luckily it was a DEV instance, I can easily clone again from production instace.
I haven't tried it for second time to make sure it was wrong tar command that made the corruption, but still it is better to be more careful.

Tuesday, December 1, 2009

Exception trying to access the repository. java.sql.SQLException: ORA-02291: integrity constraint (SYSMAN.MGMT_ARU_FAM_PRD_PRD_FK) violated

Problem: Trying to refresh from My Oracle Support on Grid Control 10.2.0.5 and receive Exception trying to access the repository. java.sql.SQLException: ORA-02291: integrity constraint (SYSMAN.MGMT_ARU_FAM_PRD_PRD_FK) violated - parent key not found.
Solution: Go to Deployment tab, select Provisioning > Administration. On Software Library Configuration section, select Purge to purge deleted entities.