Text box

Please note that the problems that i face may not be the same that exist on your environment so please test before applying the same steps i followed to solve the problem .

Monday, 5 December 2011

Oracle APEX installation problems

Today i was asked to install oracle apex which was a very intersting task for me.I meet alot of problems related to database and solved it but the remarkable problems that were related to apex installation were solved in the following oracle notes:
1-Oracle apex needs oracle text to be installed:
Manual installation, deinstallation of Oracle Text 10gR1 [ID 280713.1].
2-Apex reported a problem related to grants:
The WWV_FLOW_HELP PACKAGE Status is Invalid After Installing Oracle Text [ID 1335521.1].
I wrote this document to share the information with the community.

Friday, 2 December 2011

Egypt Oracle User Group(EGOUG)

I was searching Egypt for a real community group that acts and doing seminars and help people/customers ,but really i didn't find one.I wanted to start the idea and generated the group and now i am in the process of finding people in Egypt who are willing to work as volunteers with me in this non profit group that aim to help oracle community in Egypt.if you are interested please let me know.
The group link is:
http://www.linkedin.com/groups/Egypt-Oracle-User-Group-EGOUG-4201255?home=&gid=4201255&trk=anet_ug_hm

ORA-00600: internal error code, arguments: [qmxtrScalarIsRewritable:dft], [], [], [], [], [], [], [] and ORA-07445: exception encountered: core dump [kgghstfel()+4] [SIGSEGV] [Address n ot mapped to object] [0x000000018] [] []

I faced the following errors in the alert log and the developers were not able to view the DDL from the JDeveloper and toad for any user in the database.

The Call stack for the trace file for error ORA-07445 :


qmxtrxq()+464        CALL     qmxtrxq()            000000000 ?
                                                   FFFFFFFF7FFED090 ?
                                                   000000001 ?
                                                   FFFFFFFF7AD3B698 ?
kgghstfel()+4        PTR_CALL 0000000000000000     000000000 ? 106843EF0 ?
                                                   106843C10 ?
                                                   FFFFFFFF7D500200 ?
                                                   000000000 ?
                                                   FFFFFFFF7C73C000 ?
qmtLookup()+80       CALL     kgghstfel()          000000000 ? 3B26F7628 ?
                                                   000000000 ? 000000000 ?
                                                   000000002 ? 3B26CD118 ?
qmtRemoveRef()+76    CALL     qmtLookup()          10669E678 ? 3B26F7628 ?
                                                   3B26CD6D0 ? 000000029 ?
                                                   00010581D ?
                                                   FFFFFFFF7C026620 ?
qmxtrCleanRewriteCt  CALL     qmtRemoveRef()       10669E678 ? 3B2633A18 ?
x()+44                                             000105800 ? 10581D000 ?
                                                   3B26CD118 ? 000000000 ?
qmxtrxopn()+680      CALL     qmxtrCleanRewriteCt  FFFFFFFF7FFE5BC8 ?
                              x()                  FFFFFFFF7FFE5B18 ?
                                                   FFFFFFFF7FFED090 ?
                                                   10669E338 ? 10669E000 ?
                                                   00010669E ?
qmxtrxopt()+156      CALL     qmxtrxopn()          FFFFFFFF7B9C0118 ?
                                                   FFFFFFFF7FFED090 ?
                                                   000008000 ? 000000000 ?
                                                   002000000 ? 000004004 ?
qmxtrxq()+256        CALL     qmxtrxopt()          FFFFFFFF7B9C0118 ?
                                                   FFFFFFFF7FFED090 ?
                                                   000000000 ? 000000003 ?
                                                   FFFFFFFF7B9DFB20 ?
                                                   FFFFFFFF7B9DF718 ?
qmxtrxq()+464        CALL     qmxtrxq()            0FFFFBC00 ?
                                                   FFFFFFFF7FFED090 ?
                                                   000000000 ?
                                                   FFFFFFFF7B9C0118 ?
                                                   FFFFFFFF7B9DF718 ?
                                                   000000000 ?

after investigation i found similar bugs on metalink and they were related to XML DB.i decided to remove the XML DB from the database as it was not being used.

The steps to remove XML DB:
XDB Removal

The catnoqm.sql script drops XDB.

SQL> spool xdb_removal.log
SQL> set echo on;
SQL> connect / as sysdba
SQL> shutdown immediate;
SQL> startup
SQL> @?/rdbms/admin/catnoqm.sql
SQL> spool off;
you can refer to document :
 How to Deinstall and Reinstall XML Database (XDB) [ID 243554.1]


after removing the XML database i found many invalid objects in the sys user which impaced the database.i resolved those issues by running the following scripts:


Catalog - creates data dictionary views.
Catproc - create in built PL/SQL Procedures, Packages etc


running catalog and catproc will make your packages/procedures invalid. You will have to recompile them. 
You can use utlrp.sql which you can find in $ORACLE_HOME/rdbms/admin




after finishing the above statements i found no invalid objects in sys schema ,but the following error appeared:

Errors in file /app/home/oracle/admin/DEVDB/bdump/devdb_j000_29009.trc:
ORA-12012: error on auto execute of job 42568
ORA-04063: ORA-04063: package body "EXFSYS.DBMS_RLMGR_DR" has errors
ORA-06508: PL/SQL: could not find program unit being called: "EXFSYS.DBMS_RLMGR_
DR"
ORA-06512: at line 1
 has errors
Mon Nov 28 19:42:33 2011
Errors in file /app/home/oracle/admin/DEVDB/bdump/devdb_reco_11767.trc:
ORA-02019: connection description for remote database not found
Mon Nov 28 23:40:44 2011
 i resolved the following error by doing the following oracle note:
How To Install and Uninstall Expression Filter Feature or EXFSYS schema [ID 258618.1]

The database is up and running now with no problems.










Thursday, 20 October 2011

how to compress all the tables inside a tablespace

1-calculate all the tablespace tables sizes before compression:
select  sum(bytes/1024/1024/1024),segment_name,owner from dba_segments where tablespace_name='TIM_UAT' and segment_type='TABLE' group by segment_name,owner order by 1;
2-generate a script to compress all the tables inside the tablespace given that the table was not compressed before:

 select 'Alter table '||owner||'.'|| table_name||' move compress;' from dba_tables where TABLESPACE_NAME='TIM_EA3' and compression='DISABLED';

3-rebuild all the indexes that was unusable due to the compression:

  select  sum(bytes/1024/1024/1024),segment_name,owner from dba_segments where tablespace_name='TIM_UAT' and segment_type='TABLE' group by segment_name,owner order by 1;

4-calculate the sizes of all the tables inside the tablespace after compression:
select  sum(bytes/1024/1024/1024),segment_name,owner from dba_segments where tablespace_name='TIM_UAT' and segment_type='TABLE' group by segment_name,owner order by 1;

Don't  forget to rebuild all unusable indexes after finishing this process:
select 'Alter index '||owner||'.'||index_name||' rebuild;' from dba_indexes where status='UNUSABLE'

Kindly note that compression is useful when you have alot of redundant data available and will be so beneficial.