Infolinks

Friday, 6 July 2012

APPS FAQS11

oracle apps all interview questions and answers



How do I start a SQL*Net trace? (on the client)
In sqlnet.ora, set: TRACE_LEVEL_CLIENT=16
TRACE_FILE_CLIENT=
(to use a different file name, default is sqlnet.trc)
TRACE_DIRECTORY_CLIENT=
(to put the trace file in a different directory, default is ORACLE_HOME\network\trace)

How do I start a SQL*Net trace? (on the listener)
Use: lsnrctl trace 16
lsnrctl trace off
Or:
In listener.ora, set: TRACE_LEVEL_LISTENER=16
TRACE_FILE_LISTENER=
(to use a different file name, default is listener.trc)
TRACE_DIRECTORY_LISTENER=
(to put the trace file in a different directory, default is $ORACLE_HOME/network/trace)

How do I start/stop the TNS listener?

To start the listener: lsnrctl start [listener name]
To stop the listener: lsnrctl stop [listener name]

The listener default name is LISTENER. If the listener has a different name, you must supply the name

To reload the listener.ora file: lsnrctl reload [listener name]
To check the status: lsnrctl status [listener name]
Reports/Printing

How do I run reports from the commandline?
ar25run userid=apps/apps@database destype=file desname=try.out
desformat=$FND_TOP/srw/L
batch=yes report=

Substitute the report name you want to run. Use the srw file appropriate for the report
The output will be in the try.out file

How do I run ar25run in debug mode?
Under $FND_TOP/bin there should be two files: ar25run, and ar25rund
Rename ar25run to ar25run.save
Rename ar25rund to ar25run
Now, whenever a report is run, it will produce a log file called ar20run.log
This file will contain the command line used to run the report, as well as the environment
(Note that this will not actually run the report)

How do I relink Reports?
cd $ORACLE_HOME/reports25/lib
make -f ins_reports25.mk cinstall
make -f ins_reports25.mk minstall

How do I install SQL*Report?
On the 10.7 CD, there is a directory called rdbms732.
Under this is a directory called rptpatch.
Copy this directory to your local disk and run the script 'patchutil.sh'
On HP-UX, the directory does not exist on the CD. Instead, there is a
file called PATCHES. Copy this file to your disk and execute:
cpio -icdvu < "PATCHES;1"

What are the different Reports executables?
The Applications versions: (These are linked with Applications user exits)
ar25desb: Reports Designer
ar25run: Reports runtime - ascii
ar25runb: Reports runtime - bitmapped
ar25rund: Reports runtime - debug version

The regular Reports versions:
r25desm: Reports Designer
r25run: Reports runtime - ascii
r25runm: Reports runtime - bitmapped

How do I troubleshoot print driver problems? One technique is to create a shell script that will capture the print command and arguments the concurrent manager is using.

1) Create the following shell script and place in a directory in the
concurrent managers PATH (such as /usr/bin)
2) Give execute privileges to the script
3) Shut down the managers
4) Pick a print driver and add the name of the script before the lp command in the
Arguments field
eg. testprt lp -c -d$PROFILES$.PRINTER ...
5) Make sure this driver is assigned to a style and a printer
6) Start the managers
7) Print a report using this driver
8) The output should look like:
Mon Jul 6 10:49:34 EDT 1998
Arguments are: lp -c -dorlprt1 -n1 -tPFERGUSO.1457540 /usr/tmp/OFAAAa001O_.t

The script is:
#!/bin/sh
(date; echo 'Arguments are: '$*;cat) >>/tmp/oracle-wws.log

This is for print drivers with std input set to yes
For drivers with std input set to no, remove the 'cat' command

You will see the actual command executed by the concurrent manager, and any arguments passed to it. You should be able to execute this from the command line. From the example above, we see that lp is being called to print one copy on printer
orlprt1, with the title being 'PFERGUSO.1457540'
The last argument is the file to be printed. You can open up this file and see the escape codes at the top and bottom. From this information, you can determine if the concurrent manager is using the correct arguments and escape codes. If everything looks OK, and the problem replicates from the command line, the problem may be with the printer or the OS print services.

How do I add escape codes at the beginning of a report?
Open the report in vi (Note that 'more' does not always display escape codes)
Add an escape character with: Ctrl-V Ctrl-[
This will show up as: ^[
This corresponds to the /e in the form.
Eg. if you have the escape code /e&k3G in the form, add: Ctrl-V Ctrl-[ &k3G
This will show up as: ^[&k3G
Once you add the escape codes, you can use 'lp' to print the report. This lets you
troubleshoot the correct escape code sequence much faster than submitting a report.

How do I get a title printed on the banner page of a report?
Use the '-t' option of lp
Add this option to the arguments field in your print driver.
For example, the command line might look like:
lp -c -t "This is the title" -d$PROFILE$.PRINTER ...
Alerts

How can I find an event alert trigger?
You need to know the name of the table the event alert is on
Connect as APPS in SQL*Plus
SELECT trigger_name, table_name, status
FROM user_triggers
WHERE table_name = 'TABLE_NAME';
Alert triggers will have names like: ALR_TABLE_NAME_IAR or ALR_TABLE_NAME_UAR
the IAR trigger is the INSERT trigger, the UAR trigger is the UPDATE trigger
Selecting TRIGGER_BODY from USER_TRIGGERS will give the text of the trigger
Concurrent Manager

Check/set the PMON method?
To check the PMON method:
1) cd $FND_TOP/sql
2) sqlplus apps/apps @afimchk.sql
This will tell whether the internal manager is running, what the PMON method is,
and where the log file is

To set the PMON method:
1) first shut the concurrent managers down
2) cd $FND_TOP/sql
3) sqlplus apps/apps @afimpmon.sql LOCK (or RDBMS)

Enable/disable the Conflict Resolution Manager?
Use the system profile option 'Concurrent: Use ICM'
Setting this to No (which is the default) allows the CRM to be started
Setting it to Yes causes the CRM to be shutdown and the Internal manager will take over the conflict resolution duties.
If the CRM will not start (it is started automatically by the ICM), check this profile option.


Clean out the Concurrent Manager tables? First, be sure to shutdown the managers
As the APPLSYS user:

DELETE from fnd_concurrent_processes;

UPDATE fnd_concurrent_queues
SET running_processes=0, max_processes=0;

DELETE from fnd_concurrent_requests
WHERE status_code='T';

If you do not need the information in fnd_concurrent_requests and it is getting very large, you can truncate this table as well. This also works to shutdown the concurrent managers after killing the OS processes.


Tell concurrent manager processes apart?
Use: pf -ef grep FNDLIBR

This will produce output like:
vd11 13703 13660 0 May 11 ? 0:01 FNDLIBR FND Concurrent_Processor
MANAGE OLOGIN="APPS/94A491A1000000000000000000
n1070161 24936 24927 0 Apr 29 ? 0:05 FNDLIBR FND Concurrent_Processor
MANAGE OLOGIN="APPS_APPDEMO/94C4B1C10000000000
n1070161 24938 24927 0 Apr 29 ? 0:06 FNDLIBR FND Concurrent_Processor
MANAGE OLOGIN="APPS_APPDEMO/94C4B1C10000000000
n1070161 24927 24922 0 Apr 29 ? 2:03 FNDLIBR FND CPMGR FNDCPMBR sysmgr
="" sleep=60 pmon=20 diag=N logfile=/u16/app

The last process, #24927, shows 'FNDLIBR FND CPMGR'
This one is the Internal concurrent manager
Notice that it gives some of the parameters it was started with.
The other processes showing 'Concurrent_Processor' are Standard manager processes
Notice that the Internal manager process is the parent process of the Standard managers. (processes 24936 and 24938)

Other managers will have the name of the executable, like ARLIBR or INVLIBR:
$ ps -ef grep ARLIBR
vd11 13683 13660 0 May 11 ? 0:20 ARLIBR APPS/82A2A4940000000000000
000000000000000000000000000000000000000 AR ART

The Conflict Resolution manager will look like:
$ ps -ef grep FNDCRM
n1070161 24941 24927 0 Apr 29 ? 1:17 FNDCRM APPS_APPDEMO/84BFBEB900000
0000000000000000000000000000000000000000000000

I hit the Restart button to start the Standard manager but it still didn't start?
Telling a manager to restart just sets the status to Restart. The ICM will start it the next process monitor session or the next time the ICM starts.
Use Activate to start a manager immediately.
Also, when a manager is deactivated manually, the ICM will not restart it. You will need to set it to Restart, or activate it manually.

Why does the "to start" date of my concurrent request default to 24 hours in the past?
The short story:
If you get patch 387798, then this behavior can be turned on and off using the profile "Concurrent:Multiple Time Zones".
The long story:
This behavior is a temporary fix until we can build time zone support into the product in a future release.
If the profile "Concurrent:Request Start Time" is set, then we default the "to start" date of a request to that value. Otherwise we assume that the user wants the request to start as soon as possible.
Problems occur when the user is in a time zone that is ahead of the time zone in which the concurrent managers are running. Say a user submits the request in a field office in the Eastern time zone at 9:00, so we default the requested start date to 9:00. But now the concurrent managers are at HQ in California, so user's request will run at 9:00 Pacific time, 12:00 Eastern. In order to default requests to start as soon as possible, we submit them to start 24 hours before their request date. This covers the worst case time zone difference.

Can I submit a report set using CONCSUB?
No, you may not. This is documented in bug 334337.

How do I submit a request with CONCSUB that has a null parameter?
Use '""' as the null parameter.
(Single quote, double quote, double quote, single quote)

How can users submit requests with CONCSUB without giving them the APPS password?
Try this:
1. As the applmgr user, create a shell script that runs CONCSUB
Either hardcode the parameters for the report, or pass them in as parameters to the
script.
2. Change the permissions on this script to 700. Now no one can read this script and get
the password.
3. Create another script that calls the first script. Pass parameters along if you need
to.
4. Change the permissions on this script to 6755. Now any user can execute and read
the second script, which calls the first one. Have the users run this script to submit
their requests without knowing the password.

What is the syntax for controlling the concurrent manager using startmgr and concsub in NT? On NT, the concurrent manager is run as an NT service. You start and stop the managers using the Services control panel.
See the Applications Installation manual for NT, Appendix A for details.
See pg. 5-9 of this manual for instructions on creating the concurrent manager service.
NCA

Do I need to reinstall the 16.1 server patches when I install NCA?
NO! See the 10.7 NCA install manual. Chapter 2 says that if you previously installed
the 16.1 server patches, you can omit all steps in the chapter.
The patches included with 16.1 and the NCA server updates are exactly the same thing.

How do I get help files to work with the appletviewer?
1) Configure the virtual directories for the web server
This is documented in the 10.7 NCA installation notes and the Release 11 installation
manual. 10.7 NCA calls for using oa-doc, and R11 calls for OA_DOC.
Either way, the virtual directory should point to where the help files have been
installed.
2) Make sure the parameter clientBrowser is NOT commented out in the html file
You should remove the exclamation mark at the beginning of the tag
3) Make sure that the path to Netscape (or whatever browser you are using) is included
in the PATH environment variable.
One way is to add a line to the batch file that starts the appletviewer that
appends to the PATH variable. This way, every time that the batch file is run,
the correct path will be used.
4) Make sure the environment variable HELP_BASE_URL is set on the Forms Server.
It should be set to: http://server name:port/oa-doc
In Release 11, it is set with the profile option 'Help System Base URL'
http://server name:port/OA_DOC

How do I get the Forms server to produce a diagnostic log file?
See Using Forms Runtime Diagnostics
When using this with webforms, you add the "record=collect" parameter to the serverArgs parameter in your html file.
For example, if your html file contains:

You would change it like so:


How do I tell if the Forms Server is running?
Use: ps -ef grep f45
The forms server process is called f45srvm
You will also see other processes named f45runw. There should always be at least one of these processes. Each user that connects will spawn another f45runw process.
Example:
$ ps -ef grep f45
oracle 68 1 0 May 11 ? 0:00 f45srvm port=9002 pool=1
oracle 18295 68 0 Jun 12 ? 0:00 f45runw webfile=7,80

What is f45runw? What happened to f45webm?
For some reason, the f45webm executable is executed with the name f45runw. They are the same thing, f45webm is the name of the executable on disk, and f45runw is the name of the process.

How does my environment need to be set before starting the Forms Server?
The Forms server needs to be started with a complete Applications environment, similar to starting the concurrent managers. This means having APPL_TOP set, and sourcing the APPLSYS.env environment file.
The Forms server will encounter many problems, including failing to start, if this is not done.

What is f45ctl for?
f45ctl is used to start/stop the Forms server. This way, you do not need to start it in the background, and the process will not terminate when you log out.
f45ctl { start stop } port=port_num log=log_file
Example: f45ctl start port=9000 log=f45log.txt
port number and log file are optional, it will use 9000 as the default port

Run the Forms server on a different port using the static html file?
In the html file, add the line:

after the other PARAM tags, using the port number you want
Then start the Forms server on that port

Do I need separate ORACLE_HOMES for my database server and my Forms server if they are on
the same machine?

Yes, because Dev2K 1.3.2 is installed in one, and Dev2K 1.6 is installed in the other. You can install them both in one home, but you will have problems when you try to relink.

What about Release 11?
In Release 11, Dev2K 1.6.1 is used for both Forms and Reports so you can install
the database server and forms server in one home.

Can I run more than 1 Forms server on a machine?
Yes, on different ports.

What is the correct syntax for running a local copy of the jar file?
archive="file:///c:/java/jdk1.1.5.16/appscore.jar"
(Using the correct path and drive letter for your PC)

Can I use the same html file for JInitiator as the appletviewer?
No, the JInitiator file contains and tags instead of
an tag. You will get an error using this file with the appletviewer.
Java/JDK

How do I tell what version of the JDK I am using?
At a command prompt, type: java -version

How do I get a stack dump from the appletviewer?
In the DOS window where appletviewer is running, hit Control and Break

What is the difference between the JDK and JRE? JRE is the Java Runtime Environment
JDK is the Java Developers Kit
They both can run Java programs, the JDK is also a full development environment.
It contains the Java compiler and other utilities required to create Java programs,
The JRE can only run the programs.

What is this CLASSPATH thing anyway? CLASSPATH is an environment variable the Java interpreter uses to search for class files.
It is set to a colon separated list of directories, similar to the PATH variable.
It it used both to locate the Java system classes, and user-written classes.
In Java 1.0, you always had to set it, or it would not be able to find the system classes.
In Java 1.1, the interpreter uses classes.zip and the current directory as a default if CLASSPATH
is not set.
This means that using the 1.1 JDK on the PC, you do not need to set CLASSPATH.
It also means that if you do set it, you must include the defaults, or the system classes will
not be found.
The JRE uses rt.jar instead of classes.zip, so always include this file in CLASSPATH.

What is the story on those yellow bars on the appletviewer windows?
The Java security mechanism normally prevents applets from performing certain actions on the user's
machine. These include accessing the local disk, launching programs, and printing.
This is a good thing, since you would not normally want to download an applet off the Internet
and have that applet be able to do these things on your computer. (That would spoil all
the fun for the virus writers)
The yellow bars signify that this is an 'untrusted' applet, and it will not be allowed to do these
things. (You will not be able to print from Action->Print, or launch a browser to view Help files.)
Oracle supplies a digital certificate with Applications that essentially turns the applet into
a 'trusted' applet, and the yellow bars are not displayed.
This is the reason for running appscert.bat and importing the certificate before running Apps.

How do I specify where I want the identitydb.obj file to be put on the client?
The identitydb.obj file is created when javakey is first run. (From appscert.bat)
This file is used to hold security information for the appletviewer
In the jdk\lib\security directory is a file called java.security
Add a line to this file:
identity.database=C:\\directory\\path
using the path you want the file placed in
Note that you must use double backslashes

Where can I find documentation on the appletviewer, javakey, etc.?
Go to the Tools Reference Page at Sun's www.sun.com
Customization

How do I create a custom application?
Step 1: Create the directory
Create a top directory for your product underneath $APPL_TOP.
Make sure applmgr has the correct ownership and permissions.
Create subdirectories underneath this directory that you will need.
(bin, forms, log, out, lib, etc.)
Add an entry into your APPLSYS.env file to set the product top environment variable:
PF_TOP=/u01/appl/pf
export PF_TOP
If you will be creating custom 10SC forms, you will need to create a
top directory on the client PCs. Create a Forms and a Mesg directory
underneath it, and add the product top environment variable to oaconfig.ora.

Step 2: Create the Oracle ID
Create a new Oracle ID in the database. Give the new schema any roles and privileges it will need.
At this time you can run $AD_TOP/admin/sql/adappss.pls and adappsb.pls to create the APPS_DDL and APPS_ARRAY_DDL packages.

Step 3: Register the Oracle ID
Navigate to the Register Oracle ID form. Enter the custom Oracle ID,
password, and logical database. Select 'Register' and save the screen.

Step 4: Register the application
Navigate to the Register Applications form. Enter the long and short
application name, abbreviation, and product top environment variable.

Step 5: Add the application to a datagroup
Navigate to the Define Data Group form. Add your application to a datagroup,
using the APPS schema as the Oracle ID.

Step 6: Register custom tables and packages
Custom tables and indexes are created in the custom schema, and registered
with AOL using the AD_DD package. See Appendix B of the Installation
manual for an example of this. The APPS schema must have a synonym for
all tables, and be granted privileges on them. Custom packages and procedures
must be created in the APPS schema.

Now custom concurrent programs, forms, reports, etc. can be registered against
your new application.

How do I register a custom concurrent program?
Step 1: Register a concurrent program executable
Navigate to the Define Executable form (AOL Reference manual pg 9-84)
This determines the type of program being run,
ie an Oracle Report, a C program, a shell script etc.
Fill in the executable name, application and execution method.
For the Execution File, fill in just the filename. The concurrent manager will
look in the appropriate directory under the application's top directory.
For spawned programs, the file must be in the bin directory, for Oracle Reports the
rdf file must be in the srw directory.
For PLSQL concurrent programs, put the name of the stored procedure.

Step 2: Define the concurrent program
Navigate to the Define Concurrent Program form (AOL Reference manual pg 9-87)
This form links a concurrent program to the executable you just defined, as well as
defines the programs parameters, incompatibilities, and other options.

Enter the concurrent program name, application, short name and description.
Check Standard Submission if you want to be able to submit this program from the
Standard Report Submission form.
Enter the name of the executable you defined and any report information if necessary.
Also define any parameters your program needs here and any incompatibilities.

Step 3: Add the concurrent program to a Report Group
First you will need to find the name of the Report Group to use.
Go to Security->Responsibility and query the responsibility you want to run the program with.
It should show a Report Group name. Query this name in Security->Responsibility->Report
Add your new program to the list of available programs. Now when you go to submit
a request with this responsibility, you will be able to submit your custom program.

How do I compile a custom C program?
Spawned programs:
Step 1: Write the code
Step 2: Compile the source
You must use the makefile under $FND_TOP/usrxit
Use: make -f $FND_TOP/usrxit/Makefile program.o
We do not support using any other makefile
Step 3: Link the program
This part is a little tricky. You need to create a custom makefile for this step.
Use $FND_TOP/lib/sample.mk as a starting point. Copy this file to the lib directory
under your applications top directory. Rename it .mk (ie fnd.mk, gl.mk etc)
Modify this file according to the directions in it. Basically you need to add a target
and build commands for your executable.
Next, use adrelink to link the executable:
adrelink force=y ranlib=y "shortname programname"
Step 4: Register the program as in the above question

Immediate programs:
Just don't do it.

How do I run a shell script as a concurrent program?
1: Write the script and call it .prog
Place the script under the bin directory under your applications top directory.
For example, call the script CUSTOM.prog and place it under
$CUSTOM_TOP/bin
2: Make a symbolic link from your script to $FND_TOP/bin/fndcpesr
For example, if the script is called CUSTOM.prog use this:
ln -s $FND_TOP/bin/fndcpesr CUSTOM
This link should be named the same as your script without the .prog extension
It should be in the same directory as the script.
3: Register a concurrent program as described above, using an execution method of 'Host'
Use the name of your script without the .prog extension as the name of the executable
For the example above, you would use CUSTOM
4: Your script will be passed at least 4 parameters, in $1 through $4
These will be: orauser/pwd, userid, username, request_id
Any other parameters you define will be passed in $5 and higher.
Make sure your script returns an exit status.
5: If your script returns a failure exit status but the concurrent manager does not report the error (shows it as still running normal)
apply patch 442824

Can I run my custom forms with Forms Designer?
16-bit (SmartClient):
You should be able to run forms with the Forms Designer that comes on the SmartClient CD. The debugger will not work, however. See bug

32-bit (NCA):
If the forms are AOL forms (ie created from template.fmb) they cannot be run from the Forms Designer or Forms Runtime because these executables do not have the AOL user exits linked in.
You will see many FRM-40800 errors trying to run forms this way.
Also see bug 414115 that describes a problem with Forms 4.5 and attaching libraries.
The only way to run these forms is through Applications.

Why do my PLSQL stored procedure concurrent programs error out with:
'Invalid number of arguments'?
See pg. 9-79 of the AOL Reference manual.
PLSQL concurrent programs must have 2 OUT arguments defined.
RETCODE is used to return the error status
ERRBUF is used to return an error message
Note that you do not need to define these arguments in the Define Arguments form,
only in the procedure itself.

How come when I close my custom form using the 'X' close box I get an export window popping up?
You need to look at the procedure APP_CUSTOM.CLOSE_WINDOW
This procedure is defined in the TEMPLATE form. It contains instructions in the comments on how to modify this procedure. You must do this for all of the custom forms you write or you will have problems closing the window.

How do I preserve customizations through an upgrade?
The upgrade process may overwrite any data owned by one of the Oracle Applications.
Move all of your customizations (menus, responsibilities, report groups, etc) to a custom application. After the upgrade, you can move them back if you want.

Can I disable the items in the Help menu? (like Trace, Debug, etc)
Yes.
Web Applications

How can I assign responsibilities in Release 11 Web Apps?
In Release 11, regular applications users and web users have been merged. This means that the same user name and password is used to log into Apps and Web apps. Also, OSSWA responsibilities are assigned in the Define Users form, just like regular responsibilities.
This also means that FND_WEB_USERS is no longer used.

Where do I find the configuration files for the Webserver?
Go to $ORAWEB_ADMIN (usually $ORACLE_HOME/ows/admin).
Navigate down to the ows directory, then into the site name directory.
There should be a wrb directory here and a http_servername directory here.
Under the wrb directory will be a config directory and a log directory.
In config, you will find a file called wrb.app. This file contains the configuration for the Web Request Broker.
It is all the information you enter on the admin screens. (ie, all the DAD info, cartridge info, virtual directories etc..)
The log directory of course holds log files.
Back up in the http_servername directory, you will find directories for each listener.
In each directory there will be config and log directories again.
In the config directory is a file called sv'listenername'.cfg (substitute the name of the listener)
This file holds the configuration for this listener.
Database questions

Which version of 'alter package' compiles just the header? the body? both?
ALTER PACKAGE package_name COMPILE - compiles the header and the body
ALTER PACKAGE package_name COMPILE PACKAGE - compiles just the header
ALTER PACKAGE package_name COMPILE BODY - compiles just the body

How do I find the errors when a package will not compile?
From SQL*Plus, 'show errors' will usually give you the last error messages.
SELECT name, text FROM user_errors will give you the errors.

What is the best way to recompile invalid objects? This has been debated, but my money is on adadmin. It uses the AD_PARALLEL_COMPILE_PKG
to find invalid objects, create a dependency tree of them, and divides the jobs up among multiple workers.
Also, the adcmpusr script does the same thing, if adadmin is not working, or you really just want to run a script.

How do I get the version of a package or package body?
The table USER_SOURCE contains the text of all the packages in the current schema.
Each package header or body will have a version number in the text, something like:
/* $Header: AFSCWEBS.pls 61.0 98/08/13 09:26:56 porting ship $ */
This shows that this package is version 61.0
You can use:
SELECT text FROM user_source WHERE name = AND TEXT LIKE '%$Header%';

This also shows the name of the file (AFSCWEBS.pls) that contains the CREATE statement for this package. You can run this script if you need to recreate this package.

How do I find the name of the script that creates a particular package header or body? See the question above.

How do I backup a table?
CREATE TABLE backup_table AS SELECT * FROM table_to_backup;

No comments:

Post a Comment