Monday, December 21, 2015

Usage of FNDCPASS utility

Prerequisite

Oracle Applications system should be shut down before changing any schema passwords. Also FND_USER and FND_ORACLE_USERID tables should be backed up before changing any passwords.
FNDCPASS <apps username>/<apps password> 0 Y <system username>/<system password> <token> <username> <new_password>  

=>The SYSTEM token is used when changing the APPLSYS password.
=>The ORACLE token is used when changing a Single Applications schema password.
=>The ALLORACLE token is used when changing All Applications schema passwords.
=>The USER token is used when changing an Applications User password.


Following are the different usage of FNDCPASS utility

1. Change Apps and Applsys schema password

Token=SYSTEM
FNDCPASS apps/<APPS password> 0 Y system/<SYSTEM password> SYSTEM APPLSYS <new_password>

2. Change an Oracle Registered Application schema password (Other than Apps and Applsys)
Token=ORACLE
FNDCPASS apps/<APPS password> 0 Y system/<SYSTEM password> ORACLE GL <new_password>

3. Change All Oracle Registered Application schema password (Other than Apps and Applsys)
Token=ALLORACLE
FNDCPASS apps/<APPS password> 0 Y system/<SYSTEM password> ALLORACLE <new_password>

4. Change an All Oracle Applications user password
Token=USER
FNDCPASS apps/<APPS password> 0 Y system/<SYSTEM password> USER SYSADMIN <new_password>

Reference
How to Change Applications Passwords using Applications Schema Password Change Utility (FNDCPASS or AFPASSWD) (Doc ID 437260.1)

Wednesday, November 18, 2015

ORA-20008 ORA-6512 ADOP patching issue on 12.2

Problem

When prepare phase following error occur
adop phase=prepare

ERROR at line 1:

ORA-20008: No Concurrent Manager is defined that can run concurrent program
ADZDPATCH
ORA-6512: at "APPS.AD_ZD_ADOP", line 240

Solution

Execute below command to overcome the issue
FNDLOAD apps/<apps_pw> 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct $AD_TOP/patch/115/import/US/adzdpatch.ldt - CUSTOM_MODE=FORCE

Tuesday, November 17, 2015

SQL Script for find Application Short Name of Oracle R12 Modules

The Following Query List all the EBS Application name with short name
SELECT fat.application_name        "Application Name",
       fa.application_short_name   "Short Name"
 FROM fnd_application     fa,
       fnd_application_tl  fat
 WHERE fa.application_id = fat.application_id
   AND fat.language      = USERENV('LANG')
 ORDER BY fa.application_short_name;

Application Name Short Name
Activity Based Management (Obsolete) ABM
Applications DBA AD
Applications Demonstration Services ADS
ADS Development ADS_DEV
Complex Maintenance Repair and Overhaul AHL
Hosting Manager(Obsolete) AHM
Common Modules-AK AK
Alert ALR
Approvals Management AME
Fulfillment Services (Obsolete) AMF
Marketing AMS
Marketing Encyclopedia System AMV
Internal Controls Manager AMW
Sales Analysis AN
Receivables AR
Sales Foundation AS
Sales Online ASF
CRM Gateway for Mobile Devices ASG
Sales Offline ASL
Sales ASN
Order Capture ASO
Oracle Sales for Handhelds ASP
TeleSales AST
Application Utilities AU
Global Accounting Engine AX
Application Implementation AZ
Banking BANKING
Advanced Benefits BEN
Customer Intelligence (obsolete) BIC
eCommerce Intelligence BIE
Sales Intelligence BIL
Marketing Intelligence BIM
Communications Intelligence BIN
Applications BIS BIS
Service Intelligence BIV
Interaction Center Intelligence BIX
Systems Intelligence BIY
Utility Billing BLC
Web Applications Desktop Integrator BNE
Bills of Material BOM
Balanced Scorecard BSC
Telephony Manager CCT
Oracle Clinical Data Repository CDR
Cash Management CE
Supplier Scheduling CHV
APAC Consulting Localizations CLA
EMEA Consulting Localizations CLE
Japan Consulting Localizations CLJ
LAD Consulting Localizations CLL
Supply Chain Trading Connector for RosettaNet CLN
Culinary Application CLR
Incentive Compensation CN
Core Banking COREBANK
CPG – CDOA CPGC
Capacity CRP
Service CS
Customer Care CSC
Depot Repair CSD
Asset Tracking CSE
Field Service CSF
Install Base CSI
Field Service/Laptop CSL
Field Service/Palm CSM
Call Center CSN
Spares Management CSP
Scheduler CSR
Support (obsolete) CSS
Cost Management CST
Clinical Transaction Base CTB
Capital Resource Logistics – Assets CUA
Revenue Accounting CUC
Billing Connect (obsolete) CUE
Capital Resource Logistics – Financials CUF
Citizen Interaction Center CUG
Network Logistics – Inventory CUI
Network Logistics – NATS (obsolete) CUN
Network Logistics – Purchasing CUP
Mass Market Receivables for Comms CUR
Network Logistics CUS
Custom Development CUSTOM
Configurator CZ
CADView-3D DDD
Demand Signal Repository DDR
Demo Order Entry (AOL Class) DEM
Development DNA
Document Managment and Collaboration DOM
Oracle Price Protection DPP
DateTrack DT
Obsolete Process Operations DUMMY_GMO
SEM Exchange (obsolete) EAA
Enterprise Asset Management EAM
e-Commerce Gateway EC
XML Gateway ECX
E-Records EDR
Advanced Product Catalog EGO
Environment Management System EMS
Engineering ENG
Product Intelligence ENI
Value Based Management EVM
Enterprise Performance Foundation FEM
FastFormula FF
Financial Intelligence FII
Flow Manufacturing FLM
Application Object Library FND
Project Portfolio Analysis FPA
Banking Center (obsolete) FPT
Report Manager FRM
Transportation Execution FTE
Transfer Pricing FTP
Financials Common Modules FUN
Federal Financials FV
Financial Consolidation Hub GCS
US Federal Human Resources GHR
Process Manufacturing Systems GMA
Process Manufacturing Product Development GMD
Process Manufacturing Process Execution GME
Process Manufacturing Financials GMF
Process Manufacturing Inventory GMI
Process Manufacturing Logistics GML
Manufacturing Execution System for Process Manufacturing GMO
Process Manufacturing Process Planning GMP
Grants Accounting GMS
Process Manufacturing Portal GMW
Genealogy Intelligence GNI
Process Manufacturing Regulatory Management GR
Healthcare HCA
iHCConnect HCC
iHCIntegrate HCN
Healthcare Intelligence HCP
Healthcare Terminology Server HCT
Human Resources Intelligence HRI
Time and Labor Engine HXC
Time and Labor HXT
iAssets IA
Digital Asset Management IAM
iMarketing (Obsolete) IBA
Content Manager IBC
iStore IBE
Bill Presentment & Payment IBP
iAuction IBT
iSupport IBU
Oracle Web Analytics IBW
Payments IBY
Oracle iProcurement ICX
Interaction Blending IEB
Advanced Outbound Telephony IEC
Email Center IEM
Interaction Center Technology IEO
Predictive IEP
Scripting IES
Call Center Connectors IET
Universal Work Queue IEU
IVR Integrator IEV
Collections IEX
Contract Commitment IGC
Financial Aid IGF
Public Sector Financials International IGI
Student System IGS
Grants Proposal IGW
Customers Online IMC
iMeeting (obsolete) IMT
Oracle Landed Cost Management INL
Institutional Banking INSTITBANK
Inventory INV
Capital Resource Logistics – Projects IPA
Product Development (obsolete) IPD
Oracle Imaging Process Management IPM
iRecruitment IRC
Supply Chain Intelligence ISC
iSettlement ISX
Information Technology Audit ITA
Internet Procurement Enterprise Connector ITG
Oracle E-Business Suite Diagnostics IZU
Asia/Pacific Localizations JA
European Localizations JE
Regional Localizations JG
Latin America Localizations JL
Supply Chain Localizations JMF
CRM Foundation JTF
Mobile Application Foundation JTM
CRM Self Service Administration JTS
Loans LNS
Controlled Availability Product(Obsolete) ME
Manufacturing MFG
Mobile Applications for Inventory Management MIA
Media Interactive MIV
Mobile Quality Applications MQA
Master Scheduling/MRP MRP
Advanced Supply Chain Planning MSC
Demand Planning MSD
Constraint Based Optimization MSO
Inventory Optimization MSR
Transportation Planning MST
Oracle Manufacturing Operations Center MTH
Mobile Applications MWA
Oracle Applications Manager OAM
Data Query ODQ
Order Entry OE
Assets OFA
Contracts for Subscriptions (Obsolete) OKB
Contracts Core OKC
Project Contracts OKE
Contracts Intelligence OKI
Lease and Finance Management OKL
Contracts for Sales (Obsolete) OKO
Contracts for Procurement (Obsolete) OKP
Contracts for Rights (Obsolete) OKR
Service Contracts OKS
Royalty Management OKT
Contracts Integration OKX
Order Management ONT
Operations Intelligence OPI
Learning Management OTA
University Curriculum OUC
Trade Management OZF
Trade Planning (Obsolete) OZP
iClaims (Obsolete) OZS
Projects PA
Payroll PAY
Budgeting and Planning PBR
Human Resources PER
Oracle Profitability Manager PFT
Project Intelligence PJI
Project Manufacturing PJM
Process Manufacturing Intelligence PMI
Property Manager PN
Purchasing PO
Purchasing Intelligence POA
Exchange POM
Sourcing PON
iSupplier Portal POS
Public Sector HR PQH
Public Sector Payroll PQP
Progress Custom PRGC
Proposals PRP
Public Sector Financials PSA
Public Sector Budgeting PSB
Labor Distribution PSP
Public Sector Receivables PSR
Patch Tracking System PTX
Partner Management PV
Quality QA
Quoting QOT
Advanced Pricing QP
Oracle Deal Management QPR
Risk Management QRM
Regulatory Capital Manager (obsolete) RCM
Application Report Generator RG
Advanced Planning Foundation(obsolete) RHX
Release Management Integration Kit (Obsolete) RLA
Release Management RLM
Risk Manager RMG
Retail Core RRC
Site Management RRS
Applications Shared Technology SHT
Payables SQLAP
General Ledger SQLGL
SSP SSP
System Administration SYSADMIN
test TEST
Automotive VEA
Automotive Integration Kit (Obsolete) VEH
Work in Process WIP
Manufacturing Mobile Applications WMA
Warehouse Management WMS
Manufacturing Scheduling WPS
Shipping Execution WSH
Shop Floor Management WSM
XML Publisher XDO
Provisioning XDP
Subledger Accounting XLA
Legal Entity Configurator XLE
Service Assurance for Communications XNA
Oracle Telecommunications Billing Integrator XNB
Sales for Communications (Obsolete) XNC
Install Base Intelligence (Obsolete) XNI
Marketing for Communications (Obsolete) XNM
Number Portability XNP
Service for Communications (obsolete) XNS
TeleBusiness for Telecom/Utilities XNT
Treasury XTR
Financial Analyzer ZFA
Enterprise Planning and Budgeting ZPB
Sales Analyzer ZSA
E-Business Tax ZX

Tuesday, November 3, 2015

Start and stop Mobile Web Application (MWA) services in R12


Start MWA Services
Login from Application binary owner
$ . <APPL_TOP>/APPS<CONTEXT_NAME>.env
$ cd $ADMIN_SCRIPT_HOME
$ ./mwactl.sh -login apps/<apps_pwd> start
OR
$ ./mwactlwrpr.sh start apps/<apps_pwd>

Stop MWA Services
Login from Application binary owner
$ . <APPL_TOP>/APPS<CONTEXT_NAME>.env
$ cd $ADMIN_SCRIPT_HOME
$ ./mwactl.sh -login apps/<apps_pwd> stop
OR
$ ./mwactlwrpr.sh stop apps/<apps_pwd>

Check Whether MWA Services are running
$ ps -ef |grep mwa

Find out port number of MWA services
Login from Application binary owner
$ . <APPL_TOP>/APPS<CONTEXT_NAME>.env
$ grep mwa $CONTEXT_FILE

Saturday, October 17, 2015

Oracle Apps R12.2 Online patching


For 12.2 patching have to use 'ADOP' utility instead of 'ADADMIN'.
'ADOP' is the new ad utility given by Oracle for patching the Oracle Apps R12.2 environments.

Application tier technology patches are applied to the patch file system and the changes are propagated to the run file system as part of an Online Patching cycle

Steps for Online patching

1. Download any required technology patches and unzip them into the $NE_BASE/EBSapps/patch directory.

2. Prepare for patching
$ . <EBS_ROOT>/EBSapps.env
$ adop phase=prepare
3. Apply Technology patches
$ adop phase=apply patches=<patch number>
4. Finalize patch application
$ adop phase=finalize
5. Perform cutover
$ adop phase=cutover
6. Cleanup obsolete objects
$ . <EBS_ROOT>/EBSapps.env run
$ adop phase=cleanup
7. Synchronize the technology level between patch and run file systems
$ adop phase=fs_clone

Online Patching Cycle

Reference : Oracle E-Business Suite 12.2 Patching Technology Components Guide (Doc ID 1355068.1)

Tuesday, October 13, 2015

Step by Step Cloning - R12.2

DB Tier Cloning

1. Prepare source node for cloning
cd /u01/PROD/fs1/inst/apps/PROD_oracle/admin/scripts
perl adpreclone.pl appsTier
cd /u01/PROD/db/11.2.0/appsutil/scripts/PROD_oracle
perl adpreclone.pl dbTier
2. Shutdown Application and DB
cd /u01/PROD/fs1/inst/apps/PROD_oracle/admin/scripts
./adstpall.sh 
sqlplus / as sysdba
shutdown immediate; 
3. Copy db directory from source to target
scp -r /u01/PROD/db <targetIP>:/u01/DEV/
4. Set permission for db filesystem
chmod -R 775 /u01/DEV/db
chown -R oracle:dba u01/DEV/db
5. Switch user who own the db binary file system
su - oracle
6. Configure target DB Tier
cd /u01/DEV/db/11.2.0/appsutil/clone/bin
perl adcfgclone.pl dbTier

Apps Tier Cloning



1. Create following directories on target host
mkdir /u01/DEV/fs1 -p
mkdir /u01/DEV/fs2 -p
mkdir /u01/DEV/fs_ne -p
2. Copy EBSapps directory from source to target (no need to copy FMW_Home and inst Directories)
scp -r /u01/PROD/fs1/EBSapps <targetIP>:/u01/DEV/fs1
3. Set permission for Apps file system
chmod -R 775 /u01/DEV/fs1
chown -R oracle:dba u01/DEV/fs1
4. Switch user who own the db binary file system
su - oracle
5. Configure target run file system
cd /u01/DEV/fs1/EBSapps/comn/clone/bin
perl adcfgclone.pl appsTier
6. After startup target application server, prepare system for patch file system
cd /u01/DEV/fs1/inst/apps/PROD_oracle/admin/scripts
perl adpreclone.pl appsTier
7. Shutdown application Server
cd /u01/DEV/fs1/inst/apps/PROD_oracle/admin/scripts
./adstpall.sh
8. Copy EBSapps directory from run file system to patch file system on target host
cp -r /u01/DEV/fs1/EBSapps /u01/DEV/fs2
9. Configure target patch file system
cd /u01/DEV/fs2/EBSapps/comn/clone/bin
perl adcfgclone.pl appsTier
10. If all goes well, then start application Server
cd /u01/DEV/fs1/inst/apps/PROD_oracle/admin/scripts
./adstrtal.sh

Wednesday, October 7, 2015

'Host key verification failed' Error when scp from one host to another in linux


Problem

When Try to copy file from one host to another below error occur
[root@backup u01]# scp -r RPM_oel6/ 192.168.22.4:/u01
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
ea:d6:b9:ac:45:e5:4a:46:ff:71:0b:84:a6:24:de:b2.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:2
RSA host key for 192.168.22.4 has changed and you have requested strict checking.
Host key verification failed.
lost connection

Solution

Please execute below command and copy again to overcome the issue
sed -i '2d' /root/.ssh/known_hosts 
Where '2d' is line number. If the line number is different then use the same

Thursday, July 16, 2015

Mount NTFS file system on Linux

Below are the steps to mount ntfs file system on linux OS

1. Download fuse RPM from below link and Install
http://www.atrpms.net/dist/el5/fuse/
$ rpm -Uvh --nodeps --force fuse-2.7.4-8_12.el5.x86_64.rpm
$ rpm -Uvh --nodeps --force fuse-kmdl-2.6.18-371.el5xen-2.7.4-8_12.el5.x86_64.rpm
$ rpm -Uvh --nodeps --force fuse-libs-2.7.4-8_12.el5.x86_64.rpm

2. Download fuse-ntfs RPM from below link and Install
http://dag.wieers.com/rpm/packages/fuse-ntfs-3g/
$ rpm -Uvh --nodeps --force fuse-ntfs-3g-1.417-1.el4.rf.x86_64.rpm

3. Mount the HD
$ mount.ntfs-3g /dev/sdb1 /media/disk1 -o force

Tuesday, July 14, 2015

Change sysman Password on 12c EM

Can not Change sysman password through sqlplus when running on Enterprise Manager. Have to use emctl to change sysman because this is used by oms. Please follow below steps to change the password

1. Stop oms
$ export OMS_HOME=/u01/app/oracle/oms12cr3/oms
$ cd $OMS_HOME/bin
$ ./emctl stop oms
do not use -all as admin server need to be up for change password 2. Modify sysman password
$ cd $OMS_HOME/bin
$ emctl config oms -change_repos_pwd -use_sys_pwd -sys_pwd <'sys password'> -new_pwd <'new sysman password'>
2. Restart all oms including Admin server
$ cd $OMS_HOME/bin
$ ./emctl stop oms -all
$ ./emctl start oms

Thursday, June 25, 2015

Add Swap Space on Linux

Find current swap space on the system
# free -m
           total   used    free   shared   buffers  cached
Mem:       16051   15570    481      0       707     12644
-/+ buffers/cache: 2218    13833
Swap:      8189     0      8189

Or

# swapon -s
Filename         Type        Size    Used    Priority
/dev/sda2      partition   8385920    88       -1

 Or

# cat /proc/swaps
Filename         Type        Size    Used    Priority
/dev/sda2      partition   8385920    88       -1

Method 1 - Use Hard Drive Partition

If you have additional hard disk or space available in existing disk then create partition using fdisk command. Assume /dev/sdc1 is newly created partition 

Setup newly created partition as swap area
# mkswap /dev/sdc1
Enable swap partition
# swapon /dev/sdc1
Add following line to /etc/fstab to available even after reboot
# cat /etc/fstab
/dev/sdc1        swap         swap    defaults        0 0
Verify whether newly created swap space is available
# swapon -s
Filename         Type       Size     Used    Priority
/dev/sda2      partition   8385920    88       -1
/dev/sdc1      partition  10234430     0       -2

Method 2 - Use a file for Additional swap space

If you does not have any additional disk then you can create a file on your system and use that for swap space

Create the swap file called 'myswap' using following command (file size in bytes=bs*count)
# dd if=/dev/zero of=/root/myswap bs=1M count=2048
Change the permission of newly created file
# chmod 755 /root/myswap
Make this file as a swap file
# mkswap /root/myswap
Add following line to /etc/fstab to available even after reboot
# cat /etc/fstab
/root/myswap        swap         swap    defaults        0 0
Verify whether newly created swap space is available
# swapon -s
Filename         Type       Size     Used    Priority
/dev/sda2      partition   8385920    88       -1
/root/myswap     file      2097152     0       -2

Tuesday, June 23, 2015

Deploy 12c Management Agent

Here explain how to add target hosts to enterprise manager

Login to Enterprise Manager via Sysman login
Go to Setup->Add Target->Add Targets Manually


 Select Add Host Targets and Click Add Host Button

Click on Add Button and Add the target host name which need to deploy agent and Click on Next Button

Provide Installation Base Directory and Instance directory on target host

Review the Host Information and click on Deploy Agent button to begin the installation

Now Management Agent will deploy on target host

Ignore the Privileges warning and click on Continue->Continue, All Host

Run the root.sh to complete the Agent deployment


Go to Setup->Add Target->Add Targets Manually and select 'Add Target Declaratively by Specifying Target Monitoring Properties'
Select 'Database Instance' to Target Type and specific hostname for Monitoring Agent and click on 'Add Manually' Button

Provide Database Details of Agent and Test the connection


Agent configuration completed and now can monitor newly added DB through EM

Thursday, June 11, 2015

Install 12c Enterprise Manager

Prerequisites 

  • Download and Install Oracle Database 11g R2 on linux platform
  • Download Enterprise Manager Cloud control from following link
  • http://www.oracle.com/technetwork/oem/grid-control/downloads/index.html

  • If you have performed a default database installation you will need to de-configure Enterprise Manager Database Control. Run the following command as the "oracle" user.

  • $ emca -deconfig dbcontrol db -repos drop -SYS_PWD <sys pasword> -SYSMAN_PWD <sysman password>

  • Make following initialization parameter changes and restart the instance

  • $sqlplus / AS SYSDBA
    SQL>ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
    SQL>ALTER SYSTEM SET session_cached_cursors=200 SCOPE=SPFILE
    SQL>ALTER SYSTEM SET sga_target=2G SCOPE=SPFILE;
    SQL>ALTER SYSTEM SET shared_pool_size=600M SCOPE=SPFILE;
    SQL>ALTER SYSTEM SET pga_aggregate_target=1G SCOPE=SPFILE;
    SQL>ALTER SYSTEM SET job_queue_processes=20 SCOPE=SPFILE;
    
    SQL>SHUTDOWN IMMEDIATE
    SQL>STARTUP
    
    If you have done a default installation as described here, the UNDO tablespace will be autoextensible. If you have done a custom installation make sure the UNDO tablespace is at least 200M in size. Also, make sure you have 3 redo logs of at least 300M to prevent a warning during the installation.

    Cloud Control Installation

    Create Following installation directories for management server and agent

    $ mkdir -p /u01/app/oracle/oms12cr3
    $ mkdir -p /u01/app/oracle/agent12cr3
    
    Unzip the cloud control media and begin the installation by running runinstaller
    $ mkdir em
    $ unzip -d em em12103p1_linux64_disk1.zip
    $ unzip -d em em12103p1_linux64_disk2.zip
    $ unzip -d em em12103p1_linux64_disk3.zip
    $ cd em
    
    $ ./runInstaller
    
    If you wish to receive support information enter the e-mail address else skip

    If you wish to check for updates enter the details else skip

    If you have completed all the prerequisites then installation pass all the checks

    Select 'Create a new Enterprise Manager System' and 'simple' option

    Enter Middleware and Agent installation locations

    Enter Administrator password and Database Details

    If you have any additional warnings, check they don't look like show-stoppers, then click the 'OK' button to continue and click 'Install' button to begin the installation


    When prompted, run the root scripts, then click the 'OK' button
    Make note of the URL below and close. Copy of following information are stored in /u01/app/oracle/oms12cr3/oms/install/setupinfo.txt file.

    Login to the EM using above URL.


    Startup and Shutdown Enterprise Manager

    Oracle Management Server
    export OMS_HOME=/u01/app/oracle/oms12cr3/oms
    $OMS_HOME/bin/emctl start oms
    $OMS_HOME/bin/emctl stop oms
    $OMS_HOME/bin/emctl status oms
    
    Agent
    export AGENT_HOME=/u01/app/oracle/agent12cr3/core/12.1.0.3.0
    $AGENT_HOME/bin/emctl start agent
    $AGENT_HOME/bin/emctl stop agent
    $AGENT_HOME/bin/emctl status agent
    

    Sunday, May 17, 2015

    Migrate Non ASM to ASM Database - 11g

    Prerequisite
    Running Non ASM 11g Database

    Migration Steps

    Download and Install appropriate ASMLib RPM's
    • oracleasm-support-2.1.7-1.el5.i386.rpm
    • oracleasmlib-2.0.4-1.el5.i386.rpm
    • oracleasm-[your-kernel-version].rpm

    Then create the disk as follows which using creation of ASM instance









    I have created 2 disks DISK1 and DISK2

    Check the permission of created disk under /dev/oracleasm/disks/


    Now unzip the grid software and install using ./runInstaller

    And select 'Install and Configure Grid Infrastructure for Standalone Server' as we are not using ASM for RAC database.


    Here you can able see the disks created earlier. I have kept the redundancy 'External' so that only one disk is required for a disk group. For redundancy 'Normal' we need to have a two disks in a diskgroup and for 'High' we need a minimum for three disks. Select the disk which has to be added to diskgroup named 'DATA'.

    Provide the password for SYS and ASMSNMP

     Select the OS group or keep as It is



     Click Finish to begin the installation





    Once the installation is completed you can check whether ASM processes are running

    Now below are the steps to move Non ASM DB to ASM disks
    SQL> select name from v$database;
    
    NAME
    ---------
    DEV
    
    SQL> select file_name from dba_data_files;
    
    FILE_NAME
    --------------------------------------------------------------------------------
    /u01/app/oracle/oradata/DEV/users01.dbf
    /u01/app/oracle/oradata/DEV/undotbs01.dbf
    /u01/app/oracle/oradata/DEV/sysaux01.dbf
    /u01/app/oracle/oradata/DEV/system01.dbf
    /u01/app/oracle/oradata/DEV/example01.dbf
    
    SQL> select file_name from dba_temp_files;
    
    FILE_NAME
    --------------------------------------------------------------------------------
    /u01/app/oracle/oradata/DEV/temp01.dbf
    
    
    SQL> show parameter spfile;
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    spfile                               string      /u01/app/oracle/product/11.2.0
                                                     /dbhome_1/dbs/spfileDEV.ora
    
    
    SQL> show parameter control_file;
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    control_file_record_keep_time        integer     7
    control_files                        string      /u01/app/oracle/oradata/DEV/co
                                                     ntrol01.ctl, /u01/app/oracle/f
                                                     lash_recovery_area/DEV/control
                                                     02.ctl
    
    SQL> alter system set control_files='+DATA' scope=spfile;
    
    System altered.
    
    SQL> alter system set db_create_file_dest='+DATA' scope=spfile;
     
    System altered.
    
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    
    SQL> startup nomount;
    ORACLE instance started.
    
    Total System Global Area 1653518336 bytes
    Fixed Size                  2213896 bytes
    Variable Size             956303352 bytes
    Database Buffers          687865856 bytes
    Redo Buffers                7135232 bytes
    
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    
    [oracle@dev ~]$ rman target /
    
    Recovery Manager: Release 11.2.0.1.0 - Production on Thu May 14 11:05:40 2015
    
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: DEV (not mounted)
    
    RMAN> restore controlfile from '/u01/app/oracle/oradata/DEV/control01.ctl';
    
    Starting restore at 14-MAY-15
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=23 device type=DISK
    
    channel ORA_DISK_1: copied control file copy
    output file name=+DATA/dev/controlfile/current.257.879678343
    Finished restore at 14-MAY-15
    
    RMAN> alter database mount;
    
    database mounted
    released channel: ORA_DISK_1
    
    RMAN> backup as copy database format '+DATA'
    2> ;
    
    Starting backup at 14-MAY-15
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=25 device type=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00001 name=/u01/app/oracle/oradata/DEV/system01.dbf
    output file name=+DATA/dev/datafile/system.258.879679631 tag=TAG20150514T112711 RECID=2 STAMP=879679658
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00002 name=/u01/app/oracle/oradata/DEV/sysaux01.dbf
    output file name=+DATA/dev/datafile/sysaux.259.879679667 tag=TAG20150514T112711 RECID=3 STAMP=879679687
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00003 name=/u01/app/oracle/oradata/DEV/undotbs01.dbf
    output file name=+DATA/dev/datafile/undotbs1.260.879679691 tag=TAG20150514T112711 RECID=4 STAMP=879679697
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00005 name=/u01/app/oracle/oradata/DEV/example01.dbf
    output file name=+DATA/dev/datafile/example.261.879679699 tag=TAG20150514T112711 RECID=5 STAMP=879679703
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
    channel ORA_DISK_1: starting datafile copy
    copying current control file
    output file name=+DATA/dev/controlfile/backup.262.879679707 tag=TAG20150514T112711 RECID=6 STAMP=879679707
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00004 name=/u01/app/oracle/oradata/DEV/users01.dbf
    output file name=+DATA/dev/datafile/users.263.879679709 tag=TAG20150514T112711 RECID=7 STAMP=879679709
    channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    including current SPFILE in backup set
    channel ORA_DISK_1: starting piece 1 at 14-MAY-15
    channel ORA_DISK_1: finished piece 1 at 14-MAY-15
    piece handle=+DATA/dev/backupset/2015_05_14/nnsnf0_tag20150514t112711_0.264.879679711 tag=TAG20150514T112711 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 14-MAY-15
    
    RMAN> switch database to copy;
    
    datafile 1 switched to datafile copy "+DATA/dev/datafile/system.258.879679631"
    datafile 2 switched to datafile copy "+DATA/dev/datafile/sysaux.259.879679667"
    datafile 3 switched to datafile copy "+DATA/dev/datafile/undotbs1.260.879679691"
    datafile 4 switched to datafile copy "+DATA/dev/datafile/users.263.879679709"
    datafile 5 switched to datafile copy "+DATA/dev/datafile/example.261.879679699"
    
    RMAN> alter database open;
    
    database opened
    
    RMAN> Exit
    
    SQL> select file_name from dba_data_files;
    
    FILE_NAME
    --------------------------------------------------------------------------------
    +DATA/dev/datafile/users.263.879679709
    +DATA/dev/datafile/undotbs1.260.879679691
    +DATA/dev/datafile/sysaux.259.879679667
    +DATA/dev/datafile/system.258.879679631
    +DATA/dev/datafile/example.261.879679699
    
    SQL> select file_name from dba_temp_files;
    
    FILE_NAME
    --------------------------------------------------------------------------------
    /u01/app/oracle/oradata/DEV/temp01.dbf
    
    SQL> alter database tempfile '/u01/app/oracle/oradata/DEV/temp01.dbf' drop including datafiles;
    
    Database altered.
    
    SQL> select file_name from dba_temp_files;
    
    no rows selected
    
    SQL> alter tablespace temp add tempfile size 300M;
    
    Tablespace altered.
    
    SQL> select file_name from dba_temp_files;
    
    FILE_NAME
    --------------------------------------------------------------------------------
    +DATA/dev/tempfile/temp.265.879682295
    
    SQL> select member from v$logfile;
    
    MEMBER
    --------------------------------------------------------------------------------
    /u01/app/oracle/oradata/DEV/redo03.log
    /u01/app/oracle/oradata/DEV/redo02.log
    /u01/app/oracle/oradata/DEV/redo01.log
    
    
    SQL> alter database add logfile group 4 '+DATA' size 10M;
    
    Database altered.
    
    SQL> alter database add logfile group 5 '+DATA' size 10M;
    
    Database altered.
    
    SQL> alter database add logfile group 6 '+DATA' size 10M;
    
    Database altered.
    
    SQL> select member from v$logfile;
    
    MEMBER
    --------------------------------------------------------------------------------
    /u01/app/oracle/oradata/DEV/redo03.log
    /u01/app/oracle/oradata/DEV/redo02.log
    /u01/app/oracle/oradata/DEV/redo01.log
    +DATA/dev/onlinelog/group_4.266.879682579
    +DATA/dev/onlinelog/group_5.267.879682595
    +DATA/dev/onlinelog/group_6.268.879682607
    
    6 rows selected.
    
    
    SQL> alter database drop logfile group 2;
    
    Database altered.
    
    SQL> alter database drop logfile group 3;
    
    Database altered.
    
    SQL> select member from v$logfile;
    
    MEMBER
    --------------------------------------------------------------------------------
    /u01/app/oracle/oradata/DEV/redo01.log
    +DATA/dev/onlinelog/group_4.266.879682579
    +DATA/dev/onlinelog/group_5.267.879682595
    +DATA/dev/onlinelog/group_6.268.879682607
    
    SQL>  
    
    SQL> select group#,status from v$log;
    
        GROUP# STATUS
    ---------- ----------------
             1 ACTIVE
             4 ACTIVE
             5 CURRENT
             6 UNUSED
    
    SQL> alter system switch logfile;
    
    System altered.
    
    SQL> select group#,status from v$log;
    
        GROUP# STATUS
    ---------- ----------------
             1 ACTIVE
             4 ACTIVE
             5 ACTIVE
             6 CURRENT
    
    
    SQL> alter system checkpoint;
    
    System altered.
    
    SQL> select group#,status from v$log;
    
        GROUP# STATUS
    ---------- ----------------
             1 INACTIVE
             4 CURRENT
             5 INACTIVE
             6 INACTIVE
    
    SQL> alter database drop logfile group 1;
    
    Database altered.
    
    SQL> 
    
    
    
    
    
    

    Monday, April 6, 2015

    Database Switchover and Failover on DR

    Switchover

    Convert primary database to standby

    Ensure that the last redo data transmitted from the primary database was applied on the standby database
    SQL>select sequence#,applied from v$archived_log;
    
    Check whether the primary is ready for switch.
    SQL>select switchover_status from v$database;
    If this query returns "TO STANDBY", then the environment is ready to switch. If it returns "SESSIONS ACTIVE", then the switch command should be used with the 'session shutdown' option.
    SQL>connect / as sysdba;
    SQL>alter database commit to switchover to physical standby with session shutdown;
    

    Shutdown and mount primary database for standby database
    SQL>shutdown immediate;
    SQL>startup nomount;
    SQL>alter database mount standby database;
    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
    
    Verify the switchover status on new standby database
    SQL>select switchover_status from v$database;
    
    Above Query should return a value 'TO PRIMARY'

    Check the Database role after switch
    SQL>select database_role from v$database;
     
    On the original standby database issue the following commands.

    Convert standby database to primary

    SQL>connect / as sysdba;
    SQL>alter database commit to switchover to primary with session shutdown;
    

    Shutdown and Startup old standby database as primary
    SQL>SHUTDOWN IMMEDIATE;
    SQL>STARTUP;
    

    Check the Database role after switch
    SQL>select database_role from v$database;

    Failover

    If the primary database is not available the standby database can be activated as a primary database using the following statements.

    SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
    SQL>ALTER DATABASE ACTIVATE STANDBY DATABASE;