понедельник, 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.

среда, 31 марта 2010 г.

How To Create An E-Business Suite Connection Trace For Discoverer 10g (10.1.2) Plus / Viewer

How To Create An E-Business Suite Connection Trace For Discoverer 10g (10.1.2) Plus / Viewer

# Stop the middle-tier via Application Server Control (ASC) or command-line (opmnctl stopall).

# Navigate to: $ORACLE_HOME/opmn/conf

# Backup the opmn.xml file (cp opmn.xml opmn.xml_pre-appstrace)

# Edit the opmn.xml file and add the following variables in the Discoverer environment sections:

* variable id="AFLOG_ENABLED" value="Y"/
* variable id="AFLOG_FILENAME" value="">/discoverer/logs/apps_trace.txt"/>
o This can be any writeable directory.
o Replace with your full path.

* variable id="AFLOG_LEVEL" value="STATEMENT">
* variable id="AFLOG_MODULE" value="fnd.src.security.afscp fnd.src.osd.afenv">




# Save opmn.xml

# Start the middle-tier via ASC or command-line (opmnctl startall)