Objective
Tuesday, March 13, 2012
Maximum number of Datafiles for an instance
Objective
Wednesday, February 23, 2011
Alternatives to Flash version of My Oracle Support
WGET shell Script for downloading patches
2. MOS (I got it right this time!) password
3. Patch file name
4. ARU Number
Using the classic patches window:
Query for the particular patch, then RIGHT CLICK on the DOWNLOAD button and click on copy shortcut in IE (or copy link location in Mozilla Firefox). This link will have both the patch file name and the ARU number.
I do understand that this is a roundabout process but I believe it is better than downloading the file to your desktop and then uploading to the server.
I am also working on a script to retrieve the aru number and the patch file name given the patch number. But I have had no success so far. If anyone has that script or any better script to download patches, please do not hesitate to share it.
WGET SCRIPT:
#!/bin/sh
# Start of user configurable variables
#
# SSO username and password
printf "\n\nEnter the SSO USERNAME for Metalink:\t"
read SSO_USERNAME
printf "\n\n\n\nEnter the SSO PASSWORD for Metalink:\t"
##SSO_PASSWORD="password"
stty -echo
read SSO_PASSWORD
stty echo
# E-Delivery token
EPD_TOKEN=
# Path to wget command
WGET=/usr/bin/wget
# Location of cookie file
COOKIE_FILE=/tmp/$$.cookies
# Log directory and file
LOGDIR=.
LOGFILE=$LOGDIR/wgetlog-`date +%d-%b-%y-%H-%M`.log
# Output directory and file
OUTPUT_DIR=.
## Added by Praveen B K, for customising the script.
printf "\n\nEnter the PATCH FILE NAME:\t"
read PATCH_FILE_NAME
printf "\n\nEnter the aru number:\t"
read ARU
#
# End of user configurable variable
#
if [ "$SSO_USERNAME " = " " ]
then
printf "\n\nSSO USERNAME cannot be null. Exiting............\n\n\n"
exit 1
fi
if [ "$SSO_PASSWORD " = " " ]
then
printf "\n\nSSO PASSWORD cannot be null. Exiting............\n\n\n"
exit 1
fi
if [ "$PATCH_FILE_NAME " = " " ]
then
printf "\n\nPATCH FILE NAME cannot be blank. Exiting............\n\n\n"
exit 1
fi
if [ "$ARU " = " " ]
then
printf "\n\naru number cannot be blank. Exiting............\n\n\n"
exit 1
fi
# Contact updates site so that we can get SSO Params for logging in
SSO_RESPONSE=$($WGET https://updates.oracle.com/Orion/Services/download 2>&1grep Location)
# Extract request parameters for SSO
SSO_TOKEN=`echo $SSO_RESPONSE cut -d '=' -f 2cut -d ' ' -f 1`
SSO_SERVER=`echo $SSO_RESPONSE cut -d ' ' -f 2cut -d 'p' -f 1,2`
SSO_AUTH_URL=sso/auth
AUTH_DATA="ssousername=$SSO_USERNAME&password=$SSO_PASSWORD&site2pstoretoken=$SSO_TOKEN"
# The following command to authenticate uses HTTPS. This will work only if the wget in the environment
# where this script will be executed was compiled with OpenSSL. Remove the --secure-protocol option
# if wget was not compiled with OpenSSL
# Depending on the preference, the other options are --secure-protocol= autoSSLv2SSLv3TLSv1
$WGET --secure-protocol=auto --post-data $AUTH_DATA --save-cookies=$COOKIE_FILE --keep-session-cookies $SSO_SERVER$SSO_AUTH_URL -O sso.out >> $LOGFILE 2>&1
rm -f sso.out
$WGET --load-cookies=$COOKIE_FILE --save-cookies=$COOKIE_FILE --keep-session-cookies "https://updates.oracle.com/Orion/Services/download/${PATCH_FILE_NAME}?aru=${ARU}&patch_file=${PATCH_FILE_NAME}" -O $OUTPUT_DIR/${PATCH_FILE_NAME} >> $LOGFILE 2>&1
# Cleanup
rm -f $COOKIE_FILE
Monday, September 6, 2010
Rebuild reporting database
In one of my previous posts, I had spoken about creating a reporting database that is editable at the same time, though the edits are transient. The last month, I faced an interesting situation wherein we had to rebuild this reporting database. In this post, I'll talk about rebuild the reporting database when it is corrupted.
Context
The standby database has been corrupted due to a server crash and needs to be rebuilt from the primary database.
Solution
I followed the steps mentioned in this post about creating a physical standby database. The steps in the pre-requisites can be skipped because they are already existing.
The rest of the steps hold good!
Creating a physical standby database
Create a standby database for the primary production database.
Pre-requisites
1. The primary database is in archive log mode.
2. Primary and standby database names:
Primary DB Name: PRIM
Primary DB Host: primary.hostname.com
Standby DB Name: STBY
Standby DB Host: standby.hostname.com
3. Initialization parameters required for enabling standby instance to be set on the primary:
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIM,STBY)'
*.LOG_ARCHIVE_DEST_2='SERVICE=STBY LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STBY'
*.log_archive_dest_state_2='ENABLE'
*.log_file_name_convert='/u001/app/oracle/stby/data/','/opt/apps/prim/data/'
*.standby_file_management='auto'
*.db_file_name_convert='/u001/app/oracle/stby/data/','/opt/apps/prim/data/'
*.fal_client='PRIM'
*.fal_server='STBY'
*.db_name='PRIM'
*.db_unique_name='PRIM'
4. The listener and tnsnames to be modified on the primary:
listener.ora on primary
# When primary becomes standby (switchover).
STBY =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= EXTPROCSTBY))
(ADDRESS= (PROTOCOL= TCP)(Host= primary.hostname.com )(Port= 1532))
)
SID_LIST_STBY =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /opt/dbms/app/oracle/product/oraprim/10.2.0)
(SID_NAME = STBY)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/dbms/app/oracle/product/oraprim/10.2.0)
(PROGRAM = extproc)
)
)
# Normal primary database listener
PRIM =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= EXTPROCPRIM))
(ADDRESS= (PROTOCOL= TCP)(Host= primary.hostname.com )(Port= 1532))
)
SID_LIST_PRIM =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /opt/dbms/app/oracle/product/oraprim/10.2.0)
(SID_NAME = PRIM)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/dbms/app/oracle/product/oraprim/10.2.0)
(PROGRAM = extproc)
)
)
tnsnames.ora on primary
STBY=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=standby.hostname.com)(PORT=1526))
(CONNECT_DATA=
(SID=STBY)
)
)
PRIM = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=primary.hostname.com)(PORT=1532))
(CONNECT_DATA=(SID=PRIM))
)
Backup tnsnames.ora on primary (for switchover)
## Create a tnsnames_ifile.ora.
STBY=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=primary.hostname.com)(PORT=1532))
(CONNECT_DATA=
(SID=STBY)
)
)
PRIM = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=standby.hostname.com)(PORT=1526))
(CONNECT_DATA=(SID=PRIM))
)
5. Create the initialization file for the standby database.
*.db_create_file_dest='/u001/app/oracle/stby/data'
*.db_file_name_convert='/opt/apps/prim/data/','/u001/app/oracle/stby/data/'
*.db_name='PRIM'
*.db_recovery_file_dest='/u001/app/oracle/stby/flashrecovery'
*.db_recovery_file_dest_size=42949672960
*.db_unique_name='STBY'
*.fal_client='STBY'
*.fal_server='PRIM'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIM,STBY)'
*.LOG_ARCHIVE_DEST_1='LOCATION=/u001/app/oracle/stby/arch/
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=STBY'
*.LOG_ARCHIVE_DEST_2='SERVICE=PRIM LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=PRIM'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.log_file_name_convert='/opt/apps/prim/data/','/u001/app/oracle/stby/data/'
*.standby_file_management='auto'
6. Create the listener.ora and the tnsnames.ora files:
listener.ora on standby
# For normal standby operations
STBY =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= EXTPROCSTBY))
(ADDRESS= (PROTOCOL= TCP)(Host= standby.hostname.com )(Port= 1526))
)
SID_LIST_STBY =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u001/app/oracle/stby/10203)
(SID_NAME = STBY)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u001/app/oracle/stby/10203)
(PROGRAM = extproc)
)
)
# For switchover (ie., when standby becomes the primary).
PRIM =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= EXTPROCPRIM))
(ADDRESS= (PROTOCOL= TCP)(Host= standby.hostname.com )(Port= 1526))
)
SID_LIST_PRIM =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u001/app/oracle/stby/10203)
(SID_NAME = PRIM)
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u001/app/oracle/stby/10203)
(PROGRAM = extproc)
)
)
tnsnames.ora for standby
STBY=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=SUOMT34L.dev.qintra.com)(PORT=1526))
(CONNECT_DATA=
(SID=STBY)
)
)
PRIM=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=primary.hostname.com)(PORT=1532))
(CONNECT_DATA=
(SID=PRIM)
)
)
Backup tnsnames.ora on standby (for switchover)
## Create a tnsnames_ifile.ora.
STBY=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=primary.hostname.com)(PORT=1532))
(CONNECT_DATA=
(SID=STBY)
)
)
PRIM = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=standby.hostname.com)(PORT=1526))
(CONNECT_DATA=(SID=PRIM))
)
Steps - using manual hotbackup
1. Generate the hot backup script on the primary database using the below sql:
set echo off heading off feedback off verify off
set pagesize 0
spool backup.sql
set linesize 80
set serveroutput on size 1000000
set linesize 150
DECLARE
cursor C_ts_name is
select tablespace_name from dba_tablespaces
order by tablespace_name;
BEGIN
for ts_name in C_ts_name loop
dbms_output.put_line('alter tablespace ' ts_name.tablespace_name
' begin backup;');
for dbf_name in (select file_name from sys.dba_data_files
where tablespace_name = ts_name.tablespace_name) loop
dbms_output.put_line(' scp -p ' dbf_name.file_name
' standby_db_owner@standby.hostname.com:/u001/app/oracle/stby/data/.');
end loop;
dbms_output.put_line('alter tablespace ' ts_name.tablespace_name
' end backup;');
end loop;
END;
/
2. Kick off the hotbackup using the script so generated, on the primary database. This script also takes care of the copying of datafiles to the standby server.
Alter database create standby controlfile as '<destination>';
Eg:
SQL> alter database create standby controlfile as '/export/home/oraprim/sb_cntrl01.dbf';
a. Its filename must be different from any other control file.
b. Must be created after the backup of the datafiles.
5. Copy the controlfile so generated from the primary to the standby. To be on the safer side, always multiplex the standby control files. So, copy the standby controlfiles as per the multiplexed order. Also ensure that the parameter control_files in the init.ora is also in sync with this.
7. Mount the standby database.
SQL> startup nomount
SQL> alter database mount standby database;
8. Recover the standby database till the latest archive log using the below command. Note that the command "alter database recover continue default" needs to be executed as many times as there are archive logs to be applied!
Now, I prefer to do an incomplete recovery till the lastest SCN. Find the scn number, using the below steps and then perform the recovery.
a. Find the latest archive log generated on the primary after the backup is done.
b. Find the next_change# from v$archived_log view:
SQL> select next_change# from v$archived_log where sequence# = &sequence#;
SQL> alter database recover standby database until change <SCN>;
SQL> alter database recover continue default;
9. After all the archives have been applied, cancel the recovery. Note that you should not receive any errors (esp. ORA-1547 errors) when you cancel the recovery.
SQL> alter database recover cancel;
10. Open the database for read only access. The temp files will be added automatically.
SQL> alter database open read only;
11. Shutdown the database and then mount the standby database.
SQL> shutdown immediate
SQL> startup nomount
SQL> alter database mount standby database;
12. Start the MRP (managed recovery process):
SQL> alter database recover managed standby database disconnect;
13. Perform log switches on the primary to test the MRP. The archives on the primary should automatically be copied over to the standby archive location and automatically be applied.
Tuesday, May 18, 2010
ORA-07445 [kopxccc()+124] error trying to submit a concurrent request
Issue
APP-FND-01564: ORACLE error 3113 in FDFDDS_RAISE_DFF_COMPILED
Mon May 17 05:54:00 2010
Completed: ALTER DATABASE OPEN
Mon May 17 05:57:12 2010
Errors in file /u005/app/oracle/cpe2eprd/cpe2eprddb/10.2.0/admin/cpe2eprd_cpeidb/udump/cpe2eprd_ora_1094.trc:
ORA-07445: exception encountered: core dump [lfilic()+328] [SIGSEGV] [Address not mapped to object] [0x000000040] [] []
Mon May 17 06:03:18 2010
Errors in file /u005/app/oracle/cpe2eprd/cpe2eprddb/10.2.0/admin/cpe2eprd_cpeidb/udump/cpe2eprd_ora_2966.trc:
ORA-07445: exception encountered: core dump [kopxccc()+124] [SIGSEGV] [Address not mapped to object] [0x000000062] [] []
Mon May 17 06:06:40 2010
Errors in file /u005/app/oracle/cpe2eprd/cpe2eprddb/10.2.0/admin/cpe2eprd_cpeidb/udump/cpe2eprd_ora_3956.trc:
ORA-07445: exception encountered: core dump [kopxccc()+124] [SIGSEGV] [Address not mapped to object] [0x000000062] [] []
Cause
Database was started with incorrect ORA_NLS10 parameter.
Analysis
As per MOS Note ID: 553264.1, ORA_NLS10 parameter should be set to $ORACLE_HOME/nls/data/9idata.
Solution
1. Shutdown the database.
2. Set the parameter ORA_NLS10 to the correct value as per MOS Note ID: 553264.1
export ORA_NLS10=$ORACLE_HOME/nls/data/9idata
3. Startup the database.
References
1. MOS Note ID: 553264.1
Wednesday, March 31, 2010
WF Mailer Error - Unable to make a connection with the user and responsibility
Receiving below error while trying to start WF Mailer:
[Mar 30, 2010 4:22:44 AM CDT]:1269940964344:Thread[BES Dispatch Thread,5,main]:0:-1:suomt32l:10.6.71.100:-1:-1:ERROR:[SVC-GSM-WFMLRSVC-801965 : oracle.apps.fnd.cp.gsc.SvcComponentContainer.handleComponentEvent(int, String, String)]:Could not start component; performing rollback -> oracle.apps.fnd.cp.gsc.SvcComponentException: Validation failed for the following parameters ->
>>>>>>>>>>>>>>{FRAMEWORK_USER=Unable to make a connection with the user and responsibility}.<<<<<<<<<<<<<<
Parameters were -> {INBOUND_MAX_IGNORE_SIZE=1000, INBOUND_MAX_LOOKUP_CACHE_SIZE=100, ATTACH_IMAGES=Y, ALLOW_FORWARDED_RESPONSE=Y, INBOUND_UNSOLICITED_THRESHOLD=2, NODENAME=WFMAIL, AUTOCLOSE_FYI=Y, INBOUND_PROTOCOL=IMAP, PROCESSOR_READ_TIMEOUT_CLOSE=Y, ATTACHED_URLS=WFMAIL:ATTACHED_URLS, TEST_ADDRESS=NONE, PROCESSOR_OUT_THREAD_COUNT=1, EXPUNGE_ON_CLOSE=Y, ATTACH_STYLESHEET=Y, OUTBOUND_CONNECTION_TIMEOUT=120, INBOUND_MAX_RET_EMAIL_SIZE=100, MAX_INVALID_ADDR_LIST_SIZE=100, PROCESSOR_MAX_LOOP_SLEEP=60, SEND_ACCESS_KEY=N, PROCESSOR_IN_THREAD_COUNT=1, FRAMEWORK_APP=1, CLOSED=WFMAIL:CLOSED, INBOUND_FETCH_SIZE=100, SUMMARY=WFMAIL:SUMMARY, ENABLE_STYLESHEET=N, PROCESSOR_ERROR_LOOP_SLEEP=60, OPEN_MAIL_FYI=WFMAIL:OPEN_MAIL_FYI, FRAMEWORK_RESP=20420, ALTERNATE_EMAIL_PARSER=oracle.apps.fnd.wf.mailer.DirectEmailParser, INBOUND_PASSWORD=_$@^@6@9^$4 `+{90_8A_%&B~+8?@9(?~(B!!~{($A?B&, HTTP_USER_AGENT=Mozilla/4.76, RESET_NLS=N, PROCESS=PROCESS, OPEN_MAIL_DIRECT=WFMAIL:OPEN_MAIL_DIRECT, PROCESSOR_LOOP_SLEEP=5, MESSAGE_FORMATTER=oracle.apps.fnd.wf.mailer.NotificationFormatter, REPLYTO=osowner@****.com, FRAMEWORK_USER=0, CANCELED=WFMAIL:CANCELED, OUTBOUND_PROTOCOL=SMTP, DISCARD=DISCARD, ACCOUNT=appltst, FROM=Workflow Mailer Oracle Development, PROCESSOR_DEFER_EVTDATA_READ=Y, WARNING=WFMAIL:WARNING, PROCESSOR_MAX_ERROR_COUNT=1000, INBOUND_CONNECTION_TIMEOUT=120, HTMLAGENT=http://****.com:8005/pls/SID, INBOX=INBOX, OPEN_INVALID_MORE_INFO=WFMAIL:OPEN_INVALID_MORE_INFO, INBOUND_SERVER=****.com, OPEN_MORE_INFO=WFMAIL:OPEN_MORE_INFO, INLINE_ATTACHMENT=N, OPEN_INVALID=WFMAIL:OPEN_INVALID, EMAIL_PARSER=oracle.apps.fnd.wf.mailer.TemplatedEmailParser, DIRECT_RESPONSE=N, OPEN_MAIL=WFMAIL:OPEN_MAIL, FRAMEWORK_URL_TIMEOUT=30, COMPONENT_LOG_LEVEL=5, SUMHTML=WFMAIL:SUMHTML, PROCESSOR_READ_TIMEOUT=10, DEBUG_MAIL_SESSION=N, OUTBOUND_SERVER=********.com}
Symptom
* Instance is cloned from Production
* Instance is using virtual hosts
Cause
Whenever, Autoconfig is run, it will set the same server ID for both virtual and Physical hosts which causes this problem.
Solution
1. Shutdown Concurrent Manager
2. Take a backup of FND_Nodes.
3. Delete Physical host from OAM (OAM > Administrator > Hosts)
4. Register same host again from OAM (or through forms).
5. Reregister the physical host for concurrent processing as below:
SQL> exec fnd_cp_fndsm.register_fndsm_fcq('
5. Start Concurrent Manager
6. Mailer was working fine after this.
Reference
Thanks to Sundeep Dubey's blog for pointing me in the right direction!