Install Oracle grid agent in Silent mode

1. Download Oracle gridcontrol agent software.
2. Unzip oracle_home/sysman/agent_download/11.1.0.1.0. If patch not there create new folder.
3. Rename agent_download.rsp_bkp to agent_download.rsp.
4. Edit that file and add below informations.


s_OMSHost=acdf
s_OMSPort=7799
OMS_HOST=acdf.qataridiar.com
OMS_PORT=4889
AGENT_REGISTRATION_PASSWORD=
INSTALL_UPDATES_SELECTION="skip"
ORACLE_AGENT_HOME_LOCATION=/u01/agent11g/oemhome
FROM_LOCATION=/u01/appl/oracle/PROD/db/sysman/agent_download/11.1.0.1.0/linux_x64/agent/stage/products.xml



SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=false
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=

5. Go to runinstaller path and run below .

./runInstaller -silent -responseFile /u01/app/oracle/product/11.2.0/sysman/agent_download/11.1.0.1.0/agent_download.rsp

When access custom form we got following error message "Function not available to this responsibility".



The reason for this issue is that, missing entry for CUSTOM_TOP under default.env file. In R12, CUSTOM_TOP should be defined under default.env in $INST_TOP/ora/10.1.2/forms/server directory.

After cloning or Autoconfig this issue happend. In Apps R12 undaer $INST_TOP/ora/10.1.2/forms/server/default.env is there. Just add the custom top in that file.
Other wise add the same in XML files permentally.


Solution
1. Login apps user

2. cd $INST_TOP/ora/10.1.2/forms/server directory.

3. Cofirm that your CUSTOM_TOP's are registered in the default.env file.

This means that, you should create an entry for environment variable CUSTOM_TOP (which contains physical path to your custom directory) like below in default.env file present under location $INST_TOP/ora/10.1.2/forms/server directory.

Like,
XXCUS_TOP=/u02/oracle/apps/apps_st/appl/xxcus/12.0.0
XXCONV_TOP=/u02/oracle/apps/apps_st/appl/xxconv/12.0.0

or

Add below entry in XML files, So that automatically this patch registerd to default.env.

   /u02/oracle/apps/apps_st/appl/xxcus/12.0.0
   /u02/oracle/apps/apps_st/appl/xxconv/12.0.0


4. Not required restart any services

5. Close the login page and again try.

Oracle APPS Releated Queries

AD Patches Tables

AD_APPLIED_PATCHES
AD_PATCH_DRIVERS
AD_PATCH_RUNS
AD_APPL_TOPS
AD_RELEASES
AD_FILES
AD_FILE_VERSIONS
AD_PATCH_RUN_BUGS
AD_BUGS
AD_PATCH_COMMON_ACTIONS
AD_PATCH_RUN_BUG_ACTIONS
ad_comprising_patches

FND Tables


FND_APPL_TOPS
FND_LOGINS
FND_USER
FND_DM_NODES
FND_TNS_ALIASES
FND_NODES
FND_RESPONSIBILITY
FND_DATABASES
FND_UNSUCCESSFUL_LOGINS
FND_LANGUAGES
FND_APPLICATION
FND_PROFILE_OPTION_VALUES


To know which driver patch has been applied:
select DRIVER_FILE_NAME from AD_PATCH_DRIVERS;
select DRIVER_FILE_NAME from AD_PATCH_DRIVERS where DRIVER_FILE_NAME like '%2408149%';


To check if multicurrency is present:

select MULTI_CURRENCY_FLAG from fnd_product_groups;
M
-
Y

Purging timing information for prior sessions.
sqlplus -s APPS/***** @$AD_TOP/admin/sql/adtpurge.sql 10 1000

Snapshot sql
sqlplus -s &un_apps/***** @$AD_TOP/patch/115/sql/adbkflsn.sql 111

Maintenance mode
$AD_TOP/patch/115/sql/adsetmmd.sql ENABLE
$AD_TOP/patch/115/sql/adsetmmd.sql DISABLE
select fnd_profile.value('APPS_MAINTENANCE_MODE') from dual;
FND_PROFILE.VALUE('APPS_MAINTENANCE_MODE')
--------------------------------------------------------------------------------
MAINT


to check the product is registered
select * from applsys.fnd_application where application_short_name='BNE';


adutconf.sql --- script used to generate Oracle Applications Database Configuration Report
Location : $AD_TOP/sql/adutconf.sql
Output : $AD_TOP/sql/adutconf.lst

PRODUCT VERSIONS (AD,PO,....)
select patch_level from fnd_product_installations where patch_level like '%&PRODUCT_NAME%';
select PATCH_LEVEL from fnd_product_installations where PATCH_LEVEL like '%AD%';
select PATCH_LEVEL,status from fnd_product_installations where PATCH_LEVEL like '%ICX%';

applying opatch without inventory
opatch apply -no_inventory
$ORACLE_HOME/cfgtoollogs/opatch/opatch-2009_Oct_29_22-33-37-CST_Thu.log --> opatch log location


To find opatch version:
/OPatch/
./opatch version


opatch options:

$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352164
opatch apply -local: apply patch only on local node in clusterdatabase environment
opatch apply -jdktop : if opatch could not find the path of jdk
opatch apply -no_inventory : Apply patch without updating inventory

to find the opatch that are installed
cd /OPatch/.patch_storage

OR cd /unioac/oracle/product/920/OPatch/
./opatch lsinventory
If it fails please check the path is correct in /etc/oraInst.loc or /var/opt/oracle/oraInst.loc



To know which services are running on what nodes:

select SUPPORT_CP,SUPPORT_FORMS,SUPPORT_WEB,SUPPORT_ADMIN from fnd_nodes;


To Know All the Drivers (NLS) language applied to Instance?

col PATCH_NAME format a10
col PATCH_TYPE format a10
col DRIVER_FILE_NAME format a15
col PLATFORM format a10
select AP.PATCH_NAME, AP.PATCH_TYPE, AD.DRIVER_FILE_NAME, AD.CREATION_DATE, AD.PLATFORM,AL.LANGUAGE
from AD_APPLIED_PATCHES AP, AD_PATCH_DRIVERS AD, AD_PATCH_DRIVER_LANGS AL
where AP.APPLIED_PATCH_ID = AD.APPLIED_PATCH_ID
and AD.PATCH_DRIVER_ID = AL.PATCH_DRIVER_ID
and AP.PATCH_NAME = '&No';"

select aap.patch_name,count(*) from AD_patch_driver_langs apdl, ad_applied_patches aap, AD_PATCH_DRIVERS apd
where apdl.patch_driver_id=apd.patch_driver_id and
aap.applied_patch_id=apd.applied_patch_id and
apdl.language <>'US'
group by aap.patch_name
having count(*) > 0 and count(*)<10 -- Changed from 9 to 10
order by patch_name"

To see NLS patches applied:

select language,driver_file_name from AD_PATCH_DRIVERS adp,AD_PATCH_DRIVER_LANGS adpl where adp.patch_driver_id = adpl.patch_driver_id
and driver_file_name like '%&a%' order by 1;

Script for Patch Log Analysis :

@$AD_TOP/patch/115/sql/adphrept.sql 1 ALL ALL 03/01/2004 07/05/2004 ALL ALL ALL ALL ALL N N N N N sample.txt


To knowd all the patdhes applied from 01-Sep-2005 to 28-Jan-2006. i.e b/w 2 dates use
$AD_TOP/patch/115/sql/adpchlst.sql

To check to make sure the correct data was installed run the following script this script can also be used to check if data installer was run successfully:

select application_short_name, Legislation_code, status, action, last_update_date
from hr_legislation_installations
where application_short_name in ('PER','PAY');

To check if DB version is 32 or 64 bit:

a.) conn to sqlplus if it is 64 ,then will show
b.)select address from v$sql where rownum<2;
c.)go to ORACLE_HOME/bin
do a file oracle.

Commands useful during Patch analysis

select bug_number from ad_bugs where bug_number='&t';
select to_char(CREATION_DATE,'dd-mon-yyyy hh24:mi:ss') from ad_bugs where bug_number=’&t’;
select to_char(LAST_UPDATE_DATE,'dd-mon-yyyy hh24:mi:ss')from ad_bugs where bug_number='&t’;
select patch_level from fnd_product_installations where patch_level like '&p';
select release_name from fnd_product_groups;
select DRIVER_FILE_NAME from ad_patch_drivers where DRIVER_FILE_NAME like '%3117672%';


For querying the MERGED PATCHES you can use the following script which will show which merged patches are applied for which language

select a.PATCH_DRIVER_ID,DRIVER_FILE_NAME,c.bug_id,d.language
from ad_patch_drivers a,AD_COMPRISING_PATCHES b, ad_bugs
c,AD_PATCH_DRIVER_LANGS d
where c.bug_number = '&no'
and c.bug_id = b.bug_id
and a.PATCH_DRIVER_ID = b.patch_driver_id
and a.patch_driver_id = d.patch_driver_id;

we can querry the ad_bugs for the US language version patches



To check if specific bug fix is applied, you need to query the AD_BUGS table only. This table contains all patches and all superseded patches ever applied:


select ab.bug_number, ab.creation_date
from ad_bugs ab
where ab.bug_number = '&BugNumber';

Retrieve basic information regarding patch applied, useful when you need to know when and where (node) you applied specific patch:
select aap.patch_name, aat.name, apr.end_date
from ad_applied_patches aap,
ad_patch_drivers apd,
ad_patch_runs apr,
ad_appl_tops aat
where aap.applied_patch_id = apd.applied_patch_id
and apd.patch_driver_id = apr.patch_driver_id
and aat.appl_top_id = apr.appl_top_id
and aap.patch_name = '&PatchName';

Run the following query, it will show you all modules affected by specific patch in one click :

select distinct aprb.application_short_name as "Affected Modules"
from ad_applied_patches aap,
ad_patch_drivers apd,
ad_patch_runs apr,
ad_patch_run_bugs aprb
where aap.applied_patch_id = apd.applied_patch_id
and apd.patch_driver_id = apr.patch_driver_id
and apr.patch_run_id = aprb.patch_run_id
and aprb.applied_flag = 'Y'
and aap.patch_name = '&PatchName';

One of the ways to find out the exact patchset that was applied to your database successfully, is you can query from props$ table. This table is owner by sys. Logon as system or sys and select from props$ table. This table has fields like name, values and comments. The name columne NLS_RDBMS_VERSION has the value equilent to the patchset applied to that database.

SQL> select name, value$ from props$;
NAME VALUE$
NLS_RDBMS_VERSION 7.3.4.3.1

Query to find languages installed or not:


Select distinct NLS_LANGUAGE, LANGUAGE_CODE,NLS_TERRITORY,INSTALLED_FLAG
from fnd_languages
where INSTALLED_FLAG = 'I' or INSTALLED_FLAG = 'B'
ORDER BY NLS_LANGUAGE

Select distinct NLS_LANGUAGE, LANGUAGE_CODE,NLS_TERRITORY,INSTALLED_FLAG
from fnd_languages
ORDER BY NLS_LANGUAGE


To find localization patches are applied.select * from jai_applied_patches where patch_number = 123456;

How to check whether the product is install,shared and Not installed in Apps.

select t.application_name
, t.application_id
, i.patch_level
, decode(i.status,’I',’Fully Installed’,
‘N’,'Not Installed’,'S’,'Shared’,'Undetermined’) status
from fnd_product_installations i
, fnd_application_vl t
where i.application_id = t.application_id
order by t.application_id;


/* To find the latest application version */

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE updated,ROW_SOURCE_COMMENTS "how it is done", BASE_RELEASE_FLAG "Base version" FROM AD_RELEASES where END_DATE_ACTIVE IS NULL


/* to find the base application version */

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, ROW_SOURCE_COMMENTS "how it is done" from AD_RELEASES where BASE_RELEASE_FLAG = 'Y'


/* To find all available application version */

select ARU_RELEASE_NAME||'.'||MINOR_VERSION||'.'||TAPE_VERSION version, START_DATE_ACTIVE when updated, END_DATE_ACTIVE "when lasted", CASE WHEN BASE_RELEASE_FLAG = 'Y' Then 'BASE VERSION' ELSE 'Upgrade' END "BASE/UPGRADE", ROW_SOURCE_COMMENTS "how it is done" from AD_RELEASES

Managing an Automatic Storage Management Instance:

Managing an Automatic Storage Management Instance:
Startup and shutdown ASM Instance:

Starting Up ASM Instance:

An ASM instance is managed in much the same way as a database instance, with a few exceptions. The major difference is that an ASM instance is never opened like a regular Oracle instance is opened, only mounted; therefore, we can issue the STARTUP NOMOUNT; command to start just the ASM instance's memory processes, and then finish mounting the database with the ALTER DATABASE MOUNT; command. We can also open the ASM instance immediately by issuing the STARTUP MOUNT; command

$> export ORACLE_SID=+ASM
$> sqlplus "sys as sysdba"
SQL*Plus: Release 10.1.0.2.0 - Production on Tue Dec 13 16:58:17 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to an idle instance.

SQL> startup mount;
ASM instance started
Total System Global Area 100663296 bytes
Fixed Size 787648 bytes
Variable Size 99875648 bytes
Database Buffers 0 bytes
Redo Buffers 0 bytes
ASM diskgroups mounted.

Shutdown ASM Instance:

To shut down this ASM instance, Set the ORACLE_SID environment variable and then simply issue the SHUTDOWN IMMEDIATE; command:
$> export ORACLE_SID=+ASM
$> sqlplus "sys as sysdba"
SQL> Connected.
SQL> shutdown immediate;
ASM diskgroups dismounted
ASM instance shutdown
SQL>

Implications of Shutting Down an Active ASM Instance: When an ASM instance is shut down, it is important to be aware of the implications for any regular Oracle database instance that is using ASM files stored on that ASM instance. The ASM files will not be accessible to those regular Oracle databases until the ASM instance is restarted.

Create Disk Group:
NORMAL REDUNDANCY: (Two – Way Mirroring)
create diskgroup +DATA normal redundancy
2 failgroup f1 disk '/dev/raw/raw5' name disk5
3 failgroup f2 disk '/dev/raw/raw6' name disk6;
HIGH REDUNDANCY: (Three – Way Mirroring)
create diskgroup +DATA normal redundancy
2 failgroup f1 disk '/dev/raw/raw5' name disk5
3 failgroup f2 disk '/dev/raw/raw6' name disk6;
4 failgroup f2 disk '/dev/raw/raw6' name disk7;

EXTERNAL REDUNDANCY: (If we want no mirroring by ASM)
CREATE DISKGROUP +DATA EXTERNAL REDUNDANCY DISK '/dev/raw/raw1','/dev/raw/raw2';

Adding Disks into Disk Group:

alter diskgroup +DATA add disk '/dev/raw/raw7' name disk7;

Dropping Disk

alter diskgroup +DATA drop disk disk7;
Note:
When we drop the last disk from the FAILGROUPS, the FAILGROUP automatically drops.

Resize Disk Group:

alter diskgroup +DATA resize disk raw5 size 800M;
Mounting and Dismounting Disk Groups
Disk groups that are specified in the ASM_DISKGROUPS initialization parameter are mounted automatically at ASM instance startup. We can do this manually using below.

Mounting Disk Group:

ALTER DISKGROUP +DATA MOUNT;

Dismounting Disk Group:

ALTER DISKGROUP +DATA DISMOUNT;


Create Tablespace with ASM:
Create tablespace TBS_NAME datafile ‘+DATA’ Size 1024m;

Viewing ASM Instance Information Via SQL Queries:

There are several dynamic and data dictionary views available to view an ASM configuration from within the ASM instance itself:

V$ASM_ALIAS - Shows every alias for every disk group mounted by the ASM instance
V$ASM_CLIENT - Shows which database instance(s) are using any ASM disk groups that are being mounted by this ASM instance
V$ASM_DISK - Lists each disk discovered by the ASM instance, including disks that are not part of any ASM disk group
V$ASM_DISKGROUP - Describes information about ASM disk groups mounted by the ASM instance
V$ASM_FILE - Lists each ASM file in every ASM disk group mounted by the ASM instance
V$ASM_OPERATION - Like its counterpart, V$SESSION_LONGOPS, it shows each long-running ASM operation in the ASM instance
V$ASM_TEMPLATE - Lists each template present in every ASM disk group mounted by the ASM instance

We can also able to query the following dynamic views against database instance to view the related ASM storage components of that instance:

V$ASM_DISKGROUP - Shows one row per each ASM disk group that's mounted by the local ASM instance
V$ASM_DISK - Displays one row per each disk in each ASM disk group that are in use by the database instance
V$ASM_CLIENT - Lists one row per each ASM instance for which the database instance has any open ASM files


The benefits of ASM:
• Provides automatic load balancing over all the available disks, thus reducing hot spots in the file system
• Prevents fragmentation of disks, so you don't need to manually relocate data to tune I/O performance
• Adding disks is straight forward - ASM automatically performs online disk reorganization when you add or remove storage
• Uses redundancy features available in intelligent storage arrays
• The storage system can store all types of database files
• Using disk group makes configuration easier, as files are placed into disk groups
• ASM provides stripping and mirroring
• ASM and non-ASM oracle files can coexist

ASM Operations

ASM Operations

1. Instance name
select instance_name from v$instance;

2. Create disk group

create diskgroup +DATA normal redundancy
2 failgroup f1 disk '/dev/raw/raw5' name disk5
3 failgroup f2 disk '/dev/raw/raw6' name disk6;
4 failgroup f2 disk '/dev/raw/raw6' name disk7;
CREATE DISKGROUP +DATA EXTERNAL REDUNDANCY DISK '/dev/raw/raw1','/dev/raw/raw2';
Note: force is used if disk has been in a previous diskgroup, external redundancy uses third party mirroring i.e SAN

3. Add disks to a group alter diskgroup +DATA add disk

'/dev/raw/raw7' name disk7;
/dev/raw/raw8' name disk8;

4. Remove disks from a group

alter diskgroup diskgrpA drop disk disk6;

5. Remove disk group

drop diskgroup diskgrpA including contents

6. Resizing disk group

alter diskgroup diskgrpA resize disk 'disk3' size 500M;

7. Undo remove disk group

alter database diskgrpA undrop disks;

8. Display diskgroup info
select name, group_number, name, type, state, total_mb, free_mb from v$asm_diskgroup;
select group_number, disk_number, name, failgroup, create_date, path, total_mb from v$asm_disk;
select group_number, operation, state, power, actual, sofar, est_work, est_rate, est_minutes from v$asm_operation;

9. Rebalance a diskgroup
(after disk failure and disk has been replaced)
alter diskgroup diskgrpA rebalance power 8;
Note: to speed up rebalancing increase the level upto 11, remember that this will also decrease performance, you can also use the wait parameter this will hold the commandline until it is finished.

10. Dismount or mount a diskgroup
alter diskgroup diskgrpA dismount;
alter diskgroup diskgrpA mount;

11. Check a diskgroups integrity
alter diskgroup diskgrpA check all;

12. Diskgroup Directory
alter diskgroup diskgrpA add directory '+diskgrpA/dir1'
Note: this is required if you use aliases when creating databse files
i.e '+diskgrpA/dir/control_file1'

13. Adding and drop aliases

alter diskgroup diskgrpA add alias '+diskgrpA/dir/second.dbf' for '+diskgrpB/datafile/table.763.1';
alter diskgroup diskgrpA drop alias '+diskgrpA/dir/second.dbf'

14. Drop files from a diskgroup
alter diskgroup diskgrpA drop file '+diskgrpA/payroll/payroll.dbf';

15. Using ASM Disks
Examples of using ASM disks
create tablespace test datafile ‘+diskgrpA’ size 100m;
alter tablespace test add datafile ‘+diskgrpA’ size 100m;
alter database add logfile group 4 ‘+dg_log1’,’+dg_log2’ size 100m;
alter system set log_archive_dest_1=’location=+dg_arch1’;
alter system set db_recovery_file_dest=’+dg_flash’;

16. Display performance.
select path, reads, writes, read_time, write_time,
read_time/decode(reads,0,1,reads) "AVGRDTIME",
write_time/decode(writes,0,1,writes) "AVGWRTIME"
from v$asm_disk_stat;

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.