Sunday, 20 September 2015

Oracle ORA-14048: a partition maintenance operation may not be combined with other operations


Cause : When I am trying to make an index as UNUSABLE from Toad I got this error.
Solution : Try from sqlplus.

SQL>> alter index AHBDDS.SYS_C0015740 unusable;

Index altered.

SQL>>

How To Get SQL Connections BY IP Address and loginname

-- Get SQL connections by IP address
SELECT ec.client_net_address, es.[program_name],
es.[host_name], es.login_name,
COUNT(ec.session_id) AS [connection count]
FROM sys.dm_exec_sessions AS es 
INNER JOIN sys.dm_exec_connections AS ec 
ON es.session_id = ec.session_id  
GROUP BY ec.client_net_address, es.[program_name], es.[host_name], es.login_name 
ORDER BY ec.client_net_address, es.[program_name];

-- Get SQL connections by login_name
SELECT login_name, COUNT(session_id) AS [session_count]
FROM  sys.dm_exec_sessions
GROUP BY login_name

ORDER BY login_name;

Configure mailx in AIX


1. starting sendmail
lssrc -s sendmail                                        
startsrc -s sendmail -a "-bd -q30m"                      
vi /etc/rc.tcpip -> uncomment: start /usr/lib/sendmail  



In /etc/hosts:
10.10.139.12   smtp.alhilalbank.ae

vi /etc/mail/sendmail.cf
DSsmtp.alhilalbank.ae    -- Our mail server smtp.alhilalbank.ae

refresh sendmail:
refresh -s sendmail  

telnet smtp.alhilalbank.ae 25

Wednesday, 16 September 2015

ORA-00704: bootstrap process failure ORA-39700: database must be opened with UPGRADE option

alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Process ID: 26280000
Session ID: 753 Serial number: 5


After RMAN restore to another server. Please check the source and target database version you have.

In my case, 
source:  11.2.0.3.0
target: 11.2.0.1.0




sqlplus / as sysdba

sql>startup upgrade

sql>@$ORACLE_HOME/rdbms/admin/catupgrd.sql

sql>@$ORACLE_HOME/rdbms/admin/utlrp.sql

sql>shut immediate

sql>startup

Tuesday, 1 September 2015

Cancelling Concurrent Request script

Concurrent Request Status Codes and Phase Codes

Use below query to cancel all scheduled concurrent programs.
===================================================
UPDATE fnd_concurrent_requests
SET phase_code = 'C', status_code = 'X'
WHERE status_code IN ('Q','I')
AND requested_start_date > SYSDATE
AND hold_flag = 'N';

COMMIT;

=====================================================
TO cancel all running concurrent programs.

UPDATE fnd_concurrent_requests
SET phase_code = 'C', status_code = 'X'
WHERE status_code IN ('R','I');
Commit;


Concurrent Request Phase Codes:-

SELECT LOOKUP_CODE, MEANING
  FROM FND_LOOKUP_VALUES
 WHERE LOOKUP_TYPE = 'CP_PHASE_CODE' AND LANGUAGE = 'US'
       AND ENABLED_FLAG = 'Y';

To Cancel Specific request:
++++++++++++++++++++++++++++++++
update fnd_concurrent_requests
set status_code='D', phase_code='C'
where request_id=;

Number of Visitors