четверг, 29 апреля 2010 г.

How To Change The Default Export Location For Discoverer Plus 10g(DefaultExportPath)

Applies to:

Oracle Discoverer - Version: 10.1.2.0.0 to 10.1.2.3
Information in this document applies to any platform.

Goal

When exporting to various formats via Discoverer Plus 10g (10.1.2), the file is always sent to a location like "C:\Documents and Settings\."

How can this default export location be changed?

Solution

The Sun java virtual machine plug-in used for Discoverer Plus is installed and is specific to each PC.
You can set some system-level properties per the Sun JVM "Deployment Configuration File and Properties Guide.

However, the guide does not specifically indicate you can set the user home at the system-level.
Setting the user home at the local PC level will allow changing the default export path for Sun JRE 1.4.
This option is only available for Sun JRE 1.4.

NOTE: For Sun JRE 1.5 and above, you can only specify a different location for all users (not for individual user), for more information please refer to Note 365245.1.

The user (or administrator) is required to make the following changes locally on every PC.

For Sun Java Plugin:

  1. Locate the file "C:\Documents and Settings\\Application Data\Sun\Java\Deployment\deployment.properties",
    and add the entry below :


    user.home=


    For example: If the new directory is: 'D:\DISCO_1012\TEMP', then the entry would look like this
    (with double backslashes in lieu of a single backslash):

    user.home=D:\\DISCO_1012\\TEMP


  2. Save the "deployment.properties" file once the entry is added.

  3. Close all browsers and relaunch Discoverer Plus in a new browser session.

  4. Run a workbook and perform export, which will attempt to export to the new directory.

For Oracle Jinitiator Plug-in:

1. Open Windows Control Panel,  double click on "Jinitiator 1.3.1.xx" icon,
click on cache tab and note down the value set for Location under
"JAR cache Settings".
Suppose the value is set to "C:\WINNT\Profiles\jdoe\Oracle Jar Cache"

2. Click on Start >> Run
and type the command:

explorer %userprofile%\.jinit

This opens Windows Explorer with the current directory as %userprofile%\.jinit

3. Check if there is any file with name:

properties13xx (used by Jinitiator 1.3.1.xx)

4. If there is no such a file create a new file with name properties13xx
(for example properties1318, if using jinitiator 1.3.1.8) and add
the following entries:

jarcache.directory=

(make sure to put two backslashes in the place of single backslash)

user.home=

(make sure to put two backslashes in the place of single backslash)

For example:

user.home=D:\\TEMP
jarcache.directory=C:\\WINNT\\Profiles\\jdoe\\Oracle Jar Cache

(Note there are two '\' between directory name separators)

5. If there is already existing file properties13xx in the
%userprofile%\.jinit directory and jarcache.directory entry
exists in this file and it is pointing to a directory, then do not change it.
Only add the entry for user.home as shown in step 4 at the end of the file.
Before modifying properties13xx file, take a backup of those files.

6. Save the file.

7. Exit all the browser windows.

8. Invoke a new browser window to run Discoverer Plus.

Now export from Discoverer Plus should create files under the directory to
which user.home entry points to.

понедельник, 26 апреля 2010 г.

Where is listener information stored in Database

Where is listener information stored in Database

In E-Business Suite, the information about listeners is stored in the tables

APPS.FND_TNS_LISTENERS
APPS.FND_TNS_LISTENER_PORTS

SQL> SELECT A.LISTENER_NAME,B.PORT
FROM APPS.FND_TNS_LISTENERS A, APPS.FND_TNS_LISTENER_PORTS B
WHERE A.LISTENER_GUID = B.LISTENER_GUID
/

LISTENER_NAME########## PORT
---------------------------###########-------
1 APPS_app_pr_APPS##########1626
2 db_pr_DB##################1521

How to find out which users are logged on to an Apps instance

FND_USER table stores the details of all the end users. If we give this query:

select user_name,to_char(last_logon_date,'DD-MON-YYYY HH24:MI:SS')
from apps.fnd_user
where to_char(last_logon_date,'DD-MON-YYYY')=to_char(sysdate,'DD-MON-YYYY');

USER_NAME TO_CHAR(LAST_LOGON_DATE,'D
------------------------------------
GUEST 05-MAR-2010 16:01:47
SYSADMIN 05-MAR-2010 16:02:06


The above query can give you a good idea who is logged on.

For a more accurate result, refer to metalink note 269799.1 which says:

You can run the Active Users Data Collection Test diagnostic script to get information about all active users currently logged into Oracle Applications.This diagnostic test will list users logged into Self Service Web Application, users logged into forms, and users running concurrent programs. Please note that to collect the audit information about the users who have logged into Forms, the "Sign-On:Audit Level" profile option should be set to Form. You can access this Diagnostic test via Metalink Note# 233871.1.

воскресенье, 25 апреля 2010 г.

Calculate number of concurrent users of an existing instance

Calculate number of concurrent users of an existing instance

The view v$license keeps track of concurrent sessions and users.

SQL> desc v$license
Name Null? Type
----------------------------------------- -------- ----------------
SESSIONS_MAX NUMBER
SESSIONS_WARNING NUMBER
SESSIONS_CURRENT NUMBER
SESSIONS_HIGHWATER NUMBER
USERS_MAX NUMBER
CPU_COUNT_CURRENT NUMBER
CPU_CORE_COUNT_CURRENT NUMBER
CPU_SOCKET_COUNT_CURRENT NUMBER
CPU_COUNT_HIGHWATER NUMBER
CPU_CORE_COUNT_HIGHWATER NUMBER
CPU_SOCKET_COUNT_HIGHWATER NUMBER

select sessions_current from v$license;

The above query will give you the number of concurrent users right now.

You can write a small job which will capture this information every hour for a week. Once you have this data, you can take an average of this data to get the number of concurrent users.

FAILED: file icxwtab.odf during adpatch

Recently while patching, the worker running icxwtab.odf failed:

ATTENTION: All workers either have failed or are waiting:

FAILED: file icxwtab.odf on worker 1.

ATTENTION: Please fix the above failed worker(s) so the manager can continue.

adworker log showed:

Start time for statement below is: Wed Jul 09 2008 17:12:20

CREATE UNIQUE INDEX ICX.ICX_TRANSACTIONS_U1 ON ICX.ICX_TRANSACTIONS
(TRANSACTION_ID) LOGGING STORAGE (INITIAL 4K NEXT 104K MINEXTENTS 1
MAXEXTENTS UNLIMITED PCTINCREASE 0 FREELIST GROUPS 4 FREELISTS 4 ) PCTFREE
10 INITRANS 11 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE ICXX

Statement executed.

AD Worker error:
The index cannot be created as the table has duplicate keys.


Use the following SQL statement to identify the duplicate keys:

SELECT TRANSACTION_ID, count(*)
FROM ICX.ICX_TRANSACTIONS
GROUP BY TRANSACTION_ID
HAVING count(*)>1

AD Worker error:
Unable to compare or correct tables or indexes or keys because of the error above

As specified in Metalink Note 430673.1:

Symptoms

adpatch fails on script icxwtab.odf with the following errors:

ERROR
The table is missing the index ICX_TRANSACTIONS_U1
or index ICX_TRANSACTIONS_U1 exists on another table.
Create it with the statement:

Start time for statement below is: Mon May 07 2007 14:23:44

CREATE UNIQUE INDEX ICX.ICX_TRANSACTIONS_U1 ON ICX.ICX_TRANSACTIONS
(TRANSACTION_ID) LOGGING STORAGE (INITIAL 4K NEXT 104K MINEXTENTS 1
MAXEXTENTS UNLIMITED PCTINCREASE 0 FREELIST GROUPS 4 FREELISTS 4 ) PCTFREE
10 INITRANS 11 MAXTRANS 255 COMPUTE STATISTICS TABLESPACE ICXX

Statement executed.
AD Worker error:
The index cannot be created as the table has duplicate keys.

Use the following SQL statement to identify the duplicate keys:

SELECT TRANSACTION_ID, count(*)
FROM ICX.ICX_TRANSACTIONS
GROUP BY TRANSACTION_ID
HAVING count(*)>1

AD Worker error:
Unable to compare or correct tables or indexes or keys
because of the error above

SPECIFIC DATA
Ran the suggested query, and here is the output:

TRANSACTION_ID COUNT(*)
-------------------------- -------------
148341124 2
431640607 2
555224577 2
1202811809 2

Cause

These duplicate transactions are there because the concurrent program that deletes temporary
session data (program that removes old entries in ICX_SESSIONS and ICX_TRANSACTIONS) is not
executed on a regular basis. As a result, these tables grow in space and there is the possibility
that the sequences cycle and restart, creating duplicate primary keys.

The following justifies how the issue is related to this specific customer:

SELECT TRANSACTION_ID, count(*)
FROM ICX.ICX_TRANSACTIONS
GROUP BY TRANSACTION_ID
HAVING count(*)>1

TRANSACTION_ID COUNT(*)
-------------------------- --------------
148341124 2
431640607 2
555224577 2
1202811809 2

This is explained in the following unpublished bug: Bug 5001287 PERFORMANCE PROBLEM WHEN APPROVING POS WITH ICX_TRANSACTIONS

Solution

To implement the solution, please execute the following steps:

1. Run the purge program:
a. The name of the program is "Purge Inactive Sessions" located under the "Apps for the Web Manager" responsibility.
b. The internal name is ICXDLTMP.
c. Also you can find this SQL script under $ICX_TOP/sql (named ICXDLTMP.sql).

2. Rerun the failed worker (icxwtab.odf).

3. Migrate the solution as appropriate to other environments.

4. This program should be executed at least once a week to clean up ICX_TRANSACTIONS and ICX_SESSION tables, otherwise they will continue to grow.

Running this sql returned two rows:

SQL> SELECT TRANSACTION_ID, count(*)
FROM ICX.ICX_TRANSACTIONS
GROUP BY TRANSACTION_ID
HAVING count(*)>1
2 3 4 5
SQL> /

TRANSACTION_ID COUNT(*)
-------------- ----------
746007924 2

SQL> desc icx_transactions
Name Null? Type
----------------------------------------- -------- ----------------------------
TRANSACTION_ID NOT NULL NUMBER
SESSION_ID NOT NULL NUMBER
RESPONSIBILITY_APPLICATION_ID NUMBER
RESPONSIBILITY_ID NUMBER
SECURITY_GROUP_ID NUMBER
MENU_ID NUMBER


1 select rowid,transaction_id,session_id
2 from icx_transactions
3* where transaction_id='746007924'
SQL> /

ROWID TRANSACTION_ID SESSION_ID
------------------ -------------- ----------
AAAaZsAGeAAAIsjAAU 746007924 499638533
AAAaZsAAbAAAHb4AAV 746007924 888513258

SQL> delete icx_transactions
2 where rowid='AAAaZsAGeAAAIsjAAU'
3 /

1 row deleted.

SQL> commit;

Commit complete.

Failed worker was restarted through adctrl and it went fine.

#adctrl

AD Controller Menu
---------------------------------------------------

1. Show worker status

2. Tell worker to restart a failed job

3. Tell worker to quit

4. Tell manager that a worker failed its job

5. Tell manager that a worker acknowledges quit

6. Restart a worker on the current machine

7. Exit
Enter your choice [1] : 1


Control
Worker Code Context Filename Status
------ -------- ---------------------- -------------------- --------------
1 Done AutoPatch R115 icxwtab.odf FAILED
2 Done AutoPatch R115 Wait
3 Done AutoPatch R115 Wait
4 Done AutoPatch R115 Wait
5 Done AutoPatch R115 Wait
6 Done AutoPatch R115 Wait
7 Done AutoPatch R115 Wait
8 Done AutoPatch R115 Wait
9 Done AutoPatch R115 Wait
10 Done AutoPatch R115 Wait
11 Quit AutoPatch R115 Wait
12 Quit AutoPatch R115 Wait
13 Quit AutoPatch R115 Wait
14 Quit AutoPatch R115 Wait
15 Quit AutoPatch R115 Wait
16 Quit AutoPatch R115 Wait

Review the messages above, then press [Return] to continue.

воскресенье, 11 апреля 2010 г.

Sub-totals and Grand Totals Show NULL, N/A or 0 in Discoverer Plus and Viewer

Symptoms
Sub-totals and Grand Totals display NULL, N/A or 0 in Discoverer Plus and Viewer (web products).

Cause

AggregationBehavior and AllowAggregationOverRepeatedValues are set at default values.

Pref.txt shows the default of AggregationBehavior = 0 and AllowAggregationOverRepeatedValues is
not set or is also set to 0.

Solution
To implement the solution, please execute the following steps:

1. Add/Change AggregationBehavior = 1 and AllowAggregationOverRepeatedValues = 1 in the pref.txt file. These two preferences need to be added in the [Application] section (as follows):



[Application]
AggregationBehavior = 1
AllowAggregationOverRepeatedValues = 1

[Database]
EnhancedAggregationStrategy = 0

NOTE: AggregationBehavior and AllowAggregationOverRepeatedValues do not work if EnhancedAggregationStrategy is set to a value larger than 0.


2. Apply preferences by running
BI_Home/discoverer/util/applypreference.sh for unix or
BI_Home\discoverer\util\applypreference.bat for Windows.

NOTE: Discoverer 10.1.2 Plus users may also change the aggregation settings in the Plus applet by choosing
Edit > Worksheet Properties > Aggregation tab.
Uncheck the radio button for "Use default aggregation behavior" and check the radio button for "Show the Sum of Values displayed in the contributing cells" and choose OK.


четверг, 1 апреля 2010 г.

libgcc_s.so: undefined reference to `__stack_chk_fail@GLIBC_2.4'

libgcc_s.so: undefined reference to `__stack_chk_fail@GLIBC_2.4'

On the webpage http://www.oracle.com/technology/software/products/middleware/htdocs/111110_fmw.html there is an entry for GCC Libraries.
Download the file mentioned as disk1 (as_linux_x86_gcc_runtime_lib_access_manager_101401.cpio)

Extract the as_linux_x86_gcc_runtime_lib_access_manager_101401.cpio file:
cpio -i < as_linux_x86_gcc_runtime_lib_access_manager_101401.cpio

This gives you the Oracle_Access_Manager10_1_4_0_1_linux_GCClib.zip file
Unzip this one:

unzip Oracle_Access_Manager10_1_4_0_1_linux_GCClib.zip

This gives you 2 files:
libgcc_s.so.1
libstdc++.so.5

Now move the libgcc_s.so.1 file to /lib/libgcc_s.oracle.so.1
sudo mv libgcc_s.so.1 /lib/libgcc_s.oracle.so.1

And the most important one:
sudo ln -sf /lib/libgcc_s.oracle.so.1 /lib/libgcc_s.so

(Even after the ldconfig command is given in the reboot fase, the link for /lib/libgcc_s.so remains!)

Then you have to rename the /usr/lib/gcc/i586-redhat-linux/4.4.1/libgcc_s.so to /usr/lib/gcc/i586-redhat-linux/4.4.1/libgcc_s_so
Otherwise /lib/libgcc_s.so.1 will be used in link and not /lib/libgcc_s.so, therefore the link will fail

Now you can start the intstaller by
./runInstaller.sh

And the linking will succeed.