Tuesday, February 28, 2012

Connect Discoverer 11g to EBS

When config the connection between Discoverer 10g to EBS, we need to copy the dbc file to the discoverer $ORACLE_HOME/discoverer/secure, also add entry into $ORACLE_HOME/network/admin/tnsnames.ora.
But in Discoverer 11g, we have to copy the dbc file to
$ORACLE_INSTANCE/config/Discoverer/Discoverer_asinst/
(note: don't know what's the reason, but I find out we'd better have two dbc files, one has upper case SID another has lower case SID, ie. PROD.dbc and prod.dbc under this directory)
and add entry into
$ORACLE_INSTANCE/config/tnsnames.ora

How to change the database name

1. sqlplus "/as sysdba"
   alter system switch logfile;
   alter database backup controlfile to trace resetlogs;
   shutdown normal
2. find the trace file, copy from "STARTUP NOMOUNT" to the "alter database open resetlogs", and save it to xxx.sql
3. edit your xxx.sql change
    FROM: CREATE CONTROLFILE REUSE DATABASE "olddbname" RESETLOGS
      TO: CREATE CONTROLFILE set DATABASE "newdbname"  RESETLOGS
   also comment out "RECOVER DATABASE USING BACKUP CONTROLFILE" line
4. delete or rename your old control file
5. change the db_name in your init.ora
6. sqlplus "/as sysdba" @xxx.sql

This also apply to EBS database, and for EBS database, you need to run the adcfgclone.pl appsTier after you done above steps, then run autoconfig on apps tier, and db.

Database adconfig.sh error

If you run into error "adchknls.pl INSTE8_SETUP" at database adconfig.sh after you did database upgrade or migrate OS.
then try this:
  • The PERL5LIB environment variable points to the directories where the new perl libraries are located (usually $ORACLE_HOME/perl/lib/[perl version] and   $ORACLE_HOME/perl/lib/site_perl/[perl version])
  • run the $ORACLE_HOME/nls/data/old/cr9idata.pl script to create the $ORACLE_HOME/nls/data/9idata directory.  export ORA_NLS10=$ORACLE_HOME/nls/data/9idata