Migrate Non-ASM to ASM

Creating ASM Instance

1. Check CSS must be running before any ASM Instance
Check CSS Running or Not?
cd $ORACLE_HOME/bin
crsctl check css
2. If its not running, you should configure CSS process by running $ORACLE_HOME/bin/localconfig script:
login as a root
$ORACLE_HOME/bin/localconfig add
Sample Output:

/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.
DEV1
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)

# Default asm_diskstring values for supported platforms:
# Solaris (32/64 bit) /dev/rdsk/*
# Windows NT/XP \\.\orcldisk*
# Linux (32/64 bit) /dev/raw/*
# HPUX /dev/rdsk/*
# HPUX(Tru 64) /dev/rdisk/*
# AIX /dev/rhdisk/*

ASM_DISKSTRING=/dev/raw
INSTANCE_TYPE='ASM'
LARGE_POOL_SIZE=40M
REMOTE_LOGIN_PASSWORDFILE='EXCLUSIVE'
USER_DUMP_DEST=$ORACLE_HOME/admin/+ASM/udump
BACKGROUND_DUMP_DEST=$ORACLE_HOME/admin/+ASM/bdump
CORE_DUMP_DEST=$ORACLE_HOME/admin/+ASM/cdump


3. Create the init+ASM.ora file in $ORACLE_HOME/dbs

# Default asm_diskstring values for supported platforms:
# Solaris (32/64 bit) /dev/rdsk/*
# Windows NT/XP \\.\orcldisk*
# Linux (32/64 bit) /dev/raw/*
# HPUX /dev/rdsk/*
# HPUX(Tru 64) /dev/rdisk/*
# AIX /dev/rhdisk/*

ASM_DISKSTRING=/dev/raw
INSTANCE_TYPE='ASM'
LARGE_POOL_SIZE=40M
REMOTE_LOGIN_PASSWORDFILE='EXCLUSIVE'
USER_DUMP_DEST=$ORACLE_HOME/admin/+ASM/udump
BACKGROUND_DUMP_DEST=$ORACLE_HOME/admin/+ASM/bdump
CORE_DUMP_DEST=$ORACLE_HOME/admin/+ASM/cdump


4. Creating ADMIN directories


set ASM instance ORACLE_HOME


mkdir -p $ORACLE_HOME/admin/+ASM/bdump
mkdir -p $ORACLE_HOME/admin/+ASM/cdump
mkdir -p $ORACLE_HOME/admin/+ASM/hdump
mkdir -p $ORACLE_HOME/admin/+ASM/pfile
mkdir -p $ORACLE_HOME/admin/+ASM/udump

mkdir $ORACLE_HOME/dbs


5. Starting the ASM Instance

Starting ASM Instance

# su - oracle
$ ORACLE_SID=+ASM; export ORACLE_SID
$ sqlplus "/ as sysdba"
SQL> startup


6. Create SPFILE from PFILE


create spfile='+ASM' from pfile;


7. For Unix platform, put an entry in the oratab file for the ASM intance

ORATAB

+ASM::Y

You may get the following error on first start:

ORA-15110: no diskgroups mounted
This error can be safely ignored, when creating a new diskgroup, the diskgroup name will be
added automatically to the asm_diskgroups parameter and you will not get this error again.


Create ASM Disk group


SQL> shutdown
ASM instance shutdown
SQL> startup
ASM instance started
SQL> alter system set asm_diskstring = '/dev/raw/raw1', '/dev/raw/raw2', '/dev/raw/raw3', '/dev/raw/raw4';
System altered.

SQL> alter system set asm_diskgroups = 'DATA';
System altered.

To get started, create 2 disk groups - one for data and one for recovery files. Here is an example:

CREATE DISKGROUP data EXTERNAL REDUNDANCY DISK '/dev/d1', '/dev/d2', '/dev/d3', ....;
CREATE DISKGROUP recover EXTERNAL REDUNDANCY DISK '/dev/d10', '/dev/d11', '/dev/d12', ....;

Here is an example how you can enable automatic file management with such a setup:

ALTER SYSTEM SET db_create_file_dest = '+DATA' SCOPE=SPFILE;
ALTER SYSTEM SET db_recovery_file_dest = '+RECOVER' SCOPE=SPFILE;



Steps To Migrate/Move a Database From Non-ASM to ASM

1. Edit the pfile/spfile of DB to point the new control_file location on ASM
if your disk group name is '+DATA'
control_files='+DATA//control01.ctl'

2. Startup the database in nomount state
SQL> Startup nomount

3. From RMAN session, copy the control file from old location to new location
Restore the controlfile from old location to new location:

RMAN> CONNECT TARGET
RMAN> RESTORE CONTROLFILE FROM '/u01/TST/control01.ctl';
Here /u01/TST/control01.ctl is the old location of control file.

4. From SQL session, mount the database

SQL> ALTER DATABASE MOUNT;

5. Using RMAN, copy the datafile from NON-ASM to ASM

Copy the controlfile from Non-ASM to ASM:
RMAN>BACKUP AS COPY DATABASE FORMAT '+DATA';

run {
allocate channel dev1 type disk;
allocate channel dev2 type disk;
BACKUP AS COPY INCREMENTAL LEVEL 0 DATABASE
FORMAT '+DISK' TAG 'ORA_ASM_MIGRATION;
}

Using RMAN, rename the datafile , using the following command
Rename the datafile using the following command:

RMAN> SWITCH DATABASE TO COPY
Switch tempfile and open database.

6. Switch tempfile and open database:

RMAN> run {
set newname for tempfile 1 to '+DATA';
set newname for tempfile 2 to '+DATA';
...
switch tempfile all;
}

RMAN> ALTER DATABASE OPEN;


7. Do the following maintenance

SQL> SELECT a.group#, b.member, a.status FROM v$log a, v$logfile b WHERE a.group#=b.group#;
SQL> ALTER DATABASE ADD LOGFILE MEMBER '+ASM_Disk_group' TO GROUP 1;
SQL> ALTER DATABASE ADD LOGFILE MEMBER '+ASM_Disk_group' TO GROUP 2;
SQL> ALTER DATABASE DROP LOGFILE MEMBER '';
SQL> ALTER SYSTEM SWITCH LOGFILE;
SQL> ALTER DATABASE DROP LOGFILE MEMBER '';
SQL> ALTER SYSTEM SWITCH LOGFILE;

How to Check if a Patch requires Downtime

Solution

1. Download the particular patch file
2. Check the file ..\\etc\config\inventory
3. If the following entry is present
(instance_shutdown) true (/instance_shutdown)

then it requires downtime.

Kill Linux Process

Kill -9 `ps –u applmgr –o “pid=”`

Find Workflow Notification Mailer

SQL> SELECT email_address,name, nvl(WF_PREF.get_pref(name, 'MAILTYPE'),notification_preference)FROM wf_rolesWHERE name like upper('%xxx%');

SQL> select NOTIFICATION_ID,STATUS,MAIL_STATUS from WF_NOTIFICATIONS where TO_USER='UserName';

SQL> SELECT status,mail_status,MESSAGE_TYPE,MESSAGE_NAME,ITEM_KEY from WF_NOTIFICATIONS WHERE notification_id='2732013';

SQL> select mail_status,count(*) from WF_NOTIFICATIONS group by mail_status;


COLUMN CORRID FORMAT A55;
COLUMN STATE FORMAT A14;
SELECT CORRID,DECODE(STATE, 0, '0 = READY', 1, '1 = DELAYED', 2, '2 = PROCESSED', 3, '3 = EXCEPTION',TO_CHAR(STATE)) STATE, COUNT(*) COUNT
FROM WF_DEFERRED
GROUP BY CORRID, STATE;


SET LINES 150
COLUMN CORRID FORMAT A55;
COLUMN STATE FORMAT A14;
SELECT CORRID,DECODE(STATE, 0, '0 = READY', 1, '1 = DELAYED', 2, '2 = PROCESSED', 3, '3 =
EXCEPTION',TO_CHAR(STATE)) STATE, COUNT(*) COUNT
FROM WF_NOTIFICATION_OUT
GROUP BY CORRID, STATE;


COL COMPONENT_NAME FORMAT A60
COL COMPONENT_STATUS FORMAT A20
COL STARTUP_MODE FORMAT A20
SET LINES 120
SET PAGES 1000
SELECT COMPONENT_NAME, COMPONENT_STATUS, STARTUP_MODE FROM FND_SVC_COMPONENTS;


SET LINES 160
COL COMPONENT_NAME FORMAT A30
COL PARAMETER_NAME FORMAT A40
COL PARAMETER_VALUE FORMAT A40
SELECT A.COMPONENT_ID, A.COMPONENT_NAME, B.PARAMETER_ID, C.PARAMETER_NAME, B.PARAMETER_VALUE
FROM FND_SVC_COMPONENTS A, FND_SVC_COMP_PARAM_VALS B, FND_SVC_COMP_PARAMS_B C
WHERE A.COMPONENT_ID = B.COMPONENT_ID AND B.PARAMETER_ID = C.PARAMETER_ID
AND UPPER(A.COMPONENT_NAME) LIKE '%MAILER%'
ORDER BY A.COMPONENT_ID, A.COMPONENT_NAME, C.PARAMETER_NAME;

How to change Apps 11i form color change after cloning

To differentiate dev/test from prod, we can change the form color by changing some profile options.

Profile option change to be done:

1. Set the Java Look and Feel profile option value to oracle. If you set it to generic, it will take the default values and you wont be able to set your own color.
2. Then set Java Color Scheme profile option value to any of the LOVs as per your choice.

Remember to set this at site level

NOTE: It won't get effect immediately, you have to log out from
application and again you have to relogin to view color change effect

Rolling Oracle Clusterware Upgrade 10.2.0.3 to 10.2.0.4

1. Stop both DB nodes
2. Shut down all listeners
3. Log in as the root user Shutdown the CRS crsctl stop crs


Go to following location and check the current CRS version.
cd /CRS/app/10.2.0/bin
./crsctl query crs softwareversion
./crsctl query crs activeversion


Unzip 10.2.0.4 patchset 6810189
Run ./runInstaller

WelcomeScreen



choose the CRS_home and Click Next



selection the CRS_home will automatically select and upgrade the CRS software



Click Next


Click Next


Click Install




10.2.0.4 binaries automatically installed in all nodes. So please run the root102.sh in all the database nodes.



The following instructions are displayed on the Oracle Universal Installer screen:
To complete the installation of this patch set, perform the following tasks on each node:


Log in as the root user and enter the following command to shut down the Oracle Clusterware:
# CRS_home/bin/crsctl stop crs
Run the root102.sh script to automatically start the Oracle Clusterware on the patched node:
# CRS_home/install/root102.sh
Database Node 1



Please follow the same steps to rest of the all nodes.

The following instructions are displayed on the Oracle Universal Installer screen:
To complete the installation of this patch set, perform the following tasks on each node:

Log in as the root user and enter the following command to shut down the Oracle Clusterware:
# CRS_home/bin/crsctl stop crs
Run the root102.sh script to automatically start the Oracle Clusterware on the patched node:
# CRS_home/install/root102.sh

Database Node 2




After completing the above steps, please check the CRS version.
./crsctl query crs softwareversion
CRS software version on node [oradbtest1] is [10.2.0.4.0]
./crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.3.0]

Notifications Not Being Received After Autoconfig Is Run

SolutionTo implement the solution, please execute the following steps:

1. Log into the Oracle Applications Manager.
2. Click on Site Map.
3. Click on Notification Mailer under Workflow.
4. Click on the Edit button for the active mailer.
5. Click Next to step 3 that lists the Inbound EMail Account and Outbound EMail Account.
6. Confirm that the servers names are correct with the IMAP and SMTP servers and change as needed.
7. Click Next and then Click on Finish.
8. Stop and re-start the workflow mailer services within OAM and test.
9. If the issue is resolved, please migrate the solution as appropriate to other environments.

Permanent solutions:


Autoconfig Overwriting The SMTP Server Name For The Java Mailer


[applmgr@test]$ cat UAT_test.xmlgrep s_smtphost

hostname oa_var= s_smtphost test hostname

[applmgr@test]$ cat UAT_test.xmlgrep s_smtpdomainname

domain oa_var=s_smtpdomainname doyen.com domain

1. Update the following parameters in context file on the Concurrent Manager Application Tier node under oa_smtp_server in OAM to the correct Outbound Server Name assigned to the Workflow Mailer.

Example

SMTP Server Host (s_smtphost)
hostname oa_var= s_smtphost mailtest hostname

Email Server Domain (s_smtpdomainname)
domain oa_var=s_smtpdomainname doyen.com domain

2. The next time autoconfig runs on the node it will contain correct setting.