Oracle applications 11i dba faq

Embed Size (px)

DESCRIPTION

This doc contains the faq's for the oracle apps dba community and help to scan before the interview

Citation preview

e. Create your links file. The links file stores the connectionbetweenthe target and target in the destination html file. You will have one 149. links file for each form and it will be named after the form. Copyanexisting Oracle Applications links file to your links subdirectoryandmodify it.For example, copy an existing links file to your custom linkssubdirectory,modify $OA_DOC/US/XXCUS/ links/custom. htm using an htmleditor. The targetis CUSTOM_BLOCKNAME (form name=CUSTOM and windowname=BLOCKNAME) , the htmlhelp file is custom.htm with a target tag of custom.BLOCKNAME: f. If desired, a link to your custom application can be added to theOracle Applications online help file, library.htm11. Create your message dictionary.a. Make sure you have a message (mesg) subdirectory under yourcustomapplications basepath.b. Define your messages following the message standards. Loginas theApplication Developer and navigate to: Application --> Messages.For example:Name Language Application Number------------ --------- --------- --------- --------- --------- -XXCUS_UPDATE US Custom Application 1Current Message Text------------ --------- --------- --------- --------- --------- -Custom Applications update messagec. Create the message files. From the operating system run theMessageDictionary Generator program (FNDMDGEN) as the APPLMGRuser.FNDMDGEN apps/appspword 0 Y DB_TO_RUNTIME 151. For example:$ FNDMDGEN apps/apps 0 Y US XXCUS DB_TO_RUNTIMEwhere Language=US and Application Short Name=XXCUSThe FNDMDGEN program will generate a message file named.msb inplace it in the custom applications basepath mesg directory.d. If needed make a copy of the generated file (located on theserver) andtransfer the copy to the appropriate mesg directory for the customapplication on the client system.e. Code the logic to set up messages. You will use calls to theFND_MESSAGE package to retrieve and set up messages fordisplay.f. Code the logic to display messages. You will either display themessageto a user on the client or write it to a file on the server. You willusecalls to the FND_MESSAGE package to display messages.12. Set up your concurrent processing for your Custom Schema.a. Write the concurrent program execution file and place it in theappropriate directory. You can use a variety of methods such as C,Pro*C,SQL*Plus, PL/SQL, Oracle Reports or a host language program (ashellscript). 152. b. Define the concurrent program executable with the OracleApplicationObject Library. This links the execution file and the method usedto executeit with a defined concurrent program. Log into Applications as theSystemAdministrator and navigate to: Concurrent --> Program -->Executable.For example:Executable: XXCUSShort Name: XXCUSApplication: Custom ApplicationDescription: Custom Program for UpdatesExecution Method: SpawnedExecution File Name: XXCUSUPTSubroutine Name:c. Define the concurrent program with the Oracle ApplicationObjectLibrary along with any program parameters or anyincompatibilities. Loginto Applications as the System Administrator and navigate to:Concurrent --> Program --> Executable.For example:Program: Custom Update x EnabledShort Name: XXCUSApplication: Custom ApplicationDescription: Custom Program for UpdatesExecutable---------- 153. Name: XXCUS OptionsMethod: Spawned PriorityRequest Output------- ------Type: Format: TextUse in SRS x SaveAllow Disabled Values x PrintEnable Trace Columns:x Restart on System Failure Rows:NLS Compliant style Style:Style RequiredPrinter:d. Add the request functionality for your concurrent program. Theprogramcan be called from the run reports form, from a trigger within anapplication form or from a Pro*C program. To use the run reportsform,just add the submit request window to your custom menu so thatyou haveaccess to the Standard Request Submission interface (SRS).89 What are the actual executables called?1. These are the various Forms component names on Unix andWindows:Unix WindowsForms Builder f60desm ifbld60.exeForms Compiler/Generator f60gen/f60genm ifcmp60.exeForms Runtime f60run/f60runm ifrun60.exeForms Metric Server d2ls60 d2ls60.exeForms Metric Client d2lc60 d2lc60.exeForms CGI f60cgi ifcgi60.exe 154. Forms Server f60srvm ifsrv60.exeForms Web Runtime f60webm ifweb60.exe90 What are some of the related Forms/Apps files?adfmcctl.sh - located in $COMMON_TOP/ admin/scripts, thisscript starts and stops the Forms Metric Client for your Appsinstance; it uses the Forms d2lc60 executable to accomplish this.adfmsctl.sh - located in $COMMON_TOP/ admin/scripts, thisscript starts and stop the Forms Metric Server for our Appsinstance; it uses the Forms d2ls60 executable to accomplish this.adfrmctl.sh - located in $COMMON_TOP/ admin/scripts, thisscript starts and stops the Forms Server Listener; similar to andactually calls the f60ctl found in $ORACLE_HOME/ 6iserver/ binof IAS.appsweb.cfg - located in $OA_HTML/html/ bin, this file definesparameter values used by the Forms Web CGI, similar toformsweb.cfg found in $ORACLE_HOME/ 6iserver/forms60/server of IAS.appsbase.html - located in $OA_HTML/ , this is thedefault HTML file for starting an applet using Jinitiator, similar tobasejini.htm found in $ORACLE_HOME/ forms60/server of IAS.d2lc60.txt - located in $COMMON_TOP/ admin/install, this is theForms metric client log file.d2ls60.txt - located in $COMMON_TOP/ admin/install, this is theForms metric server log file.f60svrm.txt - located in $COMMON_TOP/ admin/install, this isthe adfrmctl.sh log file. This is not the same as the Forms serverlog file which not only logs startup and shutdown info but also 155. client connectivity (which client IP is associated with whichf60webm process) and debug stack trace info.OracleApplications. dat - located in $JAVA_TOP/oracle/ apps/fnd/formsClient, among other things this file determines the path Appsuses to find their icons; its similar to and supplements registry.datfound in $ORACLE_HOME/ forms60/server of IAS.91 List most usefull profile options for concurrent managers ??Profile Options Concurrent Manager1. Concurrent: Active Request LimitValue: NumericThis profile options will restrict the number of concurrent requeststhat may be run simultaneously by each user. If you do not specifya limit, then no limit is imposed.2. Concurrent: Attach URLValues: YES/NOIf you set this option to YES, then this causes a URL to be attachedto requestcompletion notifications. For example, when a user submits arequest and usesthe Defining Completion Options region to specify people to benotified,a notification is sent each of the people designated.3. Concurrent: Collect Request StatisticsValues: YES/NOIf you set this option to YES, this causes applications to collectstatisticson your run-time concurrent processes.4. Concurrent: Conflicts Domain 156. Values: LOV (list of values: domains)This option identifies the domain within which all theincompatibilitiesbetween programs has to be resolved5. Concurrent: Debug FlagsThis option is used to debug the transactions managers.You should only use this option at the request of Oracle Support.6. Concurrent: Directory for CopyYou can identify a directory on your operating system to storecopies ofyour report output or log files. This directory is used when a copyoperation is requested in character mode of the applications.7. Concurrent: Enable Request Submission in View ModeValues: YES/NOSetting this option to YES will enable the Submit a New Requestbuttonwhen users invoke the form FNDRSRUN (Find Requests Form).Navigationpath is either: (1) Menu: Help > View My Requests, or (2)navigate(with system administrator responsibility) to, Requests > View.8. Concurrent: Hold RequestsValues: YES/NOThis option enables you to automatically place requests on holdaftersubmission9. Concurrent: Multiple Time ZonesValues: YES/NOWhen the clients session and the concurrent manager are runningin different 157. times zones, use this option to ensure that the request is scheduledimmediatelyregardless of you client sessions time zone.10. Concurrent: PMON MethodThis option is presented for documentation purposes only. Userscannot see oralter this profile option. This option is not visible or cannot beupdated from theSystem Profile Option (FNDPOMPV) form. The PMON methodrefers to the processmonitor. The Internal Concurrent Manager (ICM) monitors theindividualconcurrent managers processes to verify the managers are running.Normally,the PMON method must be set to LOCK. To change the profileoption setting,you must execute the SQL script "afimpmon.sql" which resides indirectory"$FND_TOP/sql/ ".11. Concurrent: Report Access LevelValues: RESPONSIBILITY/ USERThis option determines access privileges to report output filesand log files generated by a concurrent program. This option canbeset by a system administrator or by the user.12. Concurrent: Report CopiesValues: NumericThis option determines the number of default copies that print foreachsubmitted concurrent request.13. Concurrent: Request Priority 158. Values: NumericConcurrent requests in Oracle Applications are queued. Requestsnormallyrun according to a start time on a first submitted, first run basis.Priorityoverrides this request start time. A higher priority request startsbefore anearlier request. This option displays the default priority for youconcurrentrequests. Only a system administrator can change your requestpriority.14. Concurrent: Request Start TimeValues: Numeric (Date/Time)With this profile option, you can set the date and time that yourrequests are available to start running* If the start time is at or before the current date and time,requests are available to run immediately* Start a request in the future, for example, at 6:00 PM onDecember 31, 2000, enter the following value,31-DEC-2000 18:00* This profile option requires the date and time,for example, 31-DEC-2000 18:00* Changing values does not affect request already submitted15. Concurrent: Save OutputValues: YES/NOSetting this option to YES will save the output from a concurrentrequest to a file.16. Concurrent: Sequential RequestsValues: YES/NOSetting this option to YES will force concurrent requests to runsequentiallyin the order in which they were submitted. 159. 17. Concurrent: Show Requests Set StagesValues: YES/NOSet this option to YES to show request set stages in the concurrentrequest screens.18. Concurrent: Show Requests Summary After Each RequestSubmissionValues: YES/NOBy default the Request Summary (FNDRSRUN) form appearsafter every request submission. Set this option to NO if you havemultiple requests to submit and do not wish to see the RequestSummaryform after each submission.19. Concurrent: URL LifetimeValue: NumericIf the profile option Concurrent: Attach URL has been set to YES,a URLis associated the output of an execution and is passed to anyoneflaggedfor notification during the request submission. This optionspecifies how long (in minutes) the URL is to be kept active.20. Concurrent: Use ICMValues: YES/NOICM (Internal Concurrent Manager)Set this option to YES to use the Internal Concurrent Manager toresolverequest conflicts (result from programs that are defined to beincompatible)instead of using the Conflict Resolution Manager (CRM).21. Concurrent: Wait for Available TMValue: Numeric 160. TM (Transaction Manager)Use this option to specify the number of minutes that a client willwaitfor a given transaction manager to become available before tryingadifferent transaction manager.92 How to find the files which contain the stringMTL_SYSTEM_ITEMS_ KFV ?$grep -i MTL_SYSTEM_ITEMS_ KFV `find . -depth -print | grep-v log`The above command provide a list of the files that contain thestring "MTL_SYSTEM_ ITEMS_KFV" and display the line onwhich it occurrs.93 Why do I have invalid objects? What causes them?Invalid objects can and will occur for many reasons. You willusually find invalid objects after running (or failing to run)adprepdb, doing an export/import, upgrading, or applying patches.Invalid objects are usually caused by missing grants, synonyms,views, tables or packages, but can also be caused by corruptedpackages.94 Why does Oracle Support always tell me to recompile myinvalid objects?Compiling invalid objects on your database is almost theequivalent of running scandisk on a PC hard drive. This should beone of the first things you check if you start experiencing problemswith your Oracle database. It is also a good idea to scheduleregular checks for invalid objects. 161. When you call in to Oracle Support with a database or installationissue, one of the first questions they will probably ask is whetheryou have checked for and resolved any invalid objects.96 Are invalid objects ever acceptable? How many is too many?If the invalid objects exist for a product or application that is notinstalled, it may be ok to have some, but it is preferable to have noinvalid objects existing at all. If invalid objects exist for a productor application that you do have installed and are using, then itshould be considered unacceptable and any existing invalid objectsshould be resolved before further issues can occur.There is no set number of invalid objects that could be consideredacceptable as each situation will vary widely from one databaseto the next. You could just have a few invalid objects or they couldnumber in the hundreds or even thousands, but every effort shouldbe made to resolve them one way or another.97 If we do not use the application with the invalid objects, can wedelete them?There are times when invalid objects have occurred where youmay opt tosimply delete them, but you must ensure that they are in a productor application that is not used.98 Which OBJECTS table is best to use for queries? ALL, USERor DBA?You should normally use DBA_OBJECTS, but there may beoccasions when you will want to use USER_OBJECTS. It is notrecommended to use ALL_OBJECTS. 162. USER_OBJECTS - returns objects owned by the user (schema)you areconnected as.DBA_OBJECTS - returns every object in the Database.99 How can I recompile all my invalid objects usingADCOMPSC.pls?Within Applications, there is a script to compile INVALID objects- calledADCOMPSC.plsArguments for ADCOMPSC.pls:1 - Schema to run in2 - Password for schema3 - Check errors for objects starting with #3NOTE: The order in which to compile Invalid Objects in schemasisSYS, SYSTEM, APPS and then all others. APPS_DDL andAPPS_ARRAY_DDLshould exist in all schemas. If you encounter an ORA-1555 errorwhile running adcompsc.pls, just restart the script.The script can be run as follows:cd $AD_TOP/sqlsqlplus @adcompsc.pls SCHEMA_NAMESCHEMA_PASSWORD %Example: SQL> @adcompsc.pls apps apps %After the script completes, check for invalid objects again. If thenumberhas decreased, but you still have invalid objects, you should run 163. adcompsc.pls again. Keep running adcompsc.pls until number ofinvalidobjects stops decreasing.100 What Oracle Applications DBA has useful collection of SQLscripts.Script11.0.x 10.7NCA 10.7SC/16.1 Descriptionadcompsc.pls x x x Compile objects in a given schemaadcpresp.sql x The script duplicates rows inFND_RESPONSIBILITY in the following way:Find data_group_id dg_id for the given data_group_name.For each row with data_group_id 0 in FND_RESPONSIBILITY,look for a corresponding row with data_group_id dg_id, with thesame application_ id, and responsibility_ name that only differs inthe given suffix string suffix_string. If such a row does not existfor the data_group_id dg_id, insert it.aderrch2.sql x x x Reports all compilation errors for a givenschema.aderrchk.sql x x x Same as aderrch2.sql plus it fails if there are anyerrorsadtresp.sql x A fix for customers who have more than one set ofbooks and they installed languages other than AMERICANEnglish. The symptom of the bug is that responsibility names arenot translated properly for non-Standard data groups.adutcobj.sql x x x Count objects by object type in schemaadutconf.sql x x x Utility script to display configuration ofApplicationsadutfip.sql x x x Utility script to display worker informationadutfpd.sql x x x Utility script to display product dependencyinformationADXANLYZ.sql x x x Analyze all tables in an ORACLE ID withestimate sample 20% 164. ADXCKPIN.sql x x x Query the shared_pool area to determinespace used by PL/SQL objects and whether they have been pinned.ADXGNPIN.sql x x x Creates and runs a "pin" script for allpackages and functions in a give schemaADXGNPNS.sql x x x Creates and runs a "pin" script for allsequences in a give schemaADXINMAI.sql x x x Install tables and views used by theApplications* DBA sql scripts.adxirc.sql x x x AD - index - report columnsadxirn.sql x x x Drops and recreates an index as nonunique.ADXLMCBC.sql x x x Live Monitor, Categorize BlockContentionADXLMLSO.sql x x x Live Monitor, List Session ObjectsADXLMQMS.sql x x x Live Monitor, Query Monitor StatisticsADXLPFLS.sql x x x Lock Problem, Find Lock SourceADXLPSLU.sql x x x Lock Problem, Show Lock Usersadxpriv7.sql x x x grant privileges to a userADXRCSDC.sql x x x Report Configuration, Show DatabaseConfiguration formerly, config.sql (rollback, tablespace, data files)ADXRCSTG.sql x x x Report Configuration, Select Table Grantsadxrfmi.sql x x x report installed modules fromfnd_module_installa tionsadxrfpi.sql x x x report rows from fnd_product_ installations andrelated tablesADXRSEBH.sql x x x Estimate the effect of a bigger SGA cacheon cache hit rate.ADXRSESH.sql x x x Estimate the effect of a smaller SGA cacheon cache hit rate.ADXRSFIS.sql x x x Find the size (blocks, extents, extpct) of thegiven index.ADXRSFTS.sql x x x Find the size (blocks, extents, extpct) of thegiven table.ADXRSFUA.sql x x x Report the number of blocks used and thenumber of extents used for every table or index in every user in thedatabase. 165. ADXRSLFS.sql x x x Report free extents in each tablespace.ADXRSQDP.sql x x x Check for cache effectiveness for dc_xxxxxparameters values.ADXRSRTS.sql x x x Produce a brief database used space report.ADXRSSIE.sql x x x Generate a list of tables and indexes whosenext extent to be grabbed would be too large to be allocated intheir corresponding tablespaces.ADXRSSMF.sql X x x List tables and indexes with a number ofallocated extents close to their max_extents.ADXRSSMS.sql X x x Find space used for ones own segments.ADXRSSRS.sql X x x Show v$rollstat statistics.ADXRSSSU.sql X x x For a username, report the number ofblocks used and the number of extents used for every table orindex in that username.ADXRSSTF.sql X x x Produce a brief report of databasefragmentation by tablespace.ADXRSSUS.sql X x x Report how much space each user has.ADXUPLUP.sql X x x Generate a list of processes which thegiven user (NOT the database accounts username) owns.ADXUPSRU.sql X x x Show all users that have active transactionsper Rollback Segment that they are writing to.applcrt.sql x x Modified CRT definitions for ApplicationsEnvironmentRegular Activities:1) Check the alert_SID.log file and check the errors2) What steps to be performed if problem accours like databasehangs or listener downsa) Check the file systemb) If the file system full then increase the file system for databasefor otherspurge the logs 166. 3) Purge the conncurrent request manager logs select theparameters asentity : allmode : agemode value: 7You may get the error snapshot too old some times then you needto shrink the rollbacksegments and then re-run the program.this program will not remove the logfiles from the os levl, youhave to remove it manually.find /var/tmp -user testora -mtime +7 -exec rm -f {} ; 2>/dev/nullfind /testfm/testcomn/ admin/log -user testappl -mtime +7 -exec rm-f {} ; 2>/dev/nullfind /testfm/testcomn/ admin/out -user testappl -mtime +7 -exec rm-f {} ; 2>/dev/nullNote: You can modify above commands accordingly for otherinstances.find /testdata/testdb/ 8.1.7/admin/ TEST/bdump -user testora-mtime +7 -exec rm -f {} ;2>/dev/nullfind /testdata/testdb/ 8.1.7/admin/ TEST/cdump -user testora-mtime +7 -exec rm -f {} ;2>/dev/nullfind /testdata/testdb/ 8.1.7/admin/ TEST/udump -user testora-mtime +7 -exec rm -f {} ;2>/dev/nullWhat files can be removed for OS ? 167. The following files can be removed to the respective directory, Ifyou sure then only remove thisfilesOS Related/var/adm/wtmp/var/spool/* /*$HOME/smit.log$HOME/smit.script$HOME/websm. log$HOME/websm. script/etc/security/ failedlogin/var/adm/sulog1)rm /var/adm/wtmptouch /var/adm/wtmpchown adm:adm /var/adm/wtmpchmod 544 /var/adm/wtmp2)rm /var/adm/sulogtouch /var/adm/sulogchown root:system /var/adm/sulogchmod u+rw /var/adm/sulog3)rm $HOME/smit*How to remove shared memory segments in UNIX after killingprocesses ?A: There must be some flag in ipcs command which givesNATTCH(which is the number of 168. processes attached to it,refer to the man pages of ipcs command).PS:You have to login as ORACLE_HOME owner to remove thesegmentfor eg In our AIX 4.3.3flags a,o gives NATTCH (for a flag $9 gives NATTCH,for o flag$7 gives NATTCHipcs -map|awk $9==0T ID KEY MODE OWNER GROUP CREATOR CGROUPNATTCH SEGSZ CPID LPID ATIME DTIME CTIMEm 7 0x00000790 --rw-rw-rw- root system root system 0 400827606 27606 0:30:08 0:30:090:30:08ipcs -map|awk $9==0 {print $2}gives the shared memory ID that is 7you can use "ipcrm -m 7" to kill the shared memory segment106 How to cancel the request which is submited by other user ???Login as sysadmin user with system administrator responsibilityand go toConcurrent Request Specific Request(give the request id) find and then cancel107 How to bounce the http server for maximo ???Login as root on hiltrn then goto/ust/HTTPServer/ bin 169. #./apachectl stop#./apachectl start108 Finding the maximum number of processes defined per user ??The procedures are valid for AIX version 4.3.0.01. Start up the SMIT utility.2. Select System Environments .3. Select Change / Show Characteristics of Operating System.4. The number shown in Maximum number of PROCESSESallowed per user will show the maximum limit the user hasdefined.104 How to determine os file system block size in AIX??As the root user startup the smitty fs o/s utilityGo toAdd / Change / Show / Delete File Systems=> Journaled File Systems=> Change / Show Characteristics of a Journaled File System=> Select the file system you want to seeYou can see this outputSIZE of file system (in 512-byte blocks) [16384]Alternate MethodCreate a test directory and determine its size using ls -lmkdir testls -l test 170. 105 Is it posible to create a Database link without alias intnsnames.oraYes Its possible to create a database link without having a alias inyour tnsnames.ora file. This is beneficial when you use a remotedatabase only for one time or when your tnsnames.ora is shared ona fileserver and you dont have the privileges to update the file.Create database link connect to identified by using (DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = )(PORT = 1521)))(CONNECT_DATA = (SID = )))106 How to determine size of a oracle process on UnixPurpose~~~~~~~DBAs are often alarmed by the percieved size of an Oracleprocess.This note describes the various aspects of measuring the actualsize.Scope & Application~~~~~~~~~~~~ ~~~~~~~It is intended to clarify the various measurements that can beobtained, andhow to proceed further.Determining the Size of an Oracle Process:~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~~~INTRODUCTION 171. On UNIX platforms, the size of a process is often measured usingoperatingsystem utilities such as ps or top. Such utilities can implyalarminglylarge process sizes.WHY CAN PROCESS SIZES BE REPORTED INCORRECTLY?============ ========= ========= ========= =======The two main reason for incorrect reporting of process memoryusage are:inclusion of non-private (i.e. shared) memory in the processmemory figure,and the operating system not reclaiming freed memory. Thesetopics arecovered in more detail below.Inclusion of non-private memory~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~ ~A process in memory is composed of several parts:shared memory (the SGA)shared libraries (both public, and private)private data (referred to as DATA, or heap)the executable (referred to as TEXT)N.B. The SGA and TEXT regions are shared by all Oracleprocesses. These aremapped only once into memory, and not once per process. Assuch, these are notpart of the incremental cost of spawning a new Oracle process.Unfortunately, commands such as ps and top include TEXT sizeswhenmeasuring private data. Further, the SGA size can also be included,giving awildly inaccurate figure for the private data of a server process.Some operating systems provide better tools for measuring processsizes. Forexample, Solaris has /usr/proc/bin/ pmap, and HP has glance (viewthe process 172. virtual memory map) or the kernel debugger q4 (see the followingnote:[NOTE:66637. 1] "Virtual Memory on HP-UX 10.X").Here is an example of using ps, top and pmap on Solaris, againstanOracle server process (pid 3254):% ps -eafl | grep 3254F S UID PID PPID C PRI NI ADDR SZ .... CMD8 S usupport 3254 3253 0 55 20 62f4a0b8 18985 .... oracleV817% topPID USERNAME THR PRI NICE SIZE RES STATE TIME CPUCOMMAND3254 usupport 1 59 0 148M 124M sleep 0:00 0.05% oracle% /usr/proc/bin/ pmap -x 32543254: oracleV817 (DESCRIPTION= (LOCAL=YES)(ADDRESS= (PROTOCOL= beq)))Address Kbytes Resident Shared Private Permissions Mapped File00010000 26744 9368 8416 952 read/exec oracle oradebug dump heapdump 5 grant select on v_$instance to gitesh;Than gitesh will be able to access v$instance.It is needed to quaryfor database name that which database he or she is access109 What command is used to find the zombi processes /deadprocess in unix?ps -aef | grep defunct110 How to kill all the processes under perticulat file system ?fuser xkuc /uatfm - to kill the processes under /uatfm filesystem111 How to find what are the products installed in your database ?Select Application_ id, PATCH_LEVEL from fnd_product_installations wherePATCH_LEVEL LIKE %FND%112 Create a directory with the user privaliges from rootSu uatcappl c mkdir p /uatfm/uatappl113 Exporting a database from 9i and Importing on 8.1.7 database114 Sharing Tablespace Data Between Different DatabasesImporting a database from Oracle 9i to Oracle 8.1.7 is a problem.Oracle document says that it can be done for a table or user byuser. But usually this gives an error. More specially if you are 178. using Policy. I am listing a way to achieve this for the wholedatabase.Source database on Oracle 9i------------ --------- -------1. cd $ORACLE_HOME/ rdbms/admincp catexp.sql catexp92.sql2. Ftp the catexp.sql file for Oracle 8.1.7 installation to Oracle 9iinstallation.3. Apply the Oracle 8i catexp.sql file to Oracle 9i database as systo rebuild the export catalog on Oracle 9i database similar toOracle 8.1.7.4. Now take an export of oracle 9i database and ftp to oracle 8iinstallation.Target database on Oracle 8i------------ --------- -------Import the export file into Oracle 8i database. It will exportsuccessfully.Reason for error: There are some export catalog views in Oracle 9iwhich are not compitable with Oracle 8i.I have used process successfully.114 Sharing Tablespace Data Between Different DatabasesLast day of every month once inventory is closed from all over thecountry, production database is cloned to another server. Usingsome of tools data for current month are loaded into a reportingdatabase which holds the historical as well as current month enddata Corporate Reporting . Different groups/Teams use the samereporting databases using db-link to process the report . Processing 179. the data via database link sometimes cause a performance problem.Also we were storing the duplicate data for reference only . Toavoid db-link performance , duplicating data etc.. I came with ideato implement which is supported by oracle of "Sharing TablespaceData Between Different Databases" and it works.Requirements for implementationsThe tablespace(s) that are to be shared must have the same oracleblock size and must always be in READ ONLY status for bothdatabases. Also both databases should be on same server and theirversions should be same .PROCEDURE TO SHARE TABLESPACEThe To test these functionalities I used 2 databases namely DB1( source ) and DB2 target . DB1 is databases which holds the dataand it should be shared with DB2 databases . Assuming thattablespace ARJD to be shared between DB1 and DB2 , perform thefollowing steps :On database DB1SQL> create tablespace ARJD datafile /u03/gsbaseddata/ARJD01.dbf size 10M;Tablespace created.SQL> create user arjun identified by arjun default tablespaceARJD temporary tablespace temp;User created.SQL> grant connect , resource to arjun ;Grant succeeded.SQL> create table share_arjun (id number);Table created.Insert few records .....SQL> select * from share_arjun;ID----------10 180. 20SQL> alter tablespace ARJD read only;Tablespace altered.Export useridexp userid="sys/ change_on_ install as sysdba" file=arjd.dmptransport_tablespac e=y tablespaces= ARJDSQL> alter tablespace ARJD offline;Tablespace altered.On database DB2SQL> create user arjun identified by arjun default tablespace userstemporary tablespace temp;User created.SQL> grant connect , resource to arjun;imp userid="sys/ change_on_ install as sysdba" file=arjd.dmptransport_tablespac e=y datafiles=/u03/ gsbaseddata/ ARJD01.dbfTake tablespace on line from DB1.You can access the data from both database;113 How to find the file size greater than 2Gb ?Find /-xdev size +2048 ls |sort r +6115 How to determine the size of a Table ?Analyze table compute statistics( for the table youre interested in )followed by:select blocks from user_tables where table_name =then calculate: 181. blocks * block_sizeResult :- correct size116 How do I restrict or allow a few client machines to connect toServer ?(In 9I implement the same in sqlnet.ora in 8I .protocol.ora/protocol.oraThe step are very simple , you need the following things1) You must know the IP-address or host name of the clientmachine.2) You have to create a file named protocol.ora in a your favoriteeditor say notepad or vi and add the following lines in it.# Add the following lines if you want to invite only the followingclient machine to connectTCP.INVITED_ NODES =(, )# Add the following lines if you want to invite all the clientmachine except the followingTCP.EXCLUDED_ NODES=(, )# The following is the required parameter.TCP.VALIDNODE_ CHECKING= yesHere is the simple example, to allows the user to connect to theoracle database with IP-ADDRESS 192.168.11.20 or192.168.10.12 only , configure the protocol.ora as follows :-tcp.invited_ nodes=(192. 168.11.20 ,192.168.10. 12 )tcp.validnode_ checking= yes3)The destination of this file should be same as of sqlnet.ora andtnsnames.ora on the server.4)Stop and restart the listener to make this effect.117 Export file Greater than 2GB is not a problem in 8I ? 182. Filesize greater than 2Gb is always been a problem at most of OS.This new feature of oracle 8i split the output dump file accordingto your size of wish by using FILESIZE OPTION .Syntaxexp tables=file= filesize=FILESIZE=0 (default) Causes one file.FILESIZE=1024 Causes 1K files to be generated.FILESIZE=1K Same as above.FILESIZE=1M Causes 1Meg files to be generated.FILESIZE=1G Causes 1Gig files to be generatedFor exampleHere I am trying to create a dump file each of size 1000M.C:>exp sam/dba_pass tables=EMPTEST file=(exp1.dmp,exp2.dmp, exp3.dmp) filesize=1000MExport: Release 8.1.6.3.0 - Production on Thu May 3 13:09:052001(c) Copyright 1999 Oracle Corporation. All rights reserved.Connected to: Oracle8i Enterprise Edition Release 8.1.6.3.0 -ProductionWith the Partitioning optionJServer Release 8.1.6.3.0 - ProductionExport done in WE8ISO8859P1 character set and WE8ISO8859P1NCHAR character setAbout to export specified tables via Conventional Path .... . exporting table EMPTESTcontinuing export into file exp2.dmpcontinuing export into file exp3.dmp13333426 rows exportedExport terminated successfully without warnings.Observation : I observer file exp1.dmp, exp2.dmp and exp3.dmp infilesystem . exp1.dmp and exp2.dmp is of size 1000M andexp3.dmp is a last dump file of size 700K. 183. Now you have three export files exp1.dmp,exp2. dmp andexp3.dmp , so to import these dump files , you also have to useFILESIZE option of import utility.IMPORT from more then one dump fileSyntaximp tables= file=(file1. dmp,file2.dmp.. .) filesize=Caution : FILESIZE value in imp should match with FILESIZEvalue of Export eg in our case 1000Mfor exampleC:>imp sam/dba_pass tables=EMPTEST file=(exp1.dmp,exp2.dmp, exp3.dmp) filesize=1000M ignore=YImport: Release 8.1.6.3.0 - Production on Thu May 3 13:10:582001(c) Copyright 1999 Oracle Corporation. All rights reserved.Connected to: Oracle8i Enterprise Edition Release 8.1.6.3.0 -ProductionWith the Partitioning optionJServer Release 8.1.6.3.0 - ProductionExport file created by EXPORT:V08.01. 06 via conventional pathimport done in WE8ISO8859P1 character set and WE8ISO8859P1NCHAR character set. importing NGUV50s objects into NGUV50. . importing table "EMPTEST" 13333426 rows importedAbout to enable constraints. ..Import terminated successfully without warnings.Prior to 8I# create a named pipemknod exp.pipe p# read the pipe output to zip file in the backgroundgzip < exp.pipe > scott.exp.gz feed the pipeexp userid=scott/ tiger file=exp.pipe ... 184. 118 How to eliminate migrated or chained rows ?To eliminate migrated or chained rowsYou have to(i) Create chained rows table;(ii) Analyze table < table_name> list chained rows;(iii) Eliminate the migrated or chained rows either byexport/import or insert/delete method.Pratical example.Let us consider a table samtest in scott user. Now we willdetermine rowchaining in it and the way to eliminiate it.SQL> connet scott/tigerLet us consider your oracle home is e:ora816SQL> @ e:ora816rdbms adminutlchain. sqlAbove will create a chained_rows table in scott user.SQL> analyze table samtest list chained rows;Above will create populate a chained_rows table in case ofchaining.SQL > select owner_name,table_ name,head_ rowid fromchained_rows;Above will displays the rowid of migrated or chained rows ,if any. 185. If you found chaining eliminate is by export/import or insert/deletemethod.I am discussing here insert delete method.SQL > Prompt create a intermediate table firstSQL > create table samtest_tab2asselect * from samtestwhere rowid in (select head_rowid from chained_rowswhere table_name = samtest);Above will create a table samtest_tab2 with all the chained rows.SQL> Prompt Delete the chained rows from the original tableSQL> delete from samtestwhere rowid in (select head_rowid from chained_rowswhere table_name= samtest) ;SQL> Prompt insert the rows from the intermediate tablesamtest_tab2 to samtestSQL> insert into samtest select * from samtest_tab2;SQL> prompt drop the intermediate tableSQL> drop table samtest_tab2;SQL> DELETE * from chained_rows where table_name=samtest;SQL>Commit;This way you can eliminate row chaining . To avoid row-chainingset pctfree and pctusedcorrectly. The row moves to another block when it is not able to fitin the same block. If you have more update on the table set pctfreemore to make room in the block for increase in the size of the rowafter updation. 186. 119 Performance Measurement of PLSQL code byDBMS_PROFILERIf you are not already configured DBMS_PROFILE package lookthe following script in Oracle Home->rdbms- >adminSCRIPT : PROFLOAD.SQL and PROFTAB.SQLSETUP :U:>sqlplus /nologSQL*Plus: Release 9.2.0.1.0 - Production on Mon Apr 14 13:26:032003Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.SQL> connect sys/***** as sysdbaConnected.SQL> @D:oraclerdbms adminprofload. sqlPackage created.Grant succeeded.Synonym created.Library created.Package body created.Testing for correct installationSYS.DBMS_PROFILER successfully loaded.PL/SQL procedure successfully completed.Create the profiler tablesSQL> connect hr/hrConnected.SQL> @D:oraclerdbms adminproftab. sqldrop table plsql_profiler_ data cascade constraints *ERROR at line 1:ORA-00942: table or view does not existdrop table plsql_profiler_ units cascade constraints *ERROR at line 1:ORA-00942: table or view does not existdrop table plsql_profiler_ runs cascade constraints *ERROR at line 1:ORA-00942: table or view does not exist 187. drop sequence plsql_profiler_ runnumber *ERROR at line 1:ORA-02289: sequence does not existTable created.Comment created.Table created.Comment created.Table created.Comment created.Sequence created.The above script will create the following tablePLSQL_PROFILER_ DATA TABLEPLSQL_PROFILER_ RUNS TABLEPLSQL_PROFILER_ UNITS TABLELet us create a sample table and a procedure for demonstrationSQL> create table testemp(emp number);Table created.CREATE OR REPLACE PROCEDURE hr.testprocISi NUMBER := 0;vempno NUMBER;BEGINWHILE i < 100000LOOPINSERT INTO hr.testemp(emp)VALUES (i);COMMIT;i := i + 1;END LOOP;SELECT COUNT (*)INTO vempnoFROM hr.testemp; 188. DBMS_OUTPUT. put_line (No of record || vempno);DELETE FROM hr.testemp;COMMIT;FOR i IN 1 .. 100000LOOPINSERT INTO hr.testemp(emp)VALUES (i);COMMIT;END LOOP;END testproc;/The following PL/SQL will call the profileSQL> Set serveroutput on;SQL>SQLDECLAREvrun NUMBER;BEGINvrun := SYS.DBMS_PROFILER. start_profiler (TESTRUN1) ;DBMS_OUTPUT. put_line (START PROFILER STATUS||vrun);hr.testproc; -- calling procedurevrun := SYS.DBMS_PROFILER. stop_profiler;DBMS_OUTPUT. put_line (STOP PROFILER STATUS||vrun);DBMS_OUTPUT. put_line (0 successful) ;DBMS_OUTPUT. put_line (1 incorrect parameter);DBMS_OUTPUT. put_line (2 data flush operation failed);DBMS_OUTPUT. put_line (-1 version mismatch betweenpackage and tables);END;/Expected Output 189. START PROFILER STATUS 0No of record100000STOP PROFILER STATUS 00 successful1 incorrect parameter2 data flush operation failed-1 version mismatch between package and tablesPL/SQL procedure successfully completed.Now run the sql to find out the most extensive part of the plsqlSET linesize 132COL unit format a20COL tc format 9999999 heading "Exection"COL stext format a40SELECT u.unit_owner || . || u.unit_name unit, line#,ROUND (d.total_time / 1000000000) total_time_s, d.total_occurtc,SUBSTR (s.text, 1, 40) stextFROM plsql_profiler_ runs r,plsql_profiler_ units u,plsql_profiler_ data d,all_source sWHERE r.run_comment = TESTRUN1AND r.runid = u.runidAND d.runid = u.runidAND u.unit_number = d.unit_numberAND s.owner = u.unit_ownerAND s.TYPE = u.unit_typeAND s.NAME = u.unit_nameAND s.line = d.line#ORDER BY line#/Expected OutputUNIT LINE# TIME[s] Exection STEXT------------ --- ---------- ------------ -------- ------------ --------- ------------------ - 190. HR.TEST 3 0.000 1 i number := 0;HR.TESTPROC 6 58.000 100001 while i < 100000HR.TESTPROC 8 4,951.000 100000 insert into hr.testemp(emp )values (i);HR.TESTPROC 9 2,901.000 100000 commit;HR.TESTPROC 10 131.000 100000 i := i + 1;HR.TESTPROC 12 6.000 1 select count(*) into vempno fromhr.testHR.TESTPROC 13 0.000 2 dbms_output. put_line( No of record||vemHR.TESTPROC 14 1,461.000 1 delete from hr.testemp;HR.TESTPROC 15 0.000 1 commit;HR.TESTPROC 16 70.000 100001 for i in 1..100000HR.TESTPROC 18 5,371.000 100000 insert into hr.testemp(emp )values (i);HR.TESTPROC 19 2,955.000 100000 commit;120 When to rebuid an index ?Observation 1.Observe height in index_stats view after analyzing the particularindex. If it is >= 4 , it is good to rebuild index as it indicate askewed tree structure. Although there is always been an exceptionto this rule. So observer the height in index_stats time to time andif height remain unchanged . It may be assumed that It is correct .Obervation 2.Observe del_lf_rows and lf_rows in index_stats view afteranalyzing the particular index. If the percentage (del_lf_rows/lf_rows)* 100 > = 20 , It is good to rebuild index as it indicateunbalanced tree because of high update and delete occurred on it.Example :-ora816 SamSQL :> analyze index IND_PK validate structure;ora816 SamSQL :> select name,height, del_lf_rows, lf_rows,( del_lf_rows/ lf_rows) *100 from index_stats; 191. NAME HEIGHT DEL_LF_ROWS LF_ROWS (DEL_LF_ROWS/LF_ROWS)* 100------------ --------- --------- ---------- ----------- ---------- --------------------- ----INDX_PK 4 277353 990206 28.0096263ora816 SamSQL :> alter index IND_PK rebuild;Check the index_stats again.121 Explain the analytical functions with examples ROLLUP AND CUBE AGGREGATE FUNCTIONS RANKED FUNCTION CASE LAG AND LEAD FUNCTION RATIO_TO_REPORTTo understand the power of ROLLUP and CUBE functions,consider the following SQL statement :-ora816 SamSQL :> compute sum of totsal on deptnoora816 SamSQL :> break on deptnoora816 SamSQL :> select deptno,job,sum( sal) totsal from empgroup by deptno,job;DEPTNO JOB TOTSAL---------- --------- ----------10 CLERK 1300MANAGER 2450PRESIDENT 5000 192. ********** ----------sum 875020 ANALYST 6000CLERK 1900MANAGER 2975********** ----------sum 1087530 CLERK 950MANAGER 2850SALESMAN 5600********** ----------sum 9400Now see the use of ROLLUP Functionora816 SamSQL :> select deptno,job,sum( sal) totsal from empgroup by ROLLUP(deptno, job);DEPTNO JOB TOTSAL---------- --------- ---------- 193. 10 CLERK 130010 MANAGER 245010 PRESIDENT 500010 8750 Total of Deptno 1020 ANALYST 600020 CLERK 190020 MANAGER 297520 1087530 CLERK 95030 MANAGER 285030 SALESMAN 560030 940029025 Grand TotalSo if you compare the two output you will notice that you aregetting the same output. By using rollup you can avoid computeand break clausesfrom SQL. This will mostly helpful in PL/SQL .We do not have to put logic for computing values on break ofgroups.Now see the use of CUBE Function 194. ora816 SamSQL :> select deptno,job,sum( sal) totsal from empgroup by CUBE(deptno, job);Fri Mar 23NuGenesis ReportDEPTNO JOB TOTSAL---------- --------- ----------10 CLERK 130010 MANAGER 245010 PRESIDENT 500010 8750 Total of Deptno 1020 ANALYST 600020 CLERK 190020 MANAGER 297520 1087530 CLERK 95030 MANAGER 285030 SALESMAN 560030 9400 195. ANALYST 6000CLERK 4150MANAGER 8275 Total w.r.t JOBPRESIDENT 5000SALESMAN 5600Grand Total 29025Cube also do a total with respect to second group for example JOBin our case . Also at end you will see the grand totalConclusion : Rollup and Cube are the aggregate function whichallows developers and dbas to avoid compute and break clausesand simplify logic of programmingRanked Function in 8i (816)Suppose you have a data in table which you want to rank in aspecified order for example you have a table test and you want torank a value of repcol.Ora816 SamSQL> select * from test;REPCOL VALUE---------- ----------A 100A 200 196. A 300B 1000B 900B 800A 500B 400B 500Ora816 SamSQL> select repcol,value, rank() over ( partition byrepcol2 order by value desc ) ranked_value3 from test;REPCOL VALUE RANKED_VALUE---------- ---------- ------------A 500 1A 300 2A 200 3A 100 4B 1000 1 197. B 900 2B 800 3B 500 4B 400 5The above value is ranked by the rank function provided by 8.1.6Use of Case in SELECTCase Statement are similar to decode , it is more flexible and givesbetter performaceOra816 SamSQL> edWrote file afiedt.buf1 select sum(case when repcol=A then value else 0 end)sum_of_A,2 sum(Case when repcol=B then value else 0 end) Sum_of_B,3 sum(case when value = 500 then 1 else 0 end) Value_Eq_500,4 sum(case when value > 100 then 1 else 0 end) Value_Gre_1005* from testOra816 SamSQL> /SUM_OF_A SUM_OF_B VALUE_EQ_500 VALUE_GRE_100---------- ---------- ------------ ------------ - 198. 1100 3600 2 8Use of Group by in CASEOra816 SamSQL> edWrote file afiedt.buf1 select repcol,sum(case when repcol=A then value else 0 end)sum_of_A,2 sum(Case when repcol=B then value else 0 end) Sum_of_B,3 sum(case when value = 500 then 1 else 0 end) Value_Eq_500,4 sum(case when value > 100 then 1 else 0 end) Value_Gre_1005 from test6* group by repcolOra816 SamSQL> /REPCOL SUM_OF_A SUM_OF_B VALUE_EQ_500VALUE_GRE_100---------- ---------- ---------- ------------ ------------ -A 1100 0 1 3B 0 3600 1 5Ora816 SamSQL> ed 199. Wrote file afiedt.buf1 select (case when value between 100 and 300 then 100-3002 when value between 400 and 700 then 400-7003 when value between 800 and 900 then 800-9004 when value > 900 then >900 end) VALUE_RANGE,5 count(*) as VALUE_COUNT6 from test7 group by8 (case when value between 100 and 300 then 100-3009 when value between 400 and 700 then 400-70010 when value between 800 and 900 then 800-90011* when value > 900 then >900 end )Ora816 SamSQL> /VALUE_R VALUE_COUNT------- -----------100-300 3400-700 3800-900 2 200. >900 1Ora816 SamSQL> edWrote file afiedt.buf1 select (case when value between 100 and 300 then 100-3002 when value between 400 and 700 then 400-7003 when value between 800 and 900 then 800-9004 when value > 900 then >900 end) VALUE_RANGE, value5* from testOra816 SamSQL> /VALUE_R VALUE------- ----------100-300 100100-300 200100-300 300>900 1000800-900 900800-900 800 201. 400-700 500400-700 400400-700 5009 rows selected.Lag and Lead FunctionsOra816 SamSQL> edWrote file afiedt.buf1 select repcol,2 value,3 lag(value,1) over (order by repcol) lag_value ,4 lead(value,1) over (order by repcol) lead_value5* from testOra816 SamSQL> /REPCOL VALUE LAG_VALUE LEAD_VALUE---------- ---------- ---------- ----------A 100 200A 200 100 500A 500 200 300 202. A 300 500 1000B 1000 300 500B 500 1000 900B 900 500 400B 400 900 800B 800 4009 rows selected.The LAG function provides access to a row at a given offset priorto the position and the LEAD function provides access to a row ata given offset after the current position.The functions have the following syntax:{LAG | LEAD}(, [ [, ]]) OVER([PARTITION BY [,...]]ORDER BY [collate clause>][ASC | DESC] [NULLS FIRST | NULLS LAST] [,...])is an optional parameter and defaults to 1. is an optional parameterand is the value returned if the falls outside the bounds of the tableor partition.Ratio_to_reportThe RATIO_TO_REPORT function computes the ratio of a valueto the sum of a set of values. If the expression value expressionevaluates to NULL, RATIO_TO_REPORT also evaluates to 203. NULL, but it is treated as zero for computing the sum of values forthe denominator. Its syntax is:RATIO_TO_REPORT() OVER([PARTITION BY [,...]])where and can be any valid expression involving column referencesor aggregates. The PARTITION BY clause defines the groups on which theRATIO_TO_REPORT function is to be computed. If thePARTITION BY clause is absent, then the function is computedover the whole query result set.Ora816 SamSQL> edWrote file afiedt.buf1 select repcol,2 value,3 sum(value) over() sumofvalue,4 ratio_to_report (sum(value)) over() RATIO5 from test6* group by repcol ,valueOra816 SamSQL> /REPCOL VALUE SUMOFVALUE RATIO---------- ---------- ---------- ----------A 100 4700 .021276596 204. A 200 4700 .042553191A 300 4700 .063829787A 500 4700 .106382979B 400 4700 .085106383B 500 4700 .106382979B 800 4700 .170212766B 900 4700 .191489362B 1000 4700 .2127659579 rows selected.Ora816 SamSQL> edWrote file afiedt.buf1 select repcol,2 value,3 sum(value) over(partition by repcol) sumofvalue,4 ratio_to_report (sum(value)) over(partition by repcol) RATIO5 from test6* group by repcol ,valueOra816 SamSQL> /REPCOL VALUE SUMOFVALUE RATIO---------- ---------- ---------- ----------A 100 1100 .090909091A 200 1100 .181818182A 300 1100 .272727273A 500 1100 .454545455B 400 3600 .111111111B 500 3600 .138888889B 800 3600 .222222222B 900 3600 .25B 1000 3600 .277777778 205. 9 rows selected.122 What is High Water Mark ?High-water mark is an indicator or pointer up to which table orindex has ever contain data123 what is the utility used to licence a product ? Is it possible todelicence a product which is fully licenced ?A: adlicmgr.sh utility is used to licnece a product/productsYou cannot de-license an existing fully licensed product.124 how to find the version of iAS ?Apps 11.5.4 uses Apache 1.3.9 (must upgrade) Apps 11.5.5 usesApache 1.3.12 (iAS 1.0.2.1s) --> OHS 1.0.2.1s Apps 11.5.7 usesApache 1.3.19 (iAS 1.0.2.2.2) --> OHS 1.0.2.2 Apps 11.5.8 usesApache 1.3.19 (iAS 1.0.2.2.2) --> OHS 1.0.2.2karunakarkandhi: that means if the apache version is 1.3.19 meansiAS version is 1.0.2.2.2karunakarkandhi: rightbkpraveen25: yepbkpraveen25: Apache Version is 1.3.9 in Agilent125 How do you generate a report (.rdf) file from the UNIXcommand line?Solution Description------------ --------Use r25convm.The following command will convert an .rdf report file to a .rexreport fileand back to a .rdf report file: 206. r25convm syntax:cd to where your .rdf file resides which is:/srw If your Application version is 10.7/reports If your Application version is 11Logon as applmgrr25convm userid=/source=.rdfstype=rdffile dtype=rexfile dest=.rex overwrite=yesbatch=yesr25convm userid=/source=.rexstype=rexfile dtype=rdffile dest=.rex overwrite=yesbatch=yesie: r25convm FNDSCURS.rdf*Note: userid is the schema owner;If the report is a GL report then the userid will be gl/glIf the report is a FND report then the userid will be apps/appsFor the FNDSCURS.rdf example the report reside in:cd $FND_TOP/srw If your Application version is 10.7cd $FND_TOP/reports If your Application version is 11Logon as applmgrThe command line syntax is:r25convm userid=apps/ apps source=FNDSCURS. rdfstype=rdffile dtype=rexfile 207. dest=FNDSCURS. rex overwrite=yes batch=yesr25convm userid=apps/ apps source=FNDSCURS. rexstype=rexfile dtype=rdffiledest=FNDSCURS. rdf overwrite=yes batch=yes*** Note: You may get the following error; just ignore the errormessage, this*** is a known issue with the reports team.REP-25200: Converting FNDSCURS.rex to FNDSCURS.rdf ...126 How do you generate a report (.rdf file) from a Windows NTcommand line?Solution Description------------ --------Use r25conv32.exe to generate a report from the Windows NTcommand line.The following command will convert an .rdf report file to a .rexreport fileand back to a .rdf report file:r25conv32 syntax:1. Logon as applmgr2. cd to where your .rdf file resides which is:/srw If your Application version is 10.7/reports If your Application version is 113. Issue the following commands:r25conv32 userid=/ 208. source= .rdf stype=rdffile dtype=rexfile dest=.rexoverwrite=yes batch=yesr25conv32 userid=/source= .rex stype=rexfile dtype=rdffiledest=.rdfoverwrite=yes batch=yesExample: Generating FNDSCURS.rdf using r25conv32***Note: userid is the schema owner;If the report is a GL report then the userid will be gl/glIf the report is a FND report then the userid will be apps/apps1. Logon as applmgr2. For the FNDSCURS.rdf example the report resides in:cd $FND_TOP/srw If your Application version is 10.7cd $FND_TOP/reports If your Application version is 113. The command line syntax is:r25conv32 userid=apps/ apps source=FNDSCURS. rdfstype=rdffile dtype=rexfiledest=FNDSCURS. rex overwrite=yes batch=yesr25conv32 userid=apps/ apps source=FNDSCURS. rexstype=rexfile dtype=rdffiledest=FNDSCURS. rdf overwrite=yes batch=yes.127 Running SQL*Trace on an Applications Report ?Running a Report with SQL*Trace 209. ------------ --------- --------- -Method #1:---------Normally, in order to run a report with SQL*Trace, you wouldhaveto do the following:1. Turn SQL*Trace on by modifying your init.ora file.2. Shut down the concurrent managers and the database.3. Bring the database and the concurrent managers back up.4. Arrange to run JUST that specific report without runninganything else.5. After running the report, shut down the database andconcurrent managers.6. Turn SQL*Trace off by modifying your init.ora file.7. Bring the database and concurrent managers back up.Method #2:---------A simpler method is as follows (detailed instructions follow):1. Backup your current .rdf of the report.2. Modify the .rex for the report, adding two simple lines.3. Convert the new .rex into the new .rdf file.4. Run the report.5. Restore the original .rdf file.How to Run a Report with SQL*Trace using Method #2------------ --------- --------- --------- --------- --1. Backup your current .rdf and .rex files.2. Create the .rex file if necessary: 210. Make sure a .rex text file of the report exists. (Customers arenot shipped the .rex text file to save space on their system).If the .rex does not exist, create one by issuing the followingcommand as the applmgr user:r25convm userid= / source=.rdfstype=rdffile dtype=rexfile dest= .rexFor Example:r25convm userid=ar/ar source=RAXIIR. rdf stype=rdffiledtype=rexfile dest=RAXIIR. rex3. Edit the .rex file:A. Pull the .rex file into your editor of choice and searchfor SRWINIT. You should find an entry similar to thefollowing, with a NAME of beforerep__ __:Example I:DEFINE TOOL_PLSQLBEGINITEMID = 103NAME = PLSLFID_EP = (BLONG) NULLPOBJECT_ID = 0TYPEPLSLFID_ST = (TLONG)END 211. Example II:BEGINSRW.USER_EXIT( FND SRWINIT);IF (:p_debug_switch = Y) THENSRW.MESSAGE( 1,After SRWINIT);END IF;ENDB. Immediately after the ; which follows FND SRWINIT, (andremaining within the "" that surround the line) add thefollowing line:srw.do_sql( alter session set sql_trace=TRUE );The modified versions of the above examples should looklike the following:Example I:DEFINE TOOL_PLSQLBEGINITEMID = 103NAME = PLSLFID_EP = (BLONG) NULLPOBJECT_ID = 0TYPEPLSLFID_ST = (TLONG)ENDExample II: 212. BEGINSRW.USER_EXIT( FND SRWINIT);srw.do_sql( alter session set sql_trace=TRUE );IF (:p_debug_switch = Y) THENSRW.MESSAGE( 1,After SRWINIT);END IF;ENDC. Find the line similar to the following, by searchingfor SRWEXIT:ENDD. Immediately after the ; which follows FND SRWEXIT,but remaining within the "", add the following line:srw.do_sql( alter session set sql_trace=FALSE );For Example:ENDNOTE: This is really not necessary as the trace sessionwill terminate when the report completes, but its agood idea to include it as a precautionary measure.4. Convert the modified .rex file into a .rdf file:To do this, issue the following command as the applmgr user: 213. r25convm userid= / source=.rexstype=rexfile dtype=rdffile dest= .rdfFor Example:r25convm userid=ap/ap source=RAXIIR. rex stype=rexfiledtype=rdffile dest=RAXIIR. rdfNOTE: If you did not properly modify the .rex file, the systemwill not be able to generate the .rdf file. An example of themessage you may get is: "Conversion of RAXNCAR.rexcancelled".5. Run the report:Logon to the Applications and run the report through theconcurrentmanagers. When it has completed, exit the Applications.6. Access the trace file:The trace file will be located in the directory specified by theuser_dump_dest variable in your init.ora file.7. Restore the original report files:Restore the original .rdf file (and .rex if one existed beforemodification) . You may wish to backup the .rdf file containingthe SQL*Trace code, just in case you need to run it at a latertime. Once the issue youre troubleshooting is resolved, youcan delete it.128. How to find the Apache Version?The Apache version can be obtained from the httpd executable: 214. $ORACLE_HOME/ Apache/Apache/ httpd -version.129 how to find the ojsp version ?Login: Accessing ibeCZzdMinisites. jsp it is giving theApplication error - java.lang.ClassCast Exception: java.lang.ObjectCause: Profile Option valueResolution: Reset the profile option "IBE: Preload Specialty StoreCache" to null at all levels, clear the cache, and bounce apache[top]Login: "Application Error" when logging into iStore home page(ibeCZzpHome. jsp)Problem: When logging into iStore home page (ibeCZzpHome.jsp) it shows "Application Error". Java Stack showsjava.lang.NullPoint erException You have to use the DeleteCookies option (in IE) to get around this. Even restarting thebrowser doesnt handle it until you delete the cookies. - The FNDpatchset level is E. - The OJSP version is: 1.1.0.0.0Resolution: You may need to upgrade to either OJSP 1.1.1.0 orOJSP 1.1.2.0. Refer to Note 132604.1 on how to upgrade yourOJSP. To check your OJSP version: Create a jsp file with thefollowing code, place it in the OA_HTML directory and call itfrom the browser. OJSP VersionGetter The OJSP version that youare using is: