Wednesday, 27 July 2016

SQL to find unindexed Ref key

select decodeb.table_nameNULL, '****', 'ok' ) Status, 
a.table_name, a.columns, b.columns
from 
select substr(a.table_name,1,30) table_name
substr(a.constraint_name,1,30) constraint_name, 
max(decode(position, 1, substr(column_name,1,30),NULL)) || 
max(decode(position, 2,', '||substr(column_name,1,30),NULL)) || 
max(decode(position, 3,', '||substr(column_name,1,30),NULL)) || 
max(decode(position, 4,', '||substr(column_name,1,30),NULL)) || 
max(decode(position, 5,', '||substr(column_name,1,30),NULL)) || 
max(decode(position, 6,', '||substr(column_name,1,30),NULL)) || 
max(decode(position, 7,', '||substr(column_name,1,30),NULL)) || 
max(decode(position, 8,', '||substr(column_name,1,30),NULL)) || 
max(decode(position, 9,', '||substr(column_name,1,30),NULL)) || 
max(decode(position,10,', '||substr(column_name,1,30),NULL)) || 
max(decode(position,11,', '||substr(column_name,1,30),NULL)) || 
max(decode(position,12,', '||substr(column_name,1,30),NULL)) || 
max(decode(position,13,', '||substr(column_name,1,30),NULL)) || 
max(decode(position,14,', '||substr(column_name,1,30),NULL)) || 
max(decode(position,15,', '||substr(column_name,1,30),NULL)) || 
max(decode(position,16,', '||substr(column_name,1,30),NULL)) columns
from user_cons_columns a, user_constraints b
where a.constraint_name = b.constraint_name
and a.table_name in ('OT_INVOICE_HEAD')
and b.constraint_type = 'R'
group by substr(a.table_name,1,30), substr(a.constraint_name,1,30) ) a, 
select substr(table_name,1,30) table_name, substr(index_name,1,30) index_name, 
max(decode(column_position, 1, substr(column_name,1,30),NULL)) || 
max(decode(column_position, 2,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position, 3,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position, 4,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position, 5,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position, 6,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position, 7,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position, 8,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position, 9,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position,10,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position,11,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position,12,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position,13,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position,14,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position,15,', '||substr(column_name,1,30),NULL)) || 
max(decode(column_position,16,', '||substr(column_name,1,30),NULL)) columns
from user_ind_columns 
group by substr(table_name,1,30), substr(index_name,1,30) ) b
where a.table_name = b.table_name (+)
and b.columns (+) like a.columns || '%'
/

Tuesday, 7 May 2013

ORA-12560 TNS protocol adapter error at creating database stage while installing the oracle 10G R2


The platform where we faced issue is Windows 2008 SP2 and while installing Oracle 10g 10.2.0.1

Error Description - ORA-12560 TNS protocol adapter error at creating database stage while installing the oracle 10G R2 on win 2008 SP 2  DIM-00019: create service error. O/S-Error: (OS 1388) A new member could not be added to a local group because the member has the wrong account type.      

This error is not related to Oracle and after going through few forums we found given DB server where the Oracle 10g R2 installation taking place is configured as Domain Controller and we recommend to de-promote the server from domain controller. The installation is completed successfully after de-promoting the server from Domain Controlller.        

Wednesday, 8 February 2012

Installing Oracle RAC DB on RHEL5 ?

Installing Oracle RAC DB on RHEL5 ?


Go thru the following,
1] http://www.oracle.com/technology/pub/articles/smiley_rac10g_install.html
2] Oracle metalink Note: 421308.1 - Requirements For Installing Oracle10gR2 On RHEL/OEL 5 (x86_64)
3] To map the devices using udev either singlepath or multipath.
NOTE:465001.1 - Configuring raw devices (singlepath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5
NOTE:564580.1 - Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5


i have faced the following problems,


1] Configuring ssh for the first time works fine. If any changes done ( Eg: i changed the home path of oracle user),
then the ssh configuration will prompt for password no matter how many times you reconfigure the ssh.
i have created another OS user orclusr instead of oracle. If any one finds a solution, please reply back.
2] i have commented the localhost entry in the /etc/hosts for the xmanager to work.
3] use runisntaller -ignoreSysPrereqs
4] You will not face much problems in single patching, but in multi pathing while installing
crs (during root.sh), it will say the crs upgrade fails, it is an oracle bug Bug.4679769. apply the patch, it will copy new executable.
5] The vipca will fail because of the oracle bug refer NOTE:414163.1 , comment out or unset the LD_ASSUME_KERNEL in vipca executable.
6] During upgrade to 10.2.0.4, the local_listener error came and we have commented out that in the parameter file.

Error: libXp.so.6: cannot open shared object file while installing Oracle 10gR2


Error: libXp.so.6: cannot open shared object file
During installation of Oracle database 10g on RHEL 5.5, i have encountered the following error,

Exception java.lang.UnsatisfiedLinkError: /tmp/OraInstall2005-07-07_09-40-45AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred.. java.lang.UnsatisfiedLinkError: /tmp/OraInstall2005-07-07_09-40-45AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory

Solution: Install libXp-1.0.0-8.1.el5.i386.rpm package.

\command was unexpected this time while starting Oracle weblogic 11.1.1.X.X


Due to scheduled power maintenance the server where Oracle 11G FM  11.1.1.X.X installed was rebooted and after reboot the Oracle Weblogic, WLS_FORMS and WLS_REPORTS didn't start when tried in the command line, 

Error Description - \command was unexpected this time while starting the Oracle Weblogic through command line.

Weblogic service and WLS_FORMS and WLS_REPORTS service didn't startup after double clicking it manually os starting through command line.         

The issue is due to the newly installed software in the Apps server which by default gets installed in  C:\program files and make an entry  in the PATH environment variable of the system. Go through the below support note for more details and action plan to overcome the error.

New Install Of ECM 11g On A 64 Bit Windows OS - Error Starting WebLogic [ID 1217713.1]

The problem occurs mainly in Windows platform. 

Failure of server APACHE bridge Error in Oracle Fusion Middle ware.


Even you found the Oracle weblogic, WLS_FORMS, WLS_REPORTS are up and in running state while accessing application you face “Failure of server APACHE bridge    
“Error

Oracle 11G FM  11.1.1.X.X          

Error Description - Failure of server APACHE bridge
  
Go through the Oracle document ID 1304095.1 "changed the hostname to the IP address in forms.conf and reports.conf file ($ORACLE_INSTANCE\config\OHS\ohs1\moduleconf\) as directed to overcome the issue,

The symptoms are most likely to occur Windows platform.


Tuesday, 7 February 2012

fatal error the application will terminate while installing/upgrading the Oracle weblogic release 10.3.X.X


We faced a strange issues while installing Oracle Web logic  10.3.3/10.3.4 in Windows 2008 R2 OS, the weblogic fails with fatal error the application will terminate. 

We appended the  - log & -log_priority options along to debug the issue. 

An example of command is given below: 

C:\Oracle\Softwares> java -jar <weblogic.jar> -log=weblog_inst.log -log_priority=debug

executing the above command will lead to the GUI, once the installation fails check the error logs created to resolve the issues.

java.lang.IllegalArgumentException: Negative time at java.io.File.setLastModified(File.java:1258) at com.bea.plateng.common.util.Touch.touchFile(Touch.java:99) at com.bea.plateng.common.util.Touch.touchFile(Touch.java:96) at com.bea.plateng.common.util.Touch.touch(Touch.java:79) at com.bea.plateng.wizard.silent.tasks.TouchTask.execute(TouchTask.java:268) at com.bea.plateng.wizard.silent.tasks.AbstractSilentTask.run(AbstractSilentTask.java:28) at java.lang.Thread.run(Thread.java:662)            Date was changed 2554 year to 2011(check OS sys date)

The possible reasons behind the errors are 

1) Date can be changed to a higher  value say 2554 year instead of 2011 (check OS system date)
2) Check the Date language settings which might be set to regional languages instead of English, here in my customer environment it's been set to THAI.

We change the Date settings to English to overcome the issue.