Wednesday, March 3, 2010

Rotate oracle Database listener log file.

Problem
-------

On 64 bit box, listener log file stops logging when size reaches 4.1 gb.

There could be some internal limitation from oracle side because of which it is not able to update log file.

Solution
--------
We can rotate log file, below are the steps.


1. take a back up of listener log file, check available disk space before going this. If you want to preserve time stamp use cp -p

cp -p log file name log file name_bkp

2. truncate listener log file

cat "" > log file name

3.
lsnrctl
set current_listener
set log_status off
set log_status on


4. check if listener log file is getting updated.


Additional command that could help.

fuser : will give pid of the listener, check is listener is running with same pid.


You can write small script to rotate listener log file and schedule cronjob to be executed every one month or so. Instead of using "log file_bkp" use "log_file_`date`"

Regards

Monday, March 1, 2010

sql to check archive's generated per hour for last 7 days

//sql to check archive's generated per hour for last 7 days

set linesize 140

SELECT to_date(first_time) DAY,
to_char(sum(decode(to_char(first_time,'HH24'),'00',1,0)),'999') "00",
to_char(sum(decode(to_char(first_time,'HH24'),'01',1,0)),'999') "01",
to_char(sum(decode(to_char(first_time,'HH24'),'02',1,0)),'999') "02",
to_char(sum(decode(to_char(first_time,'HH24'),'03',1,0)),'999') "03",
to_char(sum(decode(to_char(first_time,'HH24'),'04',1,0)),'999') "04",
to_char(sum(decode(to_char(first_time,'HH24'),'05',1,0)),'999') "05",
to_char(sum(decode(to_char(first_time,'HH24'),'06',1,0)),'999') "06",
to_char(sum(decode(to_char(first_time,'HH24'),'07',1,0)),'999') "07",
to_char(sum(decode(to_char(first_time,'HH24'),'08',1,0)),'999') "08",
to_char(sum(decode(to_char(first_time,'HH24'),'09',1,0)),'999') "09",
to_char(sum(decode(to_char(first_time,'HH24'),'10',1,0)),'999') "10",
to_char(sum(decode(to_char(first_time,'HH24'),'11',1,0)),'999') "11",
to_char(sum(decode(to_char(first_time,'HH24'),'12',1,0)),'999') "12",
to_char(sum(decode(to_char(first_time,'HH24'),'13',1,0)),'999') "13",
to_char(sum(decode(to_char(first_time,'HH24'),'14',1,0)),'999') "14",
to_char(sum(decode(to_char(first_time,'HH24'),'15',1,0)),'999') "15",
to_char(sum(decode(to_char(first_time,'HH24'),'16',1,0)),'999') "16",
to_char(sum(decode(to_char(first_time,'HH24'),'17',1,0)),'999') "17",
to_char(sum(decode(to_char(first_time,'HH24'),'18',1,0)),'999') "18",
to_char(sum(decode(to_char(first_time,'HH24'),'19',1,0)),'999') "19",
to_char(sum(decode(to_char(first_time,'HH24'),'20',1,0)),'999') "20",
to_char(sum(decode(to_char(first_time,'HH24'),'21',1,0)),'999') "21",
to_char(sum(decode(to_char(first_time,'HH24'),'22',1,0)),'999') "22",
to_char(sum(decode(to_char(first_time,'HH24'),'23',1,0)),'999') "23"
from
v$log_history
where to_date(first_time) > sysdate -20
GROUP by
to_char(first_time,'YYYY-MON-DD'), to_date(first_time)
order by to_date(first_time);

Tuesday, February 23, 2010

Check Versions of Oracle Applications

1. Application release version

select release_name from apps.fnd_product_groups;

2. Latest ATG RUP level

select creation_date, bug_id, decode(bug_number,
4334965, '11i.ATG_PF.H RUP3',
4676589, '11i.ATG_PF.H RUP4',
5473858, '11i.ATG_PF.H RUP5',
5903765, '11i.ATG_PF.H RUP6',
6241631, '11i.ATG_PF.H.RUP.7')
from apps.ad_bugs where bug_number in('4334965','4676589','5473858','5903765','6241631');

3.jdbc driver version

select bug_number, decode(bug_number,
'3043762','JDBC drivers 8.1.7.3',
'2969248','JDBC drivers 9.2.0.2',
'3080729','JDBC drivers 9.2.0.4 (OCT-2003)',
'3423613','JDBC drivers 9.2.0.4 (MAR-2004)',
'3585217','JDBC drivers 9.2.0.4 (MAY-2004)',
'3882116','JDBC drivers 9.2.0.5 (OCT-2004)',
'3966003','JDBC drivers 9.2.0.5 (OCT-2004)',
'3981178','JDBC drivers 9.2.0.5 (NOV-2004)',
'4090504','JDBC drivers 9.2.0.5 (JAN-2005)',
'4201222','JDBC drivers 9.2.0.6 (MAY-2005)') Patch_description
from ad_bugs
where bug_number in
(
'3043762',
'2969248',
'3080729',
'3423613',
'3585217',
'3882116',
'3966003',
'3981178',
'4090504',
'4201222'
)
order by 2;

Friday, February 19, 2010

How to generate the excel format in sqlplus

How to generate the excel format:

===================================
1. How to generate the excel format:
===================================
sql>set linesize 32000
sql>set pagesize 32000
sql>set head on
sql>set echo off
sql>set colsep','
sql>spool /tmp/output222.csv
sql>query
sql>spool off
: wc

Check if OS is 32/64 bit..

Check 32/64 bit
AIX: getconf -a | grep KERN OR file
Sun: isainfo -v
Linux: uname -a

'file' command works on all unix platforms

Oracle workflow notification mailer sql's

Oracle workflow notification mailer sql's
=========================================

1. Workflow: version
2. check workflow status.
3. check if workflow is used by only one instance
4. check if processor_read_timeout_close is set to 'Y'
5. check for bad e-mail address
6. How to know mail sent to a user with details:
7. How to know whether it is set to correct url from porfile options:
8. How to know reqid, process id, sid..
9. workflow patches
10. Workflow: To see failed, open notifications
11. To check if email address, notification preference, display_name
12. How to know workflow responsibility from backend:
13. Steps to drop and recreate WF_CONTROL queue:


=================
1. Workflow: version
=================
$FND_TOP/sql/wfver.sql

----------------------------------------------------
2. check workflow status.
----------------------------------------------------
set linesize 120
set pagesize 50
column COMPONENT_NAME format a45
column STARTUP_MODE format a15
column COMPONENT_STATUS format a15
select fsc.COMPONENT_NAME,fsc.STARTUP_MODE,fsc.COMPONENT_STATUS,fcq.last_update_date
from APPS.FND_CONCURRENT_QUEUES_VL fcq, fnd_svc_components fsc
where fsc.concurrent_queue_id = fcq.concurrent_queue_id(+)
order by COMPONENT_STATUS , STARTUP_MODE , COMPONENT_NAME;


Thursday, February 11, 2010

Classification of Technologies used in Oracle E-business suite

Classification of Technologies used in Oracle E-business suite



  • Oracle Application Object Library (AOL)
  • Java Technology Foundation (JTF)

AOL applications are Oracle Forms developed using Oracle Developer and are usually
referred to as Forms-based applications. JTF applications are Java Server Pages (JSPs)
developed using Oracle JDeveloper and are usually referred to as HTML-based
applications. Each type of application accesses the same database and can share
information with the other.

The product interfaces are accessed by providing the Uniform Resource Locator (URL)
for the environment in an Oracle Applications 12-compliant Web browser and
navigating to the hyperlink for the login page for the specific technology stack. You can
also provide the URL for the specific login page. This URL is referred to as your login
URL.

Oracle Applications URL
Use this URL to navigate to the Personal Home Page URL or the CRM Home page URL.
http://:/
* To navigate to the Personal Home Page URL, choose Apps Logon Links >Personal
Home Page.
* To navigate to the CRM Home Page URL, choose Apps Logon Links >CRM Home
Page.

CRM Home Page URL
This URL is sometimes referred to as the Apache or JTF login URL. Use this URL to
open the login page for HTML-based applications.
http://:/OA_HTML/jtflogin.jsp

Personal Home Page URL
This URL is sometimes referred to as the Self-Service Web Applications or SSWA login
URL. Use this URL to open the login window for Oracle Applications via the Personal
Home Page. You can access Forms-based or HTML-based applications from the
Personal Home Page.
http://:/OA_HTML/US/ICXINDEX.htm

Forms URL
Use this URL to open the login page for Forms-based applications. This login URL is
Dependencies and Integration Points 2-11
typically used by system administrators, not end users.
http://:/dev60cgi/f60cgi

User Accounts
An application user is an authorized user of Oracle Applications and is uniquely
identified by a username. After the user account has been defined, the application user
can sign on to Oracle Applications at the CRM Home Page, Personal Home Page, or
Forms login.
Note: Oracle Applications is installed with a system defined username
and password.
* Username: sysadmin
* Password: sysadmin

An application user enters a username along with a password to sign on to Oracle
Applications. The password assigned by the system administrator is temporary. When
signing on for the first time, the application user will be prompted to change the
password. Access to specific functionality and data will be determined by the
responsibilities assigned to your user account.

Regards
Manoj

Broken Pipe

Broken Pipe
-----------

Create two named pipes, p1 and p2. Run the commands:

echo -n x | cat - p1 > p2 &
cat p1

On screen, it will not appear that anything is happening, but if you run top (a command similar to ps for showing process status), you'll see that both cat programs are running like crazy copying the letter x back and forth in an endless loop.

After you press ctrl-C to get out of the loop, you may receive the message “broken pipe”. This error occurs when the process reading the pipe closes its end while a process is writing to a pipe. Since the reader is gone, the data has no place to go. Normally, the writer will finish writing its data and close the pipe. At this point, the reader sees the EOF (end of file) and executes the request.

Whether or not the “broken pipe” message is issued depends on events at the exact instant the ctrl-C is pressed. If the second cat has just read the x, pressing ctrl-C stops the second cat, pipe1 is closed and the first cat stops quietly, i.e., without a message. On the other hand, if the second cat is waiting for the first to write the x, ctrl-C causes pipe2 to close before the first cat can write to it, and the error message is issued. This sort of random behavior is known as a “race condition”.

Source (online linux journal)

Regards
Manoj

Wednesday, February 10, 2010

Apps Account Locking

Topic
------
"Apps" Account Locking in E-business suite.

ADI(Application Desktop Integrator) is a software runs on Windows systems and uses the net8 client to talk to the database. However, user's logon as their application ID and password, not directly to the database.

In order for this to work, the application goes to the database with a public username/password that must never be changed for the application to function. The username/password is APPLYSYSPUB and the password is PUB (this is openly documented). This database account is able to find the APPS schema and encrypted password in the database. It then unencrypts the password and uses it to connect to the database.


Problem
---------
There is a know issue with customers using ADI(Application Desktop Integrator).

When ever there are unsuccessful logins (failed login attempts count) number of attempts by an application user using desktop ADI, apps account will get locked (timed). This can be confirmed by checking by checking database listener log.

Solution
--------
1. Increase failed login attempts.

2. Recommend customers to use web ADI instead of Desktop ADI.

3. Educate ADI users not to make unsuccessful attempts to login more than than times that you have specified in "failed login attempts".

Metalink users can educate thyself through note:400743.1

Security Issues
---------------

The version of ADI (Application Desktop Integrator) 7.1.1.10.1, contains a major security breach.

Whenever the software is launched, it creates a file called dbg.txt on the
local hard drive on the system which contains in PLAIN TEXT the usernames
and passwords for both the application user and the APPS schema!

further readings
----------------
http://www.oracle.com/technology/deploy/security/pdf/secalert_adi.pdf

Regards
Manoj

Oracle E-business suite logs clean up

 Oracle E-business suite logs clean up #!/bin/bash cd $EBS_DOMAIN_HOME find $EBS_DOMAIN_HOME -type f -path "*/logs/*.log?*" -mtime...