Friday, September 5, 2014

adoacorectl.sh: exiting with status 150

Error:

[oracle@svrebsal2 scripts]$ ./adoacorectl.sh stop
You are running adoacorectl.sh version 120.13
Stopping OPMN managed OACORE OC4J instance ...

adoacorectl.sh: exiting with status 206

(OR)

adoacorectl.sh: exiting with status 150

Solution :

stop all R12 procs
 
rm -rf $ORA_CONFIG_HOME/10.1.3/j2ee/oacore/persistence/*
rm -rf $ORA_CONFIG_HOME/10.1.3/j2ee/oafm/persistence/*
rm -rf $ORA_CONFIG_HOME/10.1.3/j2ee/forms/persistence/*
 
start all service again (Start the oc4j using opmnctl startall)


++++++1177323.1, 1313955.1,1557461.1+++++++++

How Does The Batch Size Affect The Number Of Parallel Update Units

While applying a patch, the patch may contain scripts that update data in batches. This prompt allows you to
specify how many rows will be updated at a time. It is recommended that you accept the
default unless you know your system well.

If you enter a negative or an invalid number, adpatch will use the default value (in this case a value of 1000).

(Or)

The Batch Size refers to the number of rows to commit at a time when cerrtain scripts run.If we dno't enter a specific value, Auto Patch takes the default, Which is normall set to a relatively smaller value to accommodate systems with a small rollback segment.


+++++++++++++Doc ID 1311402.1+++++++++++

Monday, August 11, 2014

Applying the DSTv20 update for the Oracle Database

Applying the DSTv20 update for the Oracle Database (Doc ID 1552819.1)

[oracle@pxebssdl1 ~]$ cd 16799735

[oracle@pxebssdl1 ~]$ sqlplus / as sysdba
SQL> SELECT version FROM v$timezone_file;

VERSION
----------
14

[oracle@pxebssdl1 16799735]$ ls -ltr
total 32
-rw-r--r-- 1 oracle oinstall  4583 May 29  2013 README.txt
-rw-r--r-- 1 oracle oinstall 14574 May 29  2013 README.html
drwxr-xr-x 3 oracle oinstall  4096 May 29  2013 files
drwxr-xr-x 4 oracle oinstall  4096 May 29  2013 etc
[oracle@pxebssdl1 16799735]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/oracle/PROD/db/tech_st/11.2.0.3
Central Inventory : /home/oracle/oraInventory
   from           : /u01/oracle/PROD/db/tech_st/11.2.0.3//oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/oracle/PROD/db/tech_st/11.2.0.3/cfgtoollogs/opatch/16799735_Jul_28_2014_08_11_00/apply2014-07-28_08-11-00AM_1.log

Applying interim patch '16799735' to OH '/u01/oracle/PROD/db/tech_st/11.2.0.3'
Verifying environment and performing prerequisite checks...
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y

Backing up files...

Patching component oracle.oracore.rsf, 11.2.0.3.0...

Verifying the update...
Patch 16799735 successfully applied
Log file location: /u01/oracle/PROD/db/tech_st/11.2.0.3/cfgtoollogs/opatch/16799735_Jul_28_2014_08_11_00/apply2014-07-28_08-11-00AM_1.log

OPatch succeeded.

Step 1:

[oracle@pxebssdl1 ~]$ cd 16799735/files/oracore/zoneinfo/big
[oracle@pxebssdl1 big]$ ls -ltr
total 1116
-rwxr-xr-x 1 oracle oinstall 343167 May 29  2013 timezone_20.dat
-rwxr-xr-x 1 oracle oinstall 789973 May 29  2013 timezlrg_20.dat
[oracle@pxebssdl1 big]$ cp -p *  /u01/oracle/PROD/db/tech_st/11.2.0.3/oracore/zoneinfo/big/

[oracle@pxebssdl1 ~]$ cd 16799735/files/oracore/zoneinfo/little
[oracle@pxebssdl1 little]$ ls -ltr
total 1116
-rwxr-xr-x 1 oracle oinstall 343167 May 29  2013 timezone_20.dat
-rwxr-xr-x 1 oracle oinstall 789973 May 29  2013 timezlrg_20.dat
[oracle@pxebssdl1 little]$ cp -p * /u01/oracle/PROD/db/tech_st/11.2.0.3/oracore/zoneinfo/little

Step 2 :
++++++++++++++
Scripts to automatically update the RDBMS DST (timezone) version in an 11gR2 or 12cR1 database . (Doc ID 1585343.1)
+++++++++++++++

[oracle@pxebssdl1 DBMS_DST_scriptsV1.8]$ ls -ltr
total 60
-rw-r--r-- 1 oracle oinstall  4784 Mar 17 18:33 countTSTZdata.sql
-rw-r--r-- 1 oracle oinstall 30772 Jul 10 15:02 upg_tzv_check.sql
-rw-r--r-- 1 oracle oinstall 16931 Jul 10 15:03 upg_tzv_apply.sql
[oracle@pxebssdl1 DBMS_DST_scriptsV1.8]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Jul 28 08:31:22 2014
Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @countTSTZdata.sql

Estimating amount of TSTZ data.
This might take some time....
.
For SYS tables first...
Note: empty tables are not listed.
Owner.Tablename.Columnname - count star of that column
SYS.AQ$_ALERT_QT_S.CREATION_TIME - Count * is : 4
SYS.AQ$_ALERT_QT_S.DELETION_TIME - Count * is : 4
SYS.AQ$_ALERT_QT_S.MODIFICATION_TIME - Count * is : 4
SYS.AQ$_AQ$_MEM_MC_S.CREATION_TIME - Count * is : 3
SYS.AQ$_AQ$_MEM_MC_S.DELETION_TIME - Count * is : 3
SYS.AQ$_AQ$_MEM_MC_S.MODIFICATION_TIME - Count * is : 3
SYS.AQ$_AQ_PROP_TABLE_S.CREATION_TIME - Count * is : 1
SYS.AQ$_AQ_PROP_TABLE_S.DELETION_TIME - Count * is : 1
SYS.AQ$_AQ_PROP_TABLE_S.MODIFICATION_TIME - Count * is : 1
SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.CREATION_TIME - Count * is : 1
SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.DELETION_TIME - Count * is : 1
SYS.AQ$_KUPC$DATAPUMP_QUETAB_S.MODIFICATION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.CREATION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.DELETION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER$_EVENT_QTAB_S.MODIFICATION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.CREATION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.DELETION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER$_REMDB_JOBQTAB_S.MODIFICATION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.CREATION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.DELETION_TIME - Count * is : 1
SYS.AQ$_SCHEDULER_FILEWATCHER_QT_S.MODIFICATION_TIME - Count * is : 1
SYS.AQ$_SUBSCRIBER_TABLE.CREATION_TIME - Count * is : 1
SYS.AQ$_SUBSCRIBER_TABLE.DELETION_TIME - Count * is : 1
SYS.AQ$_SUBSCRIBER_TABLE.MODIFICATION_TIME - Count * is : 1
SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.CREATION_TIME - Count * is : 3
SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.DELETION_TIME - Count * is : 3
SYS.AQ$_SYS$SERVICE_METRICS_TAB_S.MODIFICATION_TIME - Count * is : 3
SYS.KET$_AUTOTASK_STATUS.ABA_START_TIME - Count * is : 1
SYS.KET$_AUTOTASK_STATUS.ABA_STATE_TIME - Count * is : 1
SYS.KET$_AUTOTASK_STATUS.MW_RECORD_TIME - Count * is : 1
SYS.KET$_AUTOTASK_STATUS.MW_START_TIME - Count * is : 1
SYS.KET$_AUTOTASK_STATUS.RECONCILE_TIME - Count * is : 1
SYS.KET$_CLIENT_CONFIG.FIELD_2 - Count * is : 7
SYS.KET$_CLIENT_CONFIG.LAST_CHANGE - Count * is : 7
SYS.KET$_CLIENT_TASKS.CURR_WIN_START - Count * is : 2
SYS.KET$_CLIENT_TASKS.LG_DATE - Count * is : 2
SYS.KET$_CLIENT_TASKS.LT_DATE - Count * is : 2
SYS.OPTSTAT_HIST_CONTROL$.SPARE6 - Count * is : 19
SYS.OPTSTAT_HIST_CONTROL$.SVAL2 - Count * is : 19
SYS.SCHEDULER$_EVENT_LOG.LOG_DATE - Count * is : 114
SYS.SCHEDULER$_GLOBAL_ATTRIBUTE.ATTR_TSTAMP - Count * is : 11
SYS.SCHEDULER$_JOB.END_DATE - Count * is : 14
SYS.SCHEDULER$_JOB.LAST_ENABLED_TIME - Count * is : 14
SYS.SCHEDULER$_JOB.LAST_END_DATE - Count * is : 14
SYS.SCHEDULER$_JOB.LAST_START_DATE - Count * is : 14
SYS.SCHEDULER$_JOB.NEXT_RUN_DATE - Count * is : 14
SYS.SCHEDULER$_JOB.START_DATE - Count * is : 14
SYS.SCHEDULER$_JOB_RUN_DETAILS.LOG_DATE - Count * is : 46
SYS.SCHEDULER$_JOB_RUN_DETAILS.REQ_START_DATE - Count * is : 46
SYS.SCHEDULER$_JOB_RUN_DETAILS.START_DATE - Count * is : 46
SYS.SCHEDULER$_SCHEDULE.END_DATE - Count * is : 3
SYS.SCHEDULER$_SCHEDULE.REFERENCE_DATE - Count * is : 3
SYS.SCHEDULER$_WINDOW.ACTUAL_START_DATE - Count * is : 9
SYS.SCHEDULER$_WINDOW.END_DATE - Count * is : 9
SYS.SCHEDULER$_WINDOW.LAST_START_DATE - Count * is : 9
SYS.SCHEDULER$_WINDOW.MANUAL_OPEN_TIME - Count * is : 9
SYS.SCHEDULER$_WINDOW.NEXT_START_DATE - Count * is : 9
SYS.SCHEDULER$_WINDOW.START_DATE - Count * is : 9
SYS.SCHEDULER$_WINDOW_DETAILS.LOG_DATE - Count * is : 3
SYS.SCHEDULER$_WINDOW_DETAILS.REQ_START_DATE - Count * is : 3
SYS.SCHEDULER$_WINDOW_DETAILS.START_DATE - Count * is : 3
SYS.WRI$_ALERT_HISTORY.CREATION_TIME - Count * is : 42
SYS.WRI$_ALERT_HISTORY.TIME_SUGGESTED - Count * is : 42
SYS.WRI$_ALERT_OUTSTANDING.CREATION_TIME - Count * is : 2
SYS.WRI$_ALERT_OUTSTANDING.TIME_SUGGESTED - Count * is : 2
SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SAVTIME - Count * is : 29840
SYS.WRI$_OPTSTAT_HISTGRM_HISTORY.SPARE6 - Count * is : 29840
SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SAVTIME - Count * is : 27006
SYS.WRI$_OPTSTAT_HISTHEAD_HISTORY.SPARE6 - Count * is : 27006
SYS.WRI$_OPTSTAT_IND_HISTORY.SAVTIME - Count * is : 2131
SYS.WRI$_OPTSTAT_IND_HISTORY.SPARE6 - Count * is : 2131
SYS.WRI$_OPTSTAT_OPR.END_TIME - Count * is : 355
SYS.WRI$_OPTSTAT_OPR.SPARE6 - Count * is : 355
SYS.WRI$_OPTSTAT_OPR.START_TIME - Count * is : 355
SYS.WRI$_OPTSTAT_TAB_HISTORY.SAVTIME - Count * is : 1989
SYS.WRI$_OPTSTAT_TAB_HISTORY.SPARE6 - Count * is : 1989
Total count * of SYS TSTZ columns ROWS is : 123612
There are in total 124 SYS TSTZ columns.
.
For non-SYS tables ...
Note: empty tables are not listed.
Owner.Tablename.Columnname - count star of that column
APPLSYS.AQ$_FND_CP_GSM_IPC_AQTBL_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_FND_CP_GSM_IPC_AQTBL_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_FND_CP_GSM_IPC_AQTBL_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_FND_CP_GSM_OPP_AQTBL_S.CREATION_TIME - Count * is : 2
APPLSYS.AQ$_FND_CP_GSM_OPP_AQTBL_S.DELETION_TIME - Count * is : 2
APPLSYS.AQ$_FND_CP_GSM_OPP_AQTBL_S.MODIFICATION_TIME - Count * is : 2
APPLSYS.AQ$_FND_CP_TM_AQTBL_S.CREATION_TIME - Count * is : 1
APPLSYS.AQ$_FND_CP_TM_AQTBL_S.DELETION_TIME - Count * is : 1
APPLSYS.AQ$_FND_CP_TM_AQTBL_S.MODIFICATION_TIME - Count * is : 1
APPLSYS.AQ$_FND_CP_TM_RET_AQTBL_S.CREATION_TIME - Count * is : 1
APPLSYS.AQ$_FND_CP_TM_RET_AQTBL_S.DELETION_TIME - Count * is : 1
APPLSYS.AQ$_FND_CP_TM_RET_AQTBL_S.MODIFICATION_TIME - Count * is : 1
APPLSYS.AQ$_WF_CONTROL_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_CONTROL_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_CONTROL_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_DEFERRED_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_DEFERRED_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_DEFERRED_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_DEFERRED_TABLE_M_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_DEFERRED_TABLE_M_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_DEFERRED_TABLE_M_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_ERROR_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_ERROR_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_ERROR_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_IN_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_IN_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_IN_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JAVA_DEFERRED_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JAVA_DEFERRED_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JAVA_DEFERRED_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JAVA_ERROR_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JAVA_ERROR_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JAVA_ERROR_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_IN_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_IN_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_IN_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_JMS_OUT_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_JMS_OUT_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_JMS_OUT_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_OUT_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_OUT_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_JMS_OUT_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_NOTIFICATION_IN_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_NOTIFICATION_IN_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_NOTIFICATION_IN_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_NOTIFICATION_OUT_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_NOTIFICATION_OUT_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_NOTIFICATION_OUT_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_OUT_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_OUT_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_OUT_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_REPLAY_IN_S.CREATION_TIME - Count * is : 1
APPLSYS.AQ$_WF_REPLAY_IN_S.DELETION_TIME - Count * is : 1
APPLSYS.AQ$_WF_REPLAY_IN_S.MODIFICATION_TIME - Count * is : 1
APPLSYS.AQ$_WF_REPLAY_OUT_S.CREATION_TIME - Count * is : 1
APPLSYS.AQ$_WF_REPLAY_OUT_S.DELETION_TIME - Count * is : 1
APPLSYS.AQ$_WF_REPLAY_OUT_S.MODIFICATION_TIME - Count * is : 1
APPLSYS.AQ$_WF_WS_JMS_IN_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_WS_JMS_IN_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_WS_JMS_IN_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_WS_JMS_OUT_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_WS_JMS_OUT_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_WS_JMS_OUT_S.MODIFICATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_WS_SAMPLE_S.CREATION_TIME - Count * is : 3
APPLSYS.AQ$_WF_WS_SAMPLE_S.DELETION_TIME - Count * is : 3
APPLSYS.AQ$_WF_WS_SAMPLE_S.MODIFICATION_TIME - Count * is : 3
APPS.AQ$_WF_BPEL_QTAB_S.CREATION_TIME - Count * is : 1
APPS.AQ$_WF_BPEL_QTAB_S.DELETION_TIME - Count * is : 1
APPS.AQ$_WF_BPEL_QTAB_S.MODIFICATION_TIME - Count * is : 1
AR.AQ$_AR_REV_REC_QT_S.CREATION_TIME - Count * is : 3
AR.AQ$_AR_REV_REC_QT_S.DELETION_TIME - Count * is : 3
AR.AQ$_AR_REV_REC_QT_S.MODIFICATION_TIME - Count * is : 3
AR.AQ$_HZ_JMS_OUT_S.CREATION_TIME - Count * is : 3
AR.AQ$_HZ_JMS_OUT_S.DELETION_TIME - Count * is : 3
AR.AQ$_HZ_JMS_OUT_S.MODIFICATION_TIME - Count * is : 3
ASO.AQ$_ASO_ORDER_FEEDBACK_T_S.CREATION_TIME - Count * is : 3
ASO.AQ$_ASO_ORDER_FEEDBACK_T_S.DELETION_TIME - Count * is : 3
ASO.AQ$_ASO_ORDER_FEEDBACK_T_S.MODIFICATION_TIME - Count * is : 3
CS.AQ$_CS_SERVICE_REQUEST_IQT_S.CREATION_TIME - Count * is : 1
CS.AQ$_CS_SERVICE_REQUEST_IQT_S.DELETION_TIME - Count * is : 1
CS.AQ$_CS_SERVICE_REQUEST_IQT_S.MODIFICATION_TIME - Count * is : 1
CS.AQ$_CS_SERVICE_REQUEST_OQT_S.CREATION_TIME - Count * is : 1
CS.AQ$_CS_SERVICE_REQUEST_OQT_S.DELETION_TIME - Count * is : 1
CS.AQ$_CS_SERVICE_REQUEST_OQT_S.MODIFICATION_TIME - Count * is : 1
OKC.AQ$_OKC_AQ_EV_TAB_S.CREATION_TIME - Count * is : 6
OKC.AQ$_OKC_AQ_EV_TAB_S.DELETION_TIME - Count * is : 6
OKC.AQ$_OKC_AQ_EV_TAB_S.MODIFICATION_TIME - Count * is : 6
PO.AQ$_PO_OTM_OUT_S.CREATION_TIME - Count * is : 3
PO.AQ$_PO_OTM_OUT_S.DELETION_TIME - Count * is : 3
PO.AQ$_PO_OTM_OUT_S.MODIFICATION_TIME - Count * is : 3
XNP.AQ$_XNP_OUT_MSG_QTAB_S.CREATION_TIME - Count * is : 3
XNP.AQ$_XNP_OUT_MSG_QTAB_S.DELETION_TIME - Count * is : 3
XNP.AQ$_XNP_OUT_MSG_QTAB_S.MODIFICATION_TIME - Count * is : 3
Total count * of non-SYS TSTZ columns ROWS is :  243
There are in total 125 non-SYS TSTZ columns.
Total Minutes elapsed : 2
SQL> @upg_tzv_check.sql
INFO: Starting with RDBMS DST update preparation.
INFO: NO actual RDBMS DST update will be done by this script.
INFO: If an ERROR occurs the script will EXIT sqlplus.
INFO: Doing checks for known issues ...
INFO: Database version is 11.2.0.3 .
INFO: Database RDBMS DST version is DSTv10 .
INFO: No known issues detected.
INFO: Now detecting new RDBMS DST version.
A prepare window has been successfully started.
INFO: Newest RDBMS DST version detected is DSTv20 .
INFO: Next step is checking all TSTZ data.
INFO: It might take a while before any further output is seen ...
A prepare window has been successfully ended.
INFO: A newer RDBMS DST version than the one currently used is found.
INFO: Note that NO DST update was yet done.
INFO: Now run upg_tzv_apply.sql to do the actual RDBMS DST update.
INFO: Note that the upg_tzv_apply.sql script will
INFO: restart the database 2 times WITHOUT any confirmation or prompt.
++++++++++++++++++++++++
SQL> @upg_tzv_apply.sql

INFO: If an ERROR occurs the script will EXIT sqlplus.
INFO: The database RDBMS DST version will be updated to DSTv20 .
WARNING: This script will restart the database 2 times
WARNING: WITHOUT asking ANY confirmation.
WARNING: Hit control-c NOW if this is not intended.
INFO: Restarting the database in UPGRADE mode to start the DST upgrade.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2235208 bytes
Variable Size             465568952 bytes
Database Buffers          587202560 bytes
Redo Buffers               13930496 bytes
Database mounted.
Database opened.
INFO: Starting the RDBMS DST upgrade.
INFO: Upgrading all SYS owned TSTZ data.
INFO: It might take time before any further output is seen ...
An upgrade window has been successfully started.
INFO: Restarting the database in NORMAL mode to upgrade non-SYS TSTZ data.
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2235208 bytes
Variable Size             465568952 bytes
Database Buffers          587202560 bytes
Redo Buffers               13930496 bytes
Database mounted.
Database opened.
INFO: Upgrading all non-SYS TSTZ data.
INFO: It might take time before any further output is seen ...
INFO: Do NOT start any application yet that uses TSTZ data!
INFO: Next is a list of all upgraded tables:
Table list: "ASO"."AQ$_ASO_ORDER_FEEDBACK_T_S"
Number of failures: 0
Table list: "OKC"."AQ$_OKC_AQ_EV_TAB_S"
Number of failures: 0
Table list: "AR"."AQ$_AR_REV_REC_QT_S"
Number of failures: 0
Table list: "XNP"."AQ$_XNP_OUT_MSG_QTAB_S"
Number of failures: 0
Table list: "CS"."AQ$_CS_SERVICE_REQUEST_OQT_S"
Number of failures: 0
Table list: "CS"."AQ$_CS_SERVICE_REQUEST_IQT_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_DEFERRED_TABLE_M_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_DEFERRED_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_ERROR_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_REPLAY_OUT_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_IN_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_OUT_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_REPLAY_IN_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JMS_IN_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JMS_OUT_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_CONTROL_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_NOTIFICATION_IN_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_NOTIFICATION_OUT_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_WS_JMS_IN_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JAVA_DEFERRED_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JAVA_ERROR_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_WS_JMS_OUT_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JMS_JMS_OUT_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_WS_SAMPLE_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_FND_CP_GSM_OPP_AQTBL_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_FND_CP_TM_RET_AQTBL_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_FND_CP_TM_AQTBL_S"
Number of failures: 0
Table list: "AR"."AQ$_HZ_JMS_OUT_S"
Number of failures: 0
Table list: "APPLSYS"."AQ$_FND_CP_GSM_IPC_AQTBL_S"
Number of failures: 0
Table list: "PO"."AQ$_PO_OTM_OUT_S"
Number of failures: 0
Table list: "APPS"."AQ$_WF_BPEL_QTAB_S"
Number of failures: 0
Table list: "AR"."AQ$_AR_REV_REC_QT_L"
Number of failures: 0
Table list: "ASO"."AQ$_ASO_ORDER_FEEDBACK_T_L"
Number of failures: 0
Table list: "PO"."AQ$_PO_OTM_OUT_L"
Number of failures: 0
Table list: "XNP"."AQ$_XNP_OUT_MSG_QTAB_L"
Number of failures: 0
Table list: "APPS"."AQ$_WF_BPEL_QTAB_L"
Number of failures: 0
Table list: "OKC"."AQ$_OKC_AQ_EV_TAB_L"
Number of failures: 0
Table list: "CS"."AQ$_CS_SERVICE_REQUEST_OQT_L"
Number of failures: 0
Table list: "CS"."AQ$_CS_SERVICE_REQUEST_IQT_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_DEFERRED_TABLE_M_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_DEFERRED_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_ERROR_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_REPLAY_OUT_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_IN_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_OUT_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_REPLAY_IN_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JMS_IN_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JMS_OUT_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_CONTROL_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_NOTIFICATION_IN_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_NOTIFICATION_OUT_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_WS_JMS_IN_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JAVA_DEFERRED_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JAVA_ERROR_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_WS_JMS_OUT_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_JMS_JMS_OUT_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_WF_WS_SAMPLE_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_FND_CP_GSM_IPC_AQTBL_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_FND_CP_GSM_OPP_AQTBL_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_FND_CP_TM_RET_AQTBL_L"
Number of failures: 0
Table list: "APPLSYS"."AQ$_FND_CP_TM_AQTBL_L"
Number of failures: 0
Table list: "AR"."AQ$_HZ_JMS_OUT_L"
Number of failures: 0
INFO: Total failures during update of TSTZ data: 0 .
An upgrade window has been successfully ended.
INFO: Your new Server RDBMS DST version is DSTv20 .
INFO: The RDBMS DST update is successfully finished.
INFO: Make sure to exit this sqlplus session.
INFO: Do not use it for timezone related selects.

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[oracle@pxebssdl1 DBMS_DST_scriptsV1.8]$ cd
[oracle@pxebssdl1 ~]$
[oracle@pxebssdl1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Jul 28 08:44:16 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>  SELECT version FROM v$timezone_file;
   VERSION
----------
        20

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@pxebssdl1 ~]$

Sunday, August 10, 2014

ORA-00392: log 1 of thread 1 is being cleared, operation not allowed


SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-00392: log 1 of thread 1 is being cleared, operation not allowed
ORA-00312: online log 1 thread 1:
'/u01/oracle/PROD/db/apps_st/data/log01a.dbf'
ORA-00312: online log 1 thread 1:
'/u01/oracle/PROD/db/apps_st/data/log01b.dbf'

SQL> select group#,sequence#,archived,status from v$log;

    GROUP#  SEQUENCE# ARC STATUS
---------- ---------- --- ----------------
         2          0 NO  CLEARING_CURRENT
         1          0 YES CLEARING

SQL> alter database clear logfile group 1;
          Database altered.

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-00392: log 2 of thread 1 is being cleared, operation not allowed
ORA-00312: online log 2 thread 1:
'/u01/oracle/PROD/db/apps_st/data/log02a.dbf'
ORA-00312: online log 2 thread 1:
'/u01/oracle/PROD/db/apps_st/data/log02b.dbf'

SQL> select group#,sequence#,archived,status from v$log;

    GROUP#  SEQUENCE# ARC STATUS
---------- ---------- --- ----------------
         2          0 NO  CLEARING_CURRENT
         1          0 YES UNUSED

SQL> alter database clear logfile group 2;
          Database altered.

SQL> alter database open resetlogs;

Wednesday, July 16, 2014

Creating Physical Standby using RMAN Duplicate Without Shutting down The Primary


1.Enable force logging.
2.Create SRL(standby redo logs).
3.Make proper changes in the parameter file of primary.
4.Backup the database that includes backup of datafiles, archivelogs and controlfile for standby and copy the backups to standby server.
5.Create the parameter file for standby,
6.Establish the connectivity from primary to standby.
7. Move backup to standby.
8 and 9. Start the standby instance.
10.Use RMAN Duplicate command to create the standby database.

 Verify whether the log are shipped and applied properly @the standby

STEP: 1

Enable Force Logging on primary,

SQL> ALTER DATABASE FORCE LOGGING;

NOTE: Create password file if not present, also check if archiving enabled.

STEP: 2
Configure a Standby Redo Log on primary,

SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 3 '/u01/app/oracle/oradata/SVRPRD/log3a.log' size 50m;
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 '/u01/app/oracle/oradata/SVRPRD/log4a.log' size 50m;
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 5 '/u01/app/oracle/oradata/SVRPRD/log5a.log' size 50m;
SQL> ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 '/u01/app/oracle/oradata/SVRPRD/log6a.log' size 50m;

NOTE:
1. To check the number of SRL,
(maximum number of logfiles for each thread + 1) * maximum number of threads
2. The SRL size equal to ORL size.

STEP :3 initSVRPRD.ora

Modify the primary initialization parameter for dataguard on primary,

SQL> show parameter LOG_ARCHIVE_CONFIG;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_config                   string      dg_config=("SVRPRD","SVRPRDS")

*.log_archive_config='dg_config=("SVRPRD","SVRPRDS")'
*.log_archive_dest=''
*.log_archive_dest_1='Location=/archivelogs/SVRPRD'
*.log_archive_dest_2='service=SVRPRDS valid_for=(online_logfiles, primary_role) db_unique_name="SVRPRDS"'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='SVRPRD_%t_%s_%r.arc'
*.fal_client='SVRPRD'
*.fal_server='SVRPRDS'

Ex : use dynamically
QL>alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(prim,stdby)';


STEP:4  // if we use active  Standby Database no need to take backup
Run the backup job at the primary by connecting to target and catalog DB(if any)

run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
backup database format '/u01/app/oracle/databases/stage/%U';
backup archivelog all format '/u01/app/oracle/databases/stage/%U';
backup current controlfile for standby format '/u01/app/oracle/databases/stage/%U';
}

STEP :5

Create parameter file on primary copy it to standby and make the necessary changes,

SQL>create pfile='/u01/app/oracle/databases/prim/stage/initstdby.ora' from spfile;

Step :6 ---tnsnames.ora

Establish the connectivity,
Create net services on both primary and standby,
At prim server,

SVRPRDS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = svrdrebsd1.singiri.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SVRPRD)
    )
  )

SVRPRD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = svrprdebsd1.singiri.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SVRPRD)
    )
  )

++++++++At standby server+++++++++
# Generated by Oracle configuration tools.

SVRPRD =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = svrprdebsd1.singiri.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SVRPRD)
    )
  )
SVRPRDS =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = svrdrebsd1.singiri.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SVRPRD)
    )
  )

STEP : 7
Move the files to standby server,

a. Create the same directory on standby server and copy the backups.
os standby,

$mkdir -p /u01/app/oracle/databases/stage/
[oracle@raca prim]$ scp /u01/app/oracle/databases/stage/* core1.idc.oracle.com:/u01/app/oracle/databases/stage/

b. Alternatively we can copy the backups to standby different directory. On standby server connect to RMAN target as primary and auxiliary instance or if

your primary is having catalog database then connect to target as primary, catalog database and auxiliary instance. Catalog those backup pieces to let the

controlfile of primary or catalog database to know the backup information.

STEP: 8

Make the necessary changes on the copied initstdby.ora file on standby.

*.db_name='SVRPRD'
*.db_unique_name='SVRPRDS'
*.diagnostic_dest='/u01/app/oracle'
*.fal_client='SVRPRDS'
*.fal_server='SVRPRD'
*.local_listener='SVRPRD'
*.log_archive_config='dg_config=("SVRPRD","SVRPRDS")'
*.log_archive_dest=''
*.log_archive_dest_1='location=/archivelogs/SVRPRD'
*.log_archive_dest_2='service=SVRPRD valid_for=(online_logfiles, primary_role) db_unique_name="SVRPRD"'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='SVRPRD_%t_%s_%r.arc'
*.remote_login_passwordfile='EXCLUSIVE'
*.standby_file_management='AUTO'


STEP: 9

Create standby instance,

create the same password as that of primary. Alternatively we can copy the password file from primary and rename it on standby.

For example from primary copy the password file,

scp /u01/app/oracle/dbs/opapwprim standby.idc.oracle.com:/u01/app/oracle/dbs/
on standby,

$mv orapwprim orapwstdby

Ex:
$export ORACLE_SID
$orapwd file='$ORACLE_HOME/dbs/orapwstdby' password=sys entries=10;


STEP : 10 Use RMAN duplicate for standby on standby,

Make sure listener is running on both Primary/Standby database ,

On Standby :

sqlplus / as sysdba

startup nomount pfile=$ORACLE_HOME/dbs/initSVRPRD.ora

$RMAN target /@prim catalog RMAN/RMAN@catdb auxiliary /

if no catalog database,

$RMAN target sys/<password>@prim auxiliary /

Ex :
rman target sys/svrprdmgr@SVRPRD auxiliary sys/svrprdmgr@SVRPRDS

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jul 16 01:36:08 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: SVRPRD (DBID=1765422269)

connected to auxiliary database: SVRPRD (not mounted)

RMAN> run {
 duplicate target database for standby dorecover from active database nofilenamecheck;
 }
Starting Duplicate Db at 16-JUL-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=474 device type=DISK
allocated channel: ORA_AUX_DISK_2
.......

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwSVRPRD' auxiliary format
 '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwSVRPRD'   ;
}
executing Memory Script

Starting backup at 16-JUL-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=492 device type=DISK
allocated channel: ORA_DISK_2
............
Finished backup at 16-JUL-14

contents of Memory Script:
{
   backup as copy current controlfile for standby auxiliary format  '/u01/app/oracle/oradata/SVRPRD/control01.dbf';
   restore clone controlfile to  '/u01/app/oracle/oradata/SVRPRD/control02.dbf' from
 '/u01/app/oracle/oradata/SVRPRD/control01.dbf';
}
executing Memory Script

Starting backup at 16-JUL-14
using channel ORA_DISK_1
using channel ORA_DISK_2

channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/CF_snapshot_PROD_%F.bak tag=TAG20140716T023551 RECID=18 STAMP=853036556
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:16
Finished backup at 16-JUL-14

Starting restore at 16-JUL-14
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
................

channel ORA_AUX_DISK_2: skipped, AUTOBACKUP already found
channel ORA_AUX_DISK_3: skipped, AUTOBACKUP already found
......

channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 16-JUL-14

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u01/app/oracle/oradata/SVRPRD/temp03.dbf";
..................
backup as copy reuse
   datafile  1 auxiliary format
 "/u01/app/oracle/oradata/SVRPRD/system01.dbf"   datafile
....................

 sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

........................
.......................
.......................

datafile 11 switched to datafile copy
input datafile copy RECID=28 STAMP=853054683 file name=/u01/app/oracle/oradata/SVRPRD/svrebindx02.dbf

contents of Memory Script:
{
   set until scn  6047214831398;
   recover
   standby
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 16-JUL-14
using channel ORA_AUX_DISK_1
........
using channel ORA_AUX_DISK_6

starting media recovery

archived log for thread 1 with sequence 70837 is already on disk as file /archivelogs/SVRPRD/SVRPRD_1_70837_744780970.arc
archived log for thread 1 with sequence 70838 is already on disk as file /archivelogs/SVRPRD/SVRPRD_1_70838_744780970.arc
archived log file name=/archivelogs/SVRPRD/SVRPRD_1_70837_744780970.arc thread=1 sequence=70837
archived log file name=/archivelogs/SVRPRD/SVRPRD_1_70838_744780970.arc thread=1 sequence=70838
media recovery complete, elapsed time: 00:01:32
Finished recover at 16-JUL-14
Finished Duplicate Db at 16-JUL-14

++++++++++++++++++once Finished Duplicate ++++++++++++

Step 1 :

sql> create spfile from pfile;

sql> shut immediate;

SQL> startup nomount;

SQL> alter database mount;
Database altered.

SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Database altered.

SQL> shut immediate;

SQL> startup nomount;

SQL> alter database mount standby database;
Database altered.

SQL> alter database recover managed standby database disconnect from session;
Database altered.

( Or )SQL> alter database recover managed standby database disconnect;

STEP : 2

Enable the log_archive_dest_2 on primary, which is to send the logs to standby server.
SQL> Alter system set log_archive_dest_state_2=enable scope=both;

STEP :3
heck the standby whether it is in SYNC with primary,

SQL> select name,db_unique_name,database_role from v$database;

NAME      DB_UNIQUE_NAME                 DATABASE_ROLE
--------- ------------------------------ ----------------
SVRPRD   SVRPRDS                       PHYSICAL STANDBY

SQL>  SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SQL>select sequence#,applied from v$archived_log order by sequence#;

SQL> select ads.dest_id,max(sequence#) "Current Sequence",max(log_sequence) "Last Archived" from v$archived_log al, v$archive_dest ad, v$archive_dest_status ads where ad.dest_id=al.dest_id and al.dest_id=ads.dest_id group by ads.dest_id;

SQL> select max(al.sequence#) "Last Seq Recieved", max(lh.sequence#) "Last Seq Applied" from v$archived_log al, v$log_history lh;

++++++++789370.1++++++++

Monday, June 23, 2014

Excel4apps (GL- Wand) Setup for EBS R12 :

GL Wand for Oracle ( Excel-based financial reporting solution for Oracle )

An award-winning, Excel-based financial reporting solution for finance professionals using Oracle e-Business Suite 11i or 12, GL Wand enables highly efficient and secure financial reporting, shorter month ends, and faster refreshes with ad-hoc inquiry and drill downs........ :) :) :)

         http://www.excel4apps.com/

Both Admin & Web node :

had appl_top/java_top on both nodes ,

~]$unzip glwand5.5.0.zip

~]$ls -la excel4apps*
-rw-r--r-- 1 applmgr oinstall 5472391 Sep 13  2013 excel4apps_wands_oracle_r12.zip

unzip excel4apps_wands_oracle_r12.zip

Archive:  excel4apps_wands_oracle_r12.zip
  inflating: e4awand_oracle_appl_top.zip
  inflating: e4awand_oracle_java_top.zip

~]$cp -rp e4awand_oracle_appl_top.zip  $APPL_TOP
 ~]$cd $APPL_TOP
unzip e4awand_oracle_appl_top.zip

~]$cp -rp e4awand_oracle_java_top.zip  $JAVA_TOP
cd $JAVA_TOP
unzip e4awand_oracle_java_top.zip

 unzip on /home/applmgr

~]$ unzip excel4apps_wands_oracle_r12.zip

  inflating: e4awand_oracle_appl_top.zip
  inflating: e4awand_oracle_java_top.zip

~]$cp -rp e4awand_oracle_appl_top.zip  $APPL_TOP

~]$cd $APPL_TOP
~]unzip e4awand_oracle_appl_top.zip

~]$cp -rp e4awand_oracle_java_top.zip  $JAVA_TOP

cd $JAVA_TOP
 ~]unzip e4awand_oracle_java_top.zip


/u01/app/oracle/apps/apps_st/comn/java/classes/com
ls -latr excel4apps
total 24
drwxr-xr-x  3 applmgr oinstall 4096 Sep 13  2013 oracle
drwxr-xr-x  2 applmgr oinstall 4096 Sep 13  2013 applet
drwxr-xr-x  6 applmgr oinstall 4096 Sep 13  2013 .
drwxr-xr-x 12 applmgr oinstall 4096 Apr 27 10:50 ..
drwxr-xr-x  2 applmgr oinstall 4096 Apr 27 13:56 install
drwxr-xr-x  3 applmgr oinstall 4096 Apr 28 21:43 servlet

The Excel4apps Wands communicate with Oracle via a Java servlet. The servlet needs to be configured using Oracle’s standards as documented in note
“387859.1 - UsingAutoConfig to Manage System Configurations in Oracle Applications Release 12” on Oracle’s support website.
The process involves creating a copy of the applicable template file, adding the Excel4apps Wands entries to the file, running AutoConfig and bouncing the   Applications tier.

cd $FND_TOP/admin/template/custom

orion_web_xml_1013.tmp Backup then edit hte file

<!-- Excel4apps Wands 5 Alias -->
<servlet>
<servlet-name>excel4apps</servlet-name>
<servlet-class>com.excel4apps.servlet.wand.oracle.Servlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>excel4apps</servlet-name>
<url-pattern>/excel4apps</url-pattern>
</servlet-mapping>

<!-- OC4J Session Timeout -->
        <session-config>
                <session-timeout>%s_oc4j_sesstimeout%</session-timeout>
        </session-config>

Run Autoconfig  On order Admin & Web node :

After successfull , Verify the same
cd $INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html

 grep -i excel4apps orion-web.xml

<!-- Excel4apps Wands 5 Alias -->

<servlet-name>excel4apps</servlet-name>
<servlet-class>com.excel4apps.servlet.wand.oracle.Servlet</servlet-class>
<servlet-name>excel4apps</servlet-name>
<url-pattern>/excel4apps</url-pattern>


http://<hostname>.<domain>:8000/OA_HTML/excel4apps // it should dispaly the Excel4apps Wands Server Versions (23-Jun-2014 3:18:19 & v5.5.0)

Load Excel4apps OAF pages:

Option A - Running the script: on both nodes
1. Navigate to the $JAVA_TOP/com/excel4apps/install
]$ sh load_oafpages_r12.sh


Execute the script. Please note this is a bash shell script.
o It will prompt for database connection information.
o Before the script runs it will display the information that you captured and ask if you wish to continue. You can cancel at this point if required.

-->  If you choose to continue, the script will first delete any existing Excel4apps OAF pages. This will display an error if there are no pages to delete. This error is normal and it can be ignored if received.
-->  The script will then load the Excel4apps OAF pages using the XMLImporter utility.

-->  The import steps should complete successfully and a message should be displayed indicating that the pages were imported.

Verification :

sqlplus apps/apps

SQL>set serveroutput on;

begin
jdr_utils.listdocuments('/com/excel4apps',TRUE);
end;
/

Printing contents of /com/excel4apps recursively
/com/excel4apps/oracle/apps/xxe4a/wands/webui/WandHomePG
/com/excel4apps/oracle/apps/xxe4a/wands/webui/WandAppletPG

PL/SQL procedure successfully completed.

SQL>
begin
jdr_utils.printDocument('/com/excel4apps/oracle/apps/xxe4a/wands/webui/WandHomePG');
end;
/

<?xml version='1.0' encoding='UTF-8'?>
<page xmlns:jrad="http://xmlns.oracle.com/jrad"
xmlns:oa="http://xmlns.oracle.com/oa" xmlns:ui="http://xmlns.oracle.com/uix/ui"
version="9.0.3.8.12_1330" xml:lang="en-US"
xmlns:user="http://xmlns.oracle.com/jrad/user"
xmlns="http://xmlns.oracle.com/jrad"
file-version="$Header$">
..........

begin
jdr_utils.printDocument('/com/excel4apps/oracle/apps/xxe4a/wands/webui/WandAppletPG');
end;
/
<?xml version='1.0' encoding='UTF-8'?>
<page xmlns:jrad="http://xmlns.oracle.com/jrad"
xmlns:oa="http://xmlns.oracle.com/oa" xmlns:ui="http://xmlns.oracle.com/uix/ui"
version="9.0.3.8.12_1330" xml:lang="en-US"
xmlns:user="http://xmlns.oracle.com/jrad/user"
xmlns="http://xmlns.oracle.com/jrad"
file-version="$Header$">
....................

Load Application Components :
Load Application Components
1. Log on to the Oracle system and select a responsibility like System Administrator that has permission to register an application.
2. Navigate to the following menu: Application > Register.
3. Create a new application as follows:

Application : Excel4apps
Short Name  : XXE4A
Basepath    : XXE4A_TOP


4. Navigate to the following menu :Concurrent --->program ---> Executable

5. Create  a new Executable As follow :

Executable XXE4A
Short Name XXE4A
Application Excel4apps
Execution Method PL/SQL Stored Procedure
Execution File Name XXE4A


Option A - Using the FNDLOAD utility:

1. Navigate to the $JAVA_TOP/com/excel4apps/install folder.
2. Execute the following two commands replacing the $apps_password variable with your APPS password.

$FND_TOP/bin/FNDLOAD apps/"$apps_password" O Y UPLOAD
$FND_TOP/patch/115/import/afsload.lct XXE4A_WANDS_MENU.ldt
$FND_TOP/bin/FNDLOAD apps/"$apps_password" O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct XXE4A_WANDS_RESP.ldt
FNDLOAD should complete successfully.


Verification:

1. If you ran the process using the FNDLOAD utility, you should check the log file to make sure that there were no errors.
2. Check that the configuration components exist:
o Log on to the Oracle system and select a Responsibility like System Administrator that has permission to configure application components.
o Query the configuration components mentioned above and ensure that they all exist and are configured correctly.
3. Assign the Excel4apps Wands Responsibility to an Oracle user.
Grant following users - Excel4apps Wands - Responsibility
SVREDDY
SNREDDY
SMREDDY

4. Log on to Oracle using a browser with that Oracle user.
5. Launch the application by clicking on the Excel4apps Wands Responsibility.
Step 13 Log on for the first time
1. Log on to Oracle from a browser using the user that you assigned the Excel4apps Wands Responsibility to.
2. Launch the Excel4apps Wands application. This will launch a Java Applet and load the Excel4apps Wands toolbar into Microsoft Excel.
3. Request or enter a license key.
o You may be prompted to request a license key or enter one received previously.
o Additional details on requesting and entering license keys can be found in the Administrator section of the online user guide under the “System Administrator Options” section.

4. Configure system administrator options.
1. Log on to Oracle from a browser using the user that you assigned the Excel4apps Wands Responsibility to.
2. Launch the Excel4apps Wands application. This will launch a Java Applet and load the Excel4apps Wands toolbar into Microsoft Excel.
3. Request or enter a license key.
o You may be prompted to request a license key or enter one received previously.
o Additional details on requesting and entering license keys can be found in the Administrator section of the online user guide under the “System Administrator Options” section.

4. Configure system administrator options.

Required settings: The first time you log on you must flag one (or more) Oracle user as an Excel4apps Wands system administrator(s). Once the license key is entered and saved, only this user(s) will have permissions to administer the installation, change options and set permissions for other users.
o Optional settings: Optionally configure additional system administer options to meet specific environment needs as described in the Administrator section of the online user guide under the “System Administrator Options” section.
Step 14 Unlocking the System Administrator Functionality

The first user that logs on to the Excel4apps Wands will be given the opportunity to enter a license key and then to activate users and set the system options. At least one user must be flagged as a System Administrator although you may assign more than one.
From then on, only a user flagged as a System Administrator will be able to access the menu option to administer the Excel4apps Wands system settings and to maintain the users. If your System Administrator is not available or leaves the company you might need to unlock access to the system administration functionality. If this becomes a requirement please contact us at support@excel4apps.com and we will provide you with the necessary steps to assign another user as a System Administrator.
++++++++++++++++++++++++++++++++

Sunday, June 22, 2014

Install Quantum for Oracle Payroll (EBS R12.1.3)

About Vertex Payroll Tax Q Series
Vertex Payroll Tax Q Series (PTQ) maintains tax rates, rules, and regulations and
enables you to enter special tax considerations that are applicable to your payroll
run.
When you send the required information to PTQ, it calculates the federal, state,
Canadian, some U.S. territories, and local taxes on all regular and supplemental
wages. The product's programming logic takes into account factors such as:
• Multiple work locations per employee
• Specific net pay
• Advanced vacation pay
• Tips
• IRS qualified benefit plans
• All reciprocal agreements among states, cities, and counties
For PTQ customers only, Vertex offers a separate data file that enables you to
calculate PAYE and NICs taxes in the United Kingdom.
Vertex updates the data required for accurate payroll calculations every month.
You can maintain the product by loading a DVD or downloading files from myVerte
+++++++++++++++EBS R12++++++++++++++++

1. Create following directory structure in SVRUAT Admin Tier..

/d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum
2. Copy ‘pyvendor.zip’ file from ‘/d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/lib’ to ‘/d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions’
Note: Please do the Quantum Payroll setups after applying recent HRMS Delta patch as ‘pyvendor.zip’ will get updated with it.
3. Unzip ‘pyvendor.zip’ file. It will further create platform specific zip files. Unzip respective platform zip file (e.g. REDHAT50.zip) and it will create directory called ‘3.0.2’ (or recent quantum version specific)

4. Create following symbolic link.

ln -s /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.0.2 /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum

5. Take a backup of ‘$FND_TOP/usrxit/devenv.env’. Uncomment following lines from file.
# 3) Any user-defined environment variables (like VND_LINK in the example
#    above) must be set and exported in this file.  There is a special
#    section for this purpose below.
#
#    Example:
#
#    Needed when linking in 3rd Party Software
 
 VND_VERTEX='$(PAY_TOP)/vendor/quantum'
    VND_LINK='$(VND_VERTEX)/lib/libvprt.a \
              $(VND_VERTEX)/lib/libqutil.a \
              $(VND_VERTEX)/lib/libloc.a \
              $(VND_VERTEX)/lib/libcb63.a'
    VNDPAYSL='$(PAY_TOP)/lib/py3c.o $(PAY_TOP)/lib/py3v.o $(VND_LINK)'
    VNDPAYPL='$(PAY_TOP)/lib/py3c.o $(PAY_TOP)/lib/py3v.o $(VND_LINK)'
    export VND_VERTEX VND_LINK VNDPAYPL VNDPAYSL
#
 
6. Relink the Oracle Payroll executable PYUGEN using adrelink.

$ adrelink force=y ranlib=y "pay PYUGEN"

Ensure that the adrelink completed successfully by checking the log file.

Set your PATH and LD_LIBRARY_PATH environment variables to include the directories where the Vertex executables and libraries are installed.
export LD_LIBRARY_PATH=/d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.0.2/lib:$LD_LIBRARY_PATH

7. Download recent Monthly Quantum update (e.g. QFPTDNLD0213.zip). This is available at

‘https://my.vertexinc.com/’ --> Provide registered username &Pwd

Note :Go to ‘DOWNLOADS’ section and download recently released Payroll data file from ‘Payroll Tax Q Series – Oracle’ section.

8. Unzip given file on server to below location
#cd $PAY_TOP/ vendor/Vertex_Update
#unzip QFPTDNLD0614.ZIP
#  ls -ltr /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/Vertex_Update/
drwxr-xr-x 2 oracle dba     4096 May 19 13:16 data
drwxr-xr-x 2 oracle dba     4096 May 19 13:17 data320
drwxr-xr-x 2 oracle dba     4096 Jun 17 13:05 docs
-rw-r--r-- 1 oracle dba 22915041 Jun 19 13:18 QFPTDNLD0614.ZIP

9. Copy ‘qfpt.dat’ file from unzipped data320 directory to

#cp qfpt.dat /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.2.0

10. Execute ‘cbmaint’ from ‘/d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.0.2/utils’  location. This utility will create a quantum payroll database files. After ‘cbmaint’ is run you should be able to successfully update the taxes using ‘vprtmupd’ utility.

Choose option 1 & 3 ... This will create database files for GeoCoder and payroll Tax.

Vertex Payroll Tax Q Series - ISAM Database Maintenance Program

Version 3.2.0 2013/07/12

Copyright 1999-2014 Vertex Inc.


Select an ISAM Maintenance Function
-----------------------------------
1.  - Create Database
2.  - Migrate Database
3.  - Reindex Database

9.  - Exit Program

Select: 1

Select a Database to Create
----------------------------
1.  - GeoCoder Database
2.  - Payroll Tax Database

3.  - All Databases

9.  - Main Menu

Select: 3

11. Execute ‘vprtmupd’ utility from ‘/d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.0.2/utils’ location.

 cd $PAY_TOP/vendor/quantum_versions/3.2.0/utils

[oracle@svruatebsal1 utils]$ vprtmupd


Vertex Payroll Tax Q Series - Monthly Update Program

Version 3.2.0    2013/07/12

Copyright (c) Vertex Inc.  1994-2013.  All Rights Reserved.

WARNING! The update process will destroy the contents of the
current database before it creates a new one.  Please make
a backup before proceeding.

Select a Monthly Update Function
--------------------------------
1.  - Update Payroll Tax Database
2.  - Exit Program

Select: 1

Beginning Payroll Tax Monthly Update Process.

Enter Data Source:   /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum/data
Enter the path to the update file:  /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.2.0/

Updating database. Please wait. It may take a while...

Payroll Tax Monthly Update successful.
Press Enter to continue...

WARNING! The update process will destroy the contents of the
current database before it creates a new one.  Please make
a backup before proceeding.


Select a Monthly Update Function
--------------------------------
1.  - Update Payroll Tax Database
2.  - Exit Program

Select: 2

Finished.

(Or)
 logon to the application as US HRMS manager responsibility and run “Quantum Program Update Installer”. Submit "Quantum Data Update Installer" program will update the Payroll Tax to Database.

Parameters:
Enter Data Source:   /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum/data
Enter the path to the update file:  /d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum_versions/3.2.0/


[oracle@svruatebsal1 utils]$ !sq
sqlplus apps/ptc7apps

SQL*Plus: Release 10.1.0.5.0 - Production on Thu Jun 19 13:44:29 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>  select ss_ee_wage_limit  from pay_us_federal_tax_info_f where sysdate between effective_start_date and effective_end_date and ss_ee_wage_limit is not null ;

SS_EE_WAGE_LIMIT
----------------
          117000 //this value should be same for 2014

12. Register the Quantum Data Files location.

SQL> select PARAMETER_VALUE from PAY_ACTION_PARAMETERS where PARAMETER_NAME = 'TAX_DATA';

If it does not displays PARAMETER_VALUE for TAX_DATA as quantum data file location then we need to manually insert into table as…

insert into pay_action_parameters values ('TAX_DATA', '/d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum/data');
commit;

SQL> select PARAMETER_VALUE from PAY_ACTION_PARAMETERS where PARAMETER_NAME = 'TAX_DATA';
PARAMETER_VALUE
--------------------------------------------------------------------------------
/d01/oracle/SVRUAT/apps/apps_st/appl/pay/12.0.0/vendor/quantum/data
================================================                                                        http://www.idbasolutions.com/en/oracle-ebusiness/reinstall-upgrade-vertex.html                                             https://my.vertexinc.com/
================================================
Q> How can I determine the version of Payroll Tax Q I am using?
The easiest way is to run the DIAGNOS utility. The Vertex Payroll Tax Q series version will appear at the beginning of the first screen. You do not need to test the connection. To find out how to run the Diagnos utility for your environment look in the Payroll Tax Q series Administration Guide- chapter 3 or 4 for Windows and Unix, chapter 5 for As/400 environment under the section "Verifying that the databases (or tables) are created and populated correctly".

Another way is to generate an Employee Before and After report. The Payroll Tax Q series version number is in the header of the report.

Q> The May data update file contains two data directories, where do I get my update files from for 3.2.0?

Resolution :

Effective with release 4.0 (starting with the May data update continuing until 3.2.0 is retired) there will be two data files (qfpt.dat) produced each month.
The following applies to Payroll Tax Q and Payroll Tax Q Enhanced Integration only:
If you are on version 3.2.0 of Payroll tax Q series you need to load the qfpt.dat file from the data320 directory and the compress.txt, geomast4.vdf, staxzip4.vdf and ptaxzip4.vdf from the data directory.
If you are on 3.1.2 or 3.2.1 you would load the qfpt.dat, compress.txt, geomast4.vdf, staxzip4.vdf and ptaxzip4.vdf from the data directory.
If you are on 4.x then you would load the qfpt.dat, compress.txt, geomast5.vdf, and taxzip5 from the data directory.

The following applies to Payroll tax Q- Oracle only:
If you are on version 3.2.0 of Payroll tax Q series you need to load the qfpt.dat file from the data320 directory
If you are on 3.1.2, 3.2.1 or 4.X  you need to load the qfpt.dat file from the data directory.

Q> What is the difference between sales and use tax?

Generally, a sales tax occurs when a transaction takes place within a single state's boundaries (intrastate).  A use tax occurs when a transaction takes place between two different states (interstate).

Monday, June 16, 2014

Rman Cold , Hot Backup & Recover :

Cold Backup :

Rman target /

Rman > spool log to ‘/mnt/sas/SVRQAT/cold_backup.log’;

run {
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel t3 type disk;
allocate channel t4 type disk;
allocate channel t5 type disk;
allocate channel t6 type disk;
backup as compressed backupset format='/nfs/db_rman_bkp/SVRQAT/%U' database;
backup format='/nfs/db_rman_bkp/SVRQAT/Tp_cntl_%Y%M%D_%d_%s_%p.ctl' current controlfile;
release channel t1;
release channel t2;
release channel t3;
release channel t4;
release channel t5;
release channel t6;
}


Recovery :
1.Restore the old controlfile from rman , mount the database with old controlfile
and run following script.

Solution A:

run {
      startup mount;
      set until time "to_date('16-JUN-2014 22:08:00','DD-MON-YYYY HH24:MIS')";
      restore database;
      recover database;
      alter database open resetlogs;
}

Solution B:

RMAN> run {
restore database;
recover database noredo;
alter database open resetlogs;
}

Sunday, June 15, 2014

Open Database failed - DATAFILE NEEDS MORE RECOVERY TO BE CONSISTENT ORA-1194 ORA-1547 ORA-1110

Assuming All Datafiles was either successfully restored, and/or recovery was done with existing database datafiles.
Then open the database failed with errors like:

Error :
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/V1123/system01.dbf'

Scenario 1: Current Controlfile is available

This shows the Information whats needed for recovery, usually you will not see the errors as above at open database, but nevertheless giving this example.

1) Ensure Instance is Mounted and ALL Datafiles ONLINE
  
   If the CURRENT CONTROLFILE is used then you can run recover database, and it will
   apply all archivelogs, and the online 'current' redolog if available, and finally you can open database

   Example:
 

SQL> select name, controlfile_type from v$database ;

   NAME      CONTROL
   --------- -------
   V1123     CURRENT
  
   SQL> recover automatic database ; 
    ..
   Media recovery complete    
   SQL> alter database open

Scenario 2: Backup Controlfile is used for recovery

Please see steps below showing you an example getting the errors like ORA-1194, ORA-1547, ORA-1110,
and how to verify status of Controlfile, Datafiles, Logfiles, and finally recover and open database.



SQL> select name, controlfile_type from v$database ;

NAME      CONTROL
--------- -------
V1123     BACKUP       -- controlfile_type is "Backup" Controlfile
SQL> select status,
           resetlogs_change#,
           resetlogs_time,
           checkpoint_change#,
           to_char(checkpoint_time, 'DD-MON-YYYY HH24:MI:SS') as checkpoint_time,
           count(*)
      from v$datafile_header
     group by status, resetlogs_change#, resetlogs_time, checkpoint_change#, checkpoint_time
     order by status, checkpoint_change#, checkpoint_time ;

STATUS  RESETLOGS_CHANGE# RESETLOGS_TIME       CHECKPOINT_CHANGE# CHECKPOINT_TIME        COUNT(*)
------- ----------------- -------------------- ------------------ -------------------- ----------
ONLINE             995548 15-FEB-2012:17:17:20            2446300 13-FEB-2013 15:09:44          1  -- Datafile(s) are at different checkpoint_change# (scn), so not consistent
ONLINE             995548 15-FEB-2012:17:17:20            2472049 13-FEB-2013 16:02:22          6

SQL> -- Check for datafile status, and fuzziness
SQL> select STATUS, ERROR, FUZZY,  count(*)     from v$datafile_header group by STATUS, ERROR, FUZZY   ;

STATUS  ERROR                                                             FUZ   COUNT(*)
------- ----------------------------------------------------------------- --- ----------
ONLINE                                                                    YES          7

SQL> -- Check for MIN, and MAX SCN in Datafiles
SQL> select min(CHECKPOINT_CHANGE#), max(CHECKPOINT_CHANGE#) from v$datafile_header ;

MIN(CHECKPOINT_CHANGE#) MAX(CHECKPOINT_CHANGE#)
----------------------- -----------------------
                2446300                 2472049

SQL>
SQL> select     substr(L.GROUP#,1,6)       GROUP#
           ,substr(L.THREAD#,1,7)         THREAD#
           ,substr(L.SEQUENCE#,1,10)      SEQUENCE#
           ,substr(L.MEMBERS,1,7)         MEMBERS
           ,substr(L.ARCHIVED,1,8)        ARCHIVED
           ,substr(L.STATUS,1,10)         STATUS
           ,substr(L.FIRST_CHANGE#,1,16)  FIRST_CHANGE#
           ,substr(LF.member,1,60)        REDO_LOGFILE
     from GV$LOG L, GV$LOGFILE LF
   where L.GROUP# = LF.GROUP# ;

GROUP# THREAD# SEQUENCE#  MEMBERS ARC STATUS     FIRST_CHANGE#    REDO_LOGFILE
------ ------- ---------- ------- --- ---------- ---------------- ------------------------------------------------------------
1      1       454        1       NO  CURRENT    2471963          /u01/app/oracle/oradata/V1123/redo01.log   <-- This is CURRENT log containing most recent redo, and is available
3      1       453        1       YES INACTIVE   2471714          /u01/app/oracle/oradata/V1123/redo03.log
2      1       452        1       YES INACTIVE   2451698          /u01/app/oracle/oradata/V1123/redo02.log

SQL>


-- Use MIN(CHECKPOINT_CHANGE#) 2446300 as found before, then use it with this query to find the
-- first SEQ# 'number' and archivelog file needed for recover to start with.
-- All SEQ# up to the online Current Redolog SEQ# must be available without any gap for successful recovery

-- MIN(CHECKPOINT_CHANGE#) 2446300

SQL> select thread#, sequence#, substr(name,1,80) from v$Archived_log
      where 2446300 between first_change# and next_change#;

   THREAD#  SEQUENCE# SUBSTR(NAME,1,80)
---------- ---------- --------------------------------------------------------------------------------
         1        449 /u01/app/oracle/oradata/V1123/arch1/arch_1_449_775329440.arc
         1        449 /u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_449_8kq7oc6y_.arc
         1        450 /u01/app/oracle/oradata/V1123/arch1/arch_1_450_775329440.arc
1            450 /u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_450_8kqbn929_.arc

SQL> select * from v$recover_file ;     -- Checking for Datafile(s) which needs recovery

     FILE# ONLINE  ONLINE_ ERROR                                                                CHANGE# TIME
---------- ------- ------- ----------------------------------------------------------------- ---------- --------------------
         6 ONLINE  ONLINE                                                                       2446300 13-FEB-2013:15:09:44

SQL>
If you use a "BACKUP CONTROLFILE", or  previously used a CANCEL based recover command
then we need to recover, and finally 'manual' apply the online current redolog.
  
Example:

SQL> select name, controlfile_type from v$database ;

NAME      CONTROL
--------- -------
V1123     BACKUP

SQL>
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL ;

ORA-00279: change 2446300 generated at 02/13/2013 15:09:44 needed for thread 1
ORA-00289: suggestion : /u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_450_8kqbn929_.arc
ORA-00280: change 2446300 for thread 1 is in sequence #450

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00279: change 2451694 generated at 02/13/2013 16:00:25 needed for thread 1
ORA-00289: suggestion : /u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_451_8kqbnbmh_.arc
ORA-00280: change 2451694 for thread 1 is in sequence #451
ORA-00278: log file '/u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_450_8kqbn929_.arc' no longer needed for this recovery
...
 < all required logs applied >
...
ORA-00279: change 2471963 generated at 02/13/2013 16:02:19 needed for thread 1
ORA-00289: suggestion : /u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_454_%u_.arc
ORA-00280: change 2471963 for thread 1 is in sequence #454
ORA-00278: log file '/u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_453_8kqbqvrk_.arc' no longer needed for this recovery   <-- All Redo, up to and including SEQ# 453 is applied


ORA-00308: cannot open archived log '/u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_454_%u_.arc'    <<<-- "SEQ# 454" requested, which is in ONLINE REDOLOG as seen before
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3


ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/V1123/system01.dbf'

SQL> select * from v$recover_file ;

     FILE# ONLINE  ONLINE_ ERROR                                                                CHANGE# TIME
---------- ------- ------- ----------------------------------------------------------------- ---------- --------------------
         6 ONLINE  ONLINE                                                                       2471963 13-FEB-2013:16:02:19

SQL>

SQL> alter database open resetlogs ;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/app/oracle/oradata/V1123/system01.dbf'

SQL>

The following query will show you the SCN to which we must at least recover to, to get all datafiles consistent.

SQL> select  min(FHSCN) "LOW FILEHDR SCN"
           , max(FHSCN) "MAX FILEHDR SCN"
           , max(FHAFS) "Min PITR ABSSCN"
       from X$KCVFH ;

LOW FILEHDR SCN  MAX FILEHDR SCN  Min PITR ABSSCN
---------------- ---------------- ----------------
2446300          2472049          0

-- Example output explained:
--
-- "LOW FILEHDR SCN"  - this is the SCN at which recovery process starts
-- "MAX FILEHDR SCN"  - this is the SCN we must recover to to get all datafiles consistent
--
--   IF    "Min PITR ABSSCN"  != 0 AND  >  "MAX FILEHDR SCN"
--   THEN  "Min PITR ABSSCN"  is the SCN we must recover to to get all datafiles consistent

ABSSCN = Absolute SCN

Comment:

In the above output/sample we see, redo (archivelogs)  was applied and datafile 6 was rolled forward but still needs more recovery and redo to be applied.
Database Recovery did not complete, because the online 'current' redolog is not applied automatically with a 'BACKUP' controlfile.
As we use a Backup Controlfile we must 'manually' apply the online 'current' redolog '/u01/app/oracle/oradata/V1123/redo01.log' having SEQ# 454  ( SCN 2472049)  !

Additional Note:

As this is recover with a Backup Controlfile, or controlfile create from  Tracefile (sql> alter database backup to trace;) ,
query of v$log/v$logfile will possibly not give the correct information, about which logfile contains which sequence number (seq#).

# Options to find the Online log to be used

   a: Check the Alert.log file for the last sequences used with 'Online Redolog files'

   b: If Alert.log is lost you may simply try all online redolog files, if the wrong logfile is chosen nothing will be applied,
      but you will see in in the output message which sequence is in that online redolog file.
      Then simply try the next online redolog file until you get 'media recovery complete' message.

   c: You may also dump the file log file headers for Online redolog file(s)  
      Example:
      --------
      sql> alter system dump logfile '/u01/app/oracle/oradata/V1123/redo01.log' scn min 1 scn max 1 ;
  
      -- This will write a tracefile with the header dump to your 'trace' (11g) [ or udump (<=10g) ] directory
      -- Check the tracefile for similar entry like...
      ~~~
      ..
       descrip:"Thread 0001, Seq# 0000000454 ...
       ..
       Low  scn: 0x.....
       Next scn: 0x.....
      ..
      ~~~

SQL> RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL ;
.
ORA-00279: change 2471963 generated at 02/13/2013 16:02:19 needed for thread 1
ORA-00289: suggestion : /u01/app/oracle/fra/V1123/archivelog/2013_02_13/o1_mf_1_454_%u_.arc
ORA-00280: change 2471963 for thread 1 is in sequence #454


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
'/u01/app/oracle/oradata/V1123/redo01.log'                  <-- specify the online redologfile having SEQ# 454 to be manually applied
Log applied.
Media recovery complete.
SQL> alter database open resetlogs ;

Database altered.

SQL>

 Note:

If after applying all archive logs and online redo logs the database does not open
please provide the following script output to Oracle support to assist with the recovery.
( Please upload spooled file: recovery_info.txt )

SQL> set pagesize 20000
     set linesize 180
     set pause off
     set serveroutput on
     set feedback on
     set echo on
     set numformat 999999999999999

     Spool recovery_info.txt
     select substr(name, 1, 50), status from v$datafile;
     select substr(name,1,40), recover, fuzzy, checkpoint_change# from v$datafile_header;
     select GROUP#,substr(member,1,60) from v$logfile;
     select * from v$recover_file;
     select distinct status from v$backup;
     select hxfil FILENUMBER, fhsta STATUS, fhscn SCN, FHAFS ABSSCN , fhrba_Seq SEQUENCE from x$kcvfh;
     select distinct (fuzzy) from v$datafile_header;
     spool off
SQL>     exit;

+++++++++++1528788.1+++++++++++