Skip to main content

Posts

Showing posts from March, 2016

PLS-00201: identifier 'DBMS_XEVENT.XDBREPOSITORYEVENT' must be declared when creating ACL

Came across this issue at a customer site or should I say my Liron ran across the issue and asked Arty and myself to investivate. He gave us the hint that it looked like XML Database was not installed. exec sys.dbms_network_acl_admin.create_acl (acl => 'test.xml', description => 'test acl', principal => 'test', is_grant => true, privilege => 'resolve') ;  PLS-00201: identifier 'DBMS_XEVENT.XDBREPOSITORYEVENT' must be declared Check which options are selected in the database select * from v$option order by value,parameter; PARAMETER                                                        VALUE ---------------------------------------------------------------- ---------- Active Data Guard                                                FALSE Advanced Compression                                             FALSE Advanced replication                                             FALSE Application Role                            

Debugging Reports in EBS

Set the following to get a tracefile: SRW.DO_SQL ('alter session set events=''10046 trace name context forever, level 4'' tracefile_identifier=''REPORT'' '); Need to run this on the Database Tier select p.value from v$parameter p where 1=1 and p.name like 'user_dump_dest'; tkprof input.trc output.prf EXPLAIN=apps/apps SYS=NO You can know use this in a before report trigger srw.user_exit('FND SRWINIT');   srw.message(200,'XX_DEBUG_PRINT:'||fnd_profile.value('XX_DEBUG_REP'));  if (nvl(fnd_profile.value('XX_DEBUG_PRINT'),'N') = 'Y') then      SRW.DO_SQL ('alter session set events=''10046 trace name context forever, level 4'' tracefile_identifier=''REPORT'' '); end if;

Create DB Link

I'm not a big fan of creating a db link in the tnsnames.ora file because during clones you need to start messing around with custom files. My preferred method is using a bit of SQL to create the db link. Using the details from the tnsname.ora file of the target database: TEST=  (DESCRIPTION=   (ADDRESS=(PROTOCOL=tcp)(HOST=oradbtest.company.com)(PORT=1521))  (CONNECT_DATA=   (SERVICE_NAME=TEST)   (INSTANCE_NAME=TEST)   )  ) I can now create the database link as follows: create public database link TESTDBLINK connect to apps identified by apps using '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oradbtest.company.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=TEST)))'; Just remember you might want to not make it public and you may need to change user names and passwords to the target instance.

Personalize R12 OAF Pages

To be able to edit framework (OAF) pages in R12 you need a few profile options set either at site but more realistically at user level. The following profiles should be set as follows for your user level values: FND: Personalization Region Link Enabled Personalize Self-Service Defn Disable Self-Service Personal After setting these above you'll need to log out completely and then re-enter the instance. In some instances I've seen that you need to bounce Apache or clean out cache from browser. So check those if you don't see the option immediately. Reference: Puneet Rajkumar

Set date to future

I had a case where we need to clone an instance and set the date to the future to simulate a closing of an accounting period before an upgrade. Used the following to set the time the beginning of the following month on the database server. I'd set it on the application server to for consistency.  date -s "02/01/28 06:00:00"

R12.2 Rapid Clone using cold backup

Database Tier Because this is a cold backup of the database only need to run dbTier and it will do the rest for you. Thanks to Arty for this little jewel. cd $ORACLE_HOME/appsutil/clone/bin perl adcfgclone.pl dbTier Application Tier Run File System In R12.2 it has some check on the oraInst file. Make sure its there with the valid locations. vi /etc/oraInst.loc inventory_loc=/u03/APPLTEST/oraInventory inst_group=dba Remove the oracle inventory directory that you reference in oraInst. You could deregister or start messing around with the xml file but I found it easier to simply delete the directory. rm -rf /u03/APPLTEST/oraInventory Check which is the run file system grep s_file_edition_type /u03/APPLTEST/TEST/fs1/EBSapps/comn/clone/context/apps/TEST_erpapprod.xml grep s_file_edition_type /u03/APPLTEST/TEST/fs2/EBSapps/comn/clone/context/apps/TEST_erpapprod.xml Because this is a snapshot of PROD I have to remove some of the files that aren't required. Oracle

Archive logging

This is probably in a million places out there but just posting it here for my own reference and you might find it useful too. Disable Archiving SQL> archive log list; Database log mode              Archive Mode Automatic archival             Enabled Archive destination            /u04/archive/ref4data Oldest online log sequence     1 Next log sequence to archive   4 Current log sequence           4 SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 8551575552 bytes Fixed Size                  2270360 bytes Variable Size            2634025832 bytes Database Buffers         5804916736 bytes Redo Buffers              110362624 bytes Database mounted. SQL> alter database noarchivelog; Database altered. SQL> alter database open; Database altered. SQL> archive log list; Database log mode              No Archive Mode Automatic archival             Disab