How much time a rollback will take?

Metalink NoteID: 169138.1
 
select
sum(distinct(ktuxesiz)) from x$ktuxe;

Workflow load distribution - Item wise

select wi.item_type ITEM_TYPE,

wit.persistence_type P_TYPE,

decode (wi.end_date, NULL, 'OPEN', 'CLOSED') Status,

count(*) COUNT

from wf_items wi,

wf_item_types wit

where wit.name = wi.item_type

group by item_type,

wit.persistence_type,

WIT.PERSISTENCE_DAYS,

decode (wi.end_date, NULL, 'OPEN', 'CLOSED')

order by decode (wi.end_date, NULL, 'OPEN', 'CLOSED'), 4 desc

Trick to make query run fast

There may be some actions that need full table scans and takes more time to execute.
Following are certatin such actions:
- Index creation
- Select count(*) from a table ; to get the number of rows
- Gather table statistics
 
To speed up the above queries we need to set the following session parameters and then execute the required action
 

alter session set sort_area_size=536870912;

alter session set sort_multiblock_read_count=128;

alter session set db_file_multiblock_read_count=128;

 

 

TOP I/O Consuming sessions

Query to find the top I/O consuming sessions:

select
sid,
username,
round(100 * total_user_io/total_io,2) tot_io_pct
from
(select
b.sid sid,
nvl(b.username,p.name) username,
sum(value) total_user_io
from
sys.v_$statname c,
sys.v_$sesstat a,
sys.v_$session b,
sys.v_$bgprocess p
where
a.statistic#=c.statistic# and
p.paddr (+) = b.paddr and
b.sid=a.sid and
c.name in ('physical reads',
'physical writes',
'physical writes direct',
'physical reads direct',
'physical writes direct (lob)',
'physical reads direct (lob)')
group by
b.sid, nvl(b.username,p.name)),
(select
sum(value) total_io
from
sys.v_$statname c,
sys.v_$sesstat a
where
a.statistic#=c.statistic# and
c.name in ('physical reads',
'physical writes',
'physical writes direct',
'physical reads direct',
'physical writes direct (lob)',
'physical reads direct (lob)'))
order by
3 desc;

Courtesy : Malli

Export and Import Table stats between databases

STEPS
Step1: Create a table to store the stats.
Step 2: Export the stats from the required table to the table created in step1.
Step3: Export the table using either exp or expdp from database 1
Step4: Import the table that contain stats into database2
Step5: Use dbms_stats to import the stats into database2
COMMANDS
exec dbms_stats.create_stat_table('APPS','OKC_K_ITEMS_TABLE_STATS')
exec dbms_stats.export_table_stats('OKC','OKC_K_ITEMS',null,'OKC_K_ITEMS_TABLE_STATS',null,true,'APPS')
exp apps file=exp_crp_stats.dmp tables=OKC_K_ITEMS_TABLE_STATS
imp apps file=exp_crp_stats.dmp full=y
exec dbms_stats.import_table_stats(OKC,'OKC_K_ITEMS',null,OKC_K_ITEMS_TABLE_STATS',null,true,'APPS')
Query to find the execution plan of a session.
SELECT operation, options, object_name, DEPTH, ID, COST
FROM v$sql_plan
WHERE hash_value IN (SELECT hash_value
FROM v$sql
WHERE address IN (SELECT sql_address FROM v$session WHERE SID = &SID))
AND object_name IS NOT NULL
ORDER BY DEPTH DESC

HTTP-503 ORA-12538

We got "HTTP-503 ORA-12538" error in error_log_pls located in "$APACHE_TOP/Apache/log" folder.

This instance is a clone instance and after completing the adcfgclone we tried to login to the instance with the sysadmin user credentials.

The login page is appearing, after entering the credentials and clicking on login button, we got the following error,

Service Temporarily UnavailableThe server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Searched Aapche access_log and error_log.

error_log has " request failed: URI too long" error message

error_log_pls has "HTTP-503 ORA-12538"
ORA-12538
TNS: no such protocol adapter
Metalink NoteID to be followed : 152580.1
And executed the following commands on the applications tier after sourcing the environment file of Application Tier.

export ORACLE_HOME=$IAS_TOP
cd $ORACLE_HOME/bin
./gennttab
cd $ORACLE_HOME/network/lib
make -f ins_net_client.mk ntcontab.o
cd $ORACLE_HOME/bin
./genclntsh
cd $ORACLE_HOME/network/lib
make -f ins_net_client.mk install
make -f ins_net_server.mk install
cd $ORACLE_HOME/sqlplus/lib
make -f ins_sqlplus.mk install

Before executing the above commands, execute "slibclean" to cleanup the library files held by the AIX kernel. "Slibclean" needs to be run from the "root" account.

Verification

1.

$ adapters ./sqlplus
Net8 Protocol Adapters linked with ./sqlplus are:
BEQ Protocol Adapter
IPC Protocol Adapter
TCP/IP Protocol Adapter
RAW Protocol Adapter

2.

Also verify the size of libclntsh.o located under $IAS_TOP/lib. It should have latest time stamp as well as the size should match with other instances.

3.

Verify the output of the commands executed before. Incase any command fails with TIMEOUT error then re-execute it.

FTP access on HP-UNIX PA RISC

I was facing a typical problem where in the root user can ftp to the unix box, where as other users it denies with the message invalid login. Though we are giving right combination of userid/password. Telnet is working but ftp is not working. Finally resolved it in the following way,

1. /etc/ftpd/ftpusers : this file will have userids that are denied ftp access to the servers.
Ok. The above information is fine. But in our case the above file doesnt exist. So we are not denying any users. So the above info is just info and not related to our problem.
2. ftp calls getusershell which by default checks password information (that is, the entry in /etc/passwd for the user who is trying to log in) against a fixed list. If the shell isn’t on the list, ftp won’t let the user in, so if you use an unusual shell you may not be able to ftp even to your own system
Ok... so what..... well thats not all it does...
getusershell can be made aware of other shells via /etc/shells. Thats it... i checked for /etc/shells and this file doesnt even exist at all. Checked /etc/passwd for the shell we use and found that its /bin/ksh. So created the file /etc/shells with an entry "/bin/ksh" and viola.... ftp works.....

So theres a lot behind the ftp process...........
Credits : http://www.techsolutions.hp.com/en/B2355-90950/ch04s04.html

Hurray ..........and ............

Ya finally the results for the beta tests which I have written have come.
I have passed both the tests that I wrote way back in January. The tests are:
Exam 1Z1-232: Oracle 11i System Administration
Exam 1Z1-233: Oracle 11i Install, Patch & Maintain Oracle Applications

But, Oracle has changed the criteria for the Oracle Applications DBA certification track.
May be they would have got good feedback from the Applications DBA community. And rightly they have removed "Oracle 11i System Administration" and "Oracle Workflow Administration" from the track and added Oracle 9i or 10g DBA Certification test as part of the certification pack.

Hence, of the two tests I have written one is not really not useful and one will be useful.
I am already a Oracle 8i certified DBA and by upgrading to 10g can get this certification as well.

Oracle 11i Certification

I have attempted the Beta certification tests of Oracle 11i Applications Technology track.
There are three tests in this track and classroom training is waived of if the tests are taken before May 2007.

The three tests that needs to be passed to obtain the certification are :
1Z0-231 - Implement Oracle Workflow 11i
1Z1-232 - Oracle 11i System Administration
1Z1-233 - 11i Install Patch and Maintain Oracle Applications

The last two tests were in beta phase till 31st January 2007. So I have appeared for those tests on 25th of January and 31st of January. Managed to prepare and appear for these tests before the beta expires.

1Z0-231 : Implement Oracle Workflow 11i is not in beta test and is not available as of today. So I need to wait for this test to become officially available to write it. Also till now I didnt get oppurtunity to work on workflow and implement it. So I will be utilizing the time to prepare for the test and do some hands on. Luckily my current project has workflow implementation with AME (Approval Management Engine). So this test will be useful for me as well as my current implementation experience for the test.

1Z1-232: Oracle 11i System Administration. Wrote this test yesterday on 31st January. Just before the beta version expires. So its still fresh in my mind. There are 103 questions with 180 minutes to complete it. Well as per agreement I cannot reveal much about the questions, but I can say that the questions are good and a person with good hands on can easily pass through. We need to study more on topics like User Management, Forms personalization and Data Security apart from the other topics given in the course contents. As User Management is a new chapter with Oracle moving towards RBAC I felt we need to study more on this new topic and there are quite a few number of questions from this.

1Z1-233 : 11i Install Patch and Maintain Oracle Applications
Wrote this test last week and this is the first Beta test I have appeared from Oracle. So I was not prepared for the plethora of questions that Oracle has bombarded on me. There were 153 questions and 3 hours time to complete all. The test center room was too cold and in between my hands went numb. Well leaving the environment factors and coming to the actual questions felt they were tough. Even though cloning, patching and installing are part of my day to day activities, I do not remember the commands and rely mostly on Metalink.

Now I need to prepare for the workflow test and keep my fingers crossed till the results of the Beta tests are announced. Meanwhile I am planning to appear for Oracle 10g Application server Administration -I test. Though I am not keen on writing it so soon, but i got a 25% discount voucher from my company and it expires in the first week of March. So if I have to save some money, then I better have to pull up my socks and prepare well to appear before the voucher expires.

Backup

Today started taking backup of the Oracle Apps instance to a different mount point.
used the following command,
login as root
#tar cvf backup_20070122.tar /abc/

The tar creation failed with the following error,
tar: 0511-194 Reached end-of-file before expected.

Found out the soft file size for "root" user with
#ulimit -a
file(blocks) 2097151

which means, the maximum file size "root" can create is 2091751*512 = 1070976512 bytes only.
Hence its failed with the above error.

So started the tar command again from the "applmgr" user.
As you see from my previous posts, I have set the SOFT FILE SIZE to "ulimited" for applmgr.

Now the tar backup is going on smoothly.

Day 3 - Oracle Apps Installation on AIX 5.3

When verified the installation screen, it is observed that all the checks were successful except the Apache service couldnt start on port 80.
Metalink NoteID 356080.1 mentions the steps that need to be done to configure Apache on port 80. As per the steps we need to start apache as root.

Next while creating uses got the error,
FRM-40815: Varaible GLOBAL.LLL517 does not exist.
To fix the above problem applied patch 4689213.

Day 2 - Apps Installation on AIX 5.3

The pre-requisite checks are done as per the instructions given in the doc
http://download-west.oracle.com/docs/html/B10811_02/ch2.htm

1.Find memory on AIX
#lsattr -E -l sys0 -a realmem
realmem 16318464 Amount of usable physical memory in Kbytes False

2.To find the configured SWAP space,
# lsps -a
Our swap size is 512 MB, recomended is 1GB or twice the RAM sizeOn AIX machines it is recommended not to increase SWAP beyond the 2GB
So increased the swap sizesWAP size is increased by using the following commands,"smitty pgsp" Change/show Characteristics -- select hd6 -- Type in enough LPs to bring it up to 2 GB, i.e. 3x the LP count for 512 MB, and press ENTER

3. Ensure that /tmp has atleast 1GB free space

df -k /tmp shows that /tmp size is only 131MB.
/dev/hd3 131072 129700 2% 35 1% /tmp

Increased the /tmp size by adding more space to it using the following command,

#chfs -a size='+100000' /tmp
After this the output of df -k /tmp is as below,
/dev/hd3 524288 522856 1% 35 1% /tmp
So the free space is reached to 520 MB.
4. To ensure that the system architecture can run the software, enter the following command
and expected output is 64.
#getconf HARDWARE_BITMODE

5.Software requirements

a. Verify the OS level, minimum should be AIX 5.2
#oslevel -r 5300-03

b. Verify whether the patchsets are installed or not
#lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat bos.perf.proctools


Unix steps to start the installation,
Create Unix users and groups required for the Oracle Apps installation.
On AIX use SMIT to create the users and groups.
After creating the users, the following shell limits need to be set,

Soft File Size -1
Soft CPU time -1
Soft Data segment -1
Soft STACK size -1

Use "smit chuser" to setup the above parameters.
Verify that the maximum number of processes allowed per user is set to 2048 or greater.
#smit chgsys

-----Downloaded GCC compiler from the following link, http://aixpdslib.seas.ucla.edu/packages/gcc.html

After installing the GCC compiler got the error to apply 2896876

Initially thought that it might be a AIX patch and searched in the IBM site, later understood that its a Oracle patch and has to be downloaded from Metalink.

unzip not found
so had to extract the patch on the windows and ftp the whole folderexecuted rootpre.sh as instructed in the patch readme.

---------Added on 24/01/2007------------
I have missed the following steps mentioned in Metalink Note ID : 294932.1

a) Execute slibclean :
Before you start the Installation through Rapid Install, run slibclean as a root user on your AIX install machine :

# slibclean

This command, will clean up any unused modules in kernel and library memory which may cause installation or runtime problems.

b) Execute rootpre.sh and preInstaller.sh :
Execute the following scripts to Set the Kernel with the requirements for 9i/11i:

/startCD/Disk1/rapidwiz/oui/IBM_AIX/aix_preInstall/rootpre.sh
/startCD/Disk1/rapidwiz/oui/IBM_AIX/aix_preInstall/preInstaller.sh

The scripts must be executed with the root user in the same Xwindow session just before executing RapidWiz.

--------End of Addition 24/01/2007-----------

Now the installation started..............phew.......

Day 1 - Apps Installation on AIX 5.3

Today I started installing Oracle Applications fresh instance installation on AIX 5.3
The machine is a pSeries server and hosted by IBM technical person at the data center.
By the time I am involved, network setup is done and disk partioning is completed.
We have partitioned the disk as 3 mount points of 200GB each.

Hardware specifications

4 CPU - Dual core
16 GB RAM

Mounting CD's
On AIX System Management Interface Tool (SMIT) is used to create a logical mount for the CDROM device and also to mount the CDROM. I have used the steps in given in IBM DB2 installation steps to mount the CDROM.

Console
Monitor, keyboard and mouse are connected directly to the server and hence didnt had to tweak with the DISPLAY settings on the console.

Autostage
After mounting the "Start Here" cd, verified the contents of the cdrom to ensure that the CD is mounted properly, using the command "ls -l /cdrom".
Executed the following command,

perl /cdrom/Disk1/rapidwiz/adautostg.pl

It ask for various questions like

Components to be staged : Since I am doing a single node installation I have choosen Oracle Applications, The other options that are available are :
1 - to choose Oracle Applications
2 - to choose Oracle Applications with NLS
3 - to choose Oracle Database technology stack (RDBMS)
4 - to choose Oracle Applications database (Databases)
5 - to choose Oracle Applications technology stack (Tools)
6 - to choose APPL_TOP
7 - to choose National Language Support (NLS) Languages

stage directory : "Need to give a mountpoint where you would like to stage the CD's. In my case i have given /u03. It creates a folder called stage11i under /u03 and copies all the content over there."

CDROM Mountpoint : "In my case its /cdrom"

After this it verifies for the disk space availability and then starts copying contents into /u03/Stage11i. After completing copying this CD it prompts us to insert the next CD. This way it continue till it completes the staging activity. CD's are prompted in the following order,
1. Start Here CD
2. RDBMS - 1 CD
3. Database - 3 CDs
4. Tools - 1 CD
5. APPL_TOP - 2 CDs


Total time taken for staging is 3 hours.


Release 12

Recently I attended Oracle Release 12 Financials Training for Oracle Partners at Oracle-Singapore. Though I am not from the finance background still attended to have a sneak previews of the latest big and much talked release from Oracle. May be a person with finance background and had worked on the previous releases of Oracle Finance Applications can appreciate or criticise the new features and changes. I found out that Release 12 has the following changes,
- No Set of Books. Its replaces with ledger sets
- MOAC - Multi Org Access Control
- With a single responsibility we can post data (eg: Invoices) into multiple organizations
Eg: When the user has to enter data into multiple organizations he/she can enter using a single screen. Unlike previous versions where the user has to switch between the responsibilities. This feature is good for shared services.

Trivia : The short letter for Release 12 seems to be "g", where "g" stands for "GLOBAL". The main focus of this release is for Global Organizations.

Oracle Applications DBA's trusted and troublesome Jintiator is no longer there. Instead it uses the native JVM. The screens look different. But what bothers is that for some functionality of finance it opens the browser and for some it uses Oracle Forms that are opened in JVM. So at the end of the day the user has to juggle between multiple windows.

Report Management : This is a new feature in release 12 where in it allows to do the following:
- Users can manage the reports management life cycle
- Usually a report output file is stored on the Unix (or O/S) file system and system administrator manages the life cycle of the report output like, purging, backup and restoring. Now the concern is about security and manageability of this. So Release 12 has come up with Report Manager responsibility through which users can define how to store the report outputs and who can view the reports.

Will post more on Techstack enhancements in next posts.