This document explain the step to create the Oracle 11g R2 (11.2.0.4.0) 2-Node RAC Primary to 1-Node RAC Physical Standby Data Guard from Active database on duplication HP-UX Itanium (11.31) environment [Active Database Duplication].
Note: We have used SCAN IP in host file on both primary & standby DB. Here, we are showing both primary and standby db host file because of sometimes we make confusion to configure the host file in primary & standby DB at time of data guard configure.
RAC CONFIGURATION ON STANDBY SERVER
Host File of STANDBY Server.
127.0.0.1 localhost loopback
1.1. Create OS Groups using the command below. Enter these Command as "root" user.
/usr/sbin/groupadd -g 700 oinstall
/usr/sbin/groupadd -g 701 dba
/usr/sbin/groupadd -g 702 oper
/usr/sbin/groupadd -g 703 asmdba
/usr/sbin/groupadd -g 704 asmoper
/usr/sbin/groupadd -g 705 asmadmin
1.2. Create users that will own Oracle & Gird software.Enter these Command as "root" user.
/usr/sbin/useradd -m -u 108 -g oinstall -G dba,oper,asmdba -d /home/oracle oracle
/usr/sbin/useradd -m -u 109 -g oinstall -G dba,asmdba,asmoper,asmadmin -d /home/grid grid
Note: -m is used to create user's home directory[i.e. /home/oracle, /home/grid] . if you do not use
-m in your useradd then you can get .profile by following:
cd /etc/skel
cp .cshrc .exrc .login .profile /home/oracle/
chown oracle:oinstall /home/oracle
or
>>>> Login as grid
$chmod -R 777 .profile [On grid profile]
#chmod -R 777 /home/oracle [On FULL directory]
or
>>>> Login as oracle
$chmod -R 777 .profile [On oracle profile]
# id oracle
uid=108(oracle) gid=700(oinstall) groups=701(dba),702(oper),703(asmdba)
# id grid
uid=109(grid) gid=700(oinstall) groups=701(dba),703(asmdba),704(asmoper),705(asmadmin)
Soft & Hard Limit Setup:
/usr/sbin/kctune maxuprc=3686
/usr/sbin/kctune msgmni=4096
/usr/sbin/kctune msgtql=4096
/usr/sbin/kctune ncsize=35840
/usr/sbin/kctune maxfiles_lim=63488
/usr/sbin/kctune ninode=34816
/usr/sbin/kctune semmni=4096
/usr/sbin/kctune semmns=8192
/usr/sbin/kctune semmnu=4092
/usr/sbin/kctune shmseg=512
/usr/sbin/kctune -s maxfiles=16384
/usr/sbin/kctune -s maxfiles_lim=65536
/usr/sbin/kctune -s maxssiz=134217728
/usr/sbin/kctune -s shmmni=4096
/usr/sbin/kctune -s shmseg=512
libiconv-1.14-ia64-11.31.depot
bash-4.3.033-ia64-11.31.depot
termcap-1.3.1-ia64-11.31.depot
>> To Install patch execute following command:
swinstall -s /tmp/oraclesoft/gettext-0.19.5-ia64-11.31.depot
swinstall -s /tmp/oraclesoft/libiconv-1.14-ia64-11.31.depot
swinstall -s /tmp/oraclesoft/bash-4.3.033-ia64-11.31.depot
swinstall -s /tmp/oraclesoft/termcap-1.3.1-ia64-11.31.depot
>> To Check/View patchs execute following command:
swlist -l patch |grep PHCO*
swlist -l patch |grep PHSS*
>> Compiler Check
swlist -l product |grep -i compiler
Check [X11MotifDevKit.MOTIF21-PRG] is exists ?
#swlist -l product |grep -i X11Motif*
if not exists then-
$vi .profile
# Set up the shell variables:
dd if=/dev/zero of=/dev/oracle/asm_voting01 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_data01 bs=1024k count=1000
>> Installation of oracle 11gR2 Grid Software(11.2.0.4.0)
a. Choose Skip Software Updates.
j. Click on 'Interface type' next to the Interface you want to use for your cluster and select the correct values for 'Public', 'Private' and 'Do Not Use' when finished click 'Next>.
#Login as "grid" user
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$ ./crsctl query css votedisk
--============Optional===============================================================
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$
f. Net configuration Assistance: Listener Configuration, done
>> RAC TO RAC PHYSICAL DATA GUARD
>> Enable Archivelog Mode.
>> Modify Dataguard related init Parameters.
>> Create the SLRs (Standby Redo Logs).
>> Create pfile for standby database.
>> Update the tnsnames.ora.
FOR
LOG_MODE
>> Modify Dataguard related init Parameters.
Check current values of following parameter
set linesize 500 pages 0
col value for a90
col name for a50
select name, value
from v$parameter
where name in ('db_name','db_unique_name','log_archive_config', 'log_archive_dest_1','log_archive_dest_2', 'log_archive_dest_state_1','log_archive_dest_state_2', 'remote_login_passwordfile', 'log_archive_format','log_archive_max_processes','fal_server','db_file_name_convert','log_file_name_convert', 'standby_file_management')
Parameter Modification
SQL>alter system set log_archive_config = 'DG_CONFIG=(dcpdb,dcstdb)'scope=both sid='*';
SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=dcpdb' scope=both sid='*';
SQL> alter system set LOG_ARCHIVE_DEST_2='SERVICE=dcstdb ASYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=dcstdb' scope=both sid='*';
SQL> alter system set standby_file_management=MANUAL scope=both sid='*';
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 31 ('+REDO','+CONTROL') size 800M;
>> Create pfile for standby database.
>>> Prepare Standby Site
>> copy PFILE from dcpdb1 to dcstdb1 (PRIMARY to STANDBY)
>> copy password file from dcpdb1 to dcstdb1 (PRIMARY to STANDBY)
*.audit_file_dest='/u02/app/oracle/admin/dcstdb/adump'
*.audit_trail='db'
#*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='+REDO/dcstdb/controlfile/current.256.887275053',
'+CONTROL/dcstdb/controlfile/current.256.887275053'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_create_online_log_dest_1='+REDO'
*.db_create_online_log_dest_2='+CONTROL'
*.db_domain='nblitd.com'
*.db_file_name_convert='dcpdb','dcstdb'
*.db_name='dcpdb'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=257698037760
*.db_unique_name='dcstdb'
*.diagnostic_dest='/u02/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=dcpdbXDB)'
*.fal_client='DCSTDB'
*.fal_server='DCPDB'
*.filesystemio_options='SETALL'
dcpdb2.instance_number=2
dcpdb1.instance_number=1
#dcstdb.instance_number=1
*.log_archive_config='DG_CONFIG=(dcpdb,dcstdb)'
*.log_archive_dest_1='SERVICE=dcpdb NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=dcpdb'
*.log_archive_dest_2='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=dcstdb'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=10
*.log_file_name_convert='dcpdb','dcstdb'
*.memory_target=8589934592
*.open_cursors=500
*.processes=5000
#*.remote_listener='dcstdb-scan.nblitd.com:1521'
*.remote_login_passwordfile='exclusive'
*.session_cached_cursors=5005
*.sessions=752
*.standby_file_management='AUTO'
dcpdb2.thread=2
dcpdb1.thread=1
#dcstdb.thread=1
dcpdb2.undo_tablespace='UNDOTBS2'
dcpdb1.undo_tablespace='UNDOTBS1'
#dcstdb.undo_tablespace='UNDOTBS'
>> LISTENER in STANDBY SERVER
> Login as "grid" user
> endpoints_listener.ora
LISTENERIT_DCSTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dcstdb-vip)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=172.31.xxx.xx)(PORT=1526)(IP=FIRST)))) # line added by Agent
LISTENERNBL_DCSTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dcstdb-vip)(PORT=1525))(ADDRESS=(PROTOCOL=TCP)(HOST=172.31.xxx.xx)(PORT=1525)(IP=FIRST)))) # line added by Agent
LISTENER_DCSTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dcstdb-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=172.31.xxx.xx)(PORT=1521)(IP=FIRST)))) # line added by Agent
> listener.ora [STATIC LISTENER]
LISTENERIT =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-vip.xxx.com)(PORT = 1526))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
)
)
SID_LIST_LISTENERIT =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u02/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME = dcstdb)
(GLOBAL_DBNAME= dcstdb.xxx.com)
)
)
#LISTENERIT=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENERIT)))) # line added by Agent
# listener.ora Network Configuration File: /u01/app/11.2.0.4/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON
LISTENERNBL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = LISTENERNBL))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENERNBL = ON
LISTENER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON
LISTENER_SCAN1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENERIT=ON # line added by Agent
>> Login to STANDBY server
>> PRIMARY Server HOST File
127.0.0.1
localhost loopback
#################public######################
172.31.xx.xx dcpdb1.xxx.com dcpdb1
172.31.xx.xx dcpdb2.xxx.com dcpdb2
172.31.xx.xx dcstdb.xxx.com dcstdb
#############################################
#################Private#########################
10.x.x.1
dcpdb1-prv
10.x.x.2
dcpdb2-prv
#################################################
################### VIP
##########################
172.31.xx.xx dcpdb1-vip.xxx.com dcpdb1-vip
172.31.xx.xx dcpdb2-vip.xxx.com dcpdb2-vip
172.31.xx.xx dcstdb-vip.xxx.com dcstdb-vip
##################################################
#################SCANIP
##########################
172.31.xx.xx dcpdb-scan.xxx.com dcpdb-scan
172.31.xxx.xx dcstdb-scan.xxx.com
dcstdb-scan
##################################################
>> STANDBY Server HOST File
127.0.0.1
localhost loopback
#################public######################
172.31.xx.xx dcpdb1.xxx.com dcpdb1
172.31.xx.xx dcpdb2.xxx.com dcpdb2
172.31.xxx.xx dcstdb.xxx.com dcstdb
###############################################
#################Private#########################
10.x.x.3
dcstdb-prv.xxx.com
dcstdb-prv
################################################
################### VIP ##########################
172.31.xx.xx dcpdb1-vip.xxx.com dcpdb1-vip
172.31.xx.xx dcpdb2-vip.xxx.com dcpdb2-vip
172.31.xxx.xx dcstdb-vip.xxx.com dcstdb-vip
###################################################
###################SCAN ##########################
172.31.xxx.xx dcstdb-scan.xxx.com
dcstdb-scan
172.31.xx.xx dcpdb-scan.xxx.com dcpdb-scan
#####################################################Note: We have used SCAN IP in host file on both primary & standby DB. Here, we are showing both primary and standby db host file because of sometimes we make confusion to configure the host file in primary & standby DB at time of data guard configure.
RAC CONFIGURATION ON STANDBY SERVER
Host File of STANDBY Server.
#################public######################
172.31.xxx.xx dcstdb.xxx.com dcstdb
###############################################
#################Private#########################
10.x.x.3 dcstdb-prv.xxx.com dcstdb-prv
################################################
################### VIP ##########################
172.31.xxx.xx dcstdb-vip.xxx.com dcstdb-vip
###################################################
###################SCAN ##########################
172.31.xxx.xx dcstdb-scan.xxx.com dcstdb-scan
#####################################################
1.1. Create OS Groups using the command below. Enter these Command as "root" user.
/usr/sbin/groupadd -g 700 oinstall
/usr/sbin/groupadd -g 701 dba
/usr/sbin/groupadd -g 702 oper
/usr/sbin/groupadd -g 703 asmdba
/usr/sbin/groupadd -g 704 asmoper
/usr/sbin/groupadd -g 705 asmadmin
1.2. Create users that will own Oracle & Gird software.Enter these Command as "root" user.
/usr/sbin/useradd -m -u 108 -g oinstall -G dba,oper,asmdba -d /home/oracle oracle
/usr/sbin/useradd -m -u 109 -g oinstall -G dba,asmdba,asmoper,asmadmin -d /home/grid grid
Note: -m is used to create user's home directory[i.e. /home/oracle, /home/grid] . if you do not use
-m in your useradd then you can get .profile by following:
cd /etc/skel
cp .cshrc .exrc .login .profile /home/oracle/
chown oracle:oinstall /home/oracle
cd /etc/skel
cp .cshrc .exrc .login .profile /home/grid/
chown oracle:oinstall /home/grid
cp .cshrc .exrc .login .profile /home/grid/
chown oracle:oinstall /home/grid
>>read, write, execute permission to directory or profile
#chmod -R 777 /home/grid [On FULL directory]or
>>>> Login as grid
$chmod -R 777 .profile [On grid profile]
#chmod -R 777 /home/oracle [On FULL directory]
or
>>>> Login as oracle
$chmod -R 777 .profile [On oracle profile]
# id oracle
uid=108(oracle) gid=700(oinstall) groups=701(dba),702(oper),703(asmdba)
# id grid
uid=109(grid) gid=700(oinstall) groups=701(dba),703(asmdba),704(asmoper),705(asmadmin)
1.3. Set the password for the Oracle & Grid account.Enter these Command as "root" user.
# passwd grid
Changing password for grid
New password:
Re-enter new password:
Passwd successfully changed
# passwd oracle
Changing password for oracle
New password:
Re-enter new password:
Passwd successfully changed
1.4. Setting Kernel Parameters.
On ALL RAC Nodes, verify that kernel parameters value greater or equal to recommended values. kernel parameters value can be set manually (or can also be fixed during installation using runfixup.sh).
Note: On ALL RAC Nodes, if the current value of any parameter is higher than the value listed in this table, then do not change the value of that parameter.
>> Modifying Kernel Setting Using KCTUNE
Use /usr/sbin/kctune to view or change kernel parameters. For example, to view kernel parameters, enter kctune with the -d flag. For example:
#/usr/sbin/kctune -d aio_listio_max
To modify a kernel parameter, enter kctune variable=value. For example:
#/usr/sbin/kctune aio_listio_max=512
Complete this procedure on all other RAC nodes.
/usr/sbin/kctune maxuprc=3686
/usr/sbin/kctune msgmni=4096
/usr/sbin/kctune msgtql=4096
/usr/sbin/kctune ncsize=35840
/usr/sbin/kctune maxfiles_lim=63488
/usr/sbin/kctune ninode=34816
/usr/sbin/kctune semmni=4096
/usr/sbin/kctune semmns=8192
/usr/sbin/kctune semmnu=4092
/usr/sbin/kctune shmseg=512
/usr/sbin/kctune -s maxfiles=16384
/usr/sbin/kctune -s maxfiles_lim=65536
/usr/sbin/kctune -s maxssiz=134217728
/usr/sbin/kctune -s shmmni=4096
/usr/sbin/kctune -s shmseg=512
1.5. Patch requirement list for HPUX Itanium Platform
Note: For Password less SSH Connectivity between nodes below Software packages must be installed on each & every node.
gettext-0.19.5-ia64-11.31.depotlibiconv-1.14-ia64-11.31.depot
bash-4.3.033-ia64-11.31.depot
termcap-1.3.1-ia64-11.31.depot
>> To Install patch execute following command:
swinstall -s /tmp/oraclesoft/gettext-0.19.5-ia64-11.31.depot
swinstall -s /tmp/oraclesoft/libiconv-1.14-ia64-11.31.depot
swinstall -s /tmp/oraclesoft/bash-4.3.033-ia64-11.31.depot
swinstall -s /tmp/oraclesoft/termcap-1.3.1-ia64-11.31.depot
>> To Check/View patchs execute following command:
swlist -l patch |grep PHCO*
swlist -l patch |grep PHSS*
>> Compiler Check
swlist -l product |grep -i compiler
1.6. Create Required Symbolic/soft Links
ln -s /usr/bin/ssh /usr/local/bin/ssh
ln -s /usr/bin/scp /usr/local/bin/scp
Below symbolic links are required only if Motif 2.1 development Environment package (X11MotifDevKit.MOTIF21-PRG) is not installed.
Check [X11MotifDevKit.MOTIF21-PRG] is exists ?
#swlist -l product |grep -i X11Motif*
if not exists then-
#cd /usr/lib
ln -s libX11.3 libX11.sl
ln -s libXIE.2 libXIE.2.sl
ln -s libXext.3 libXext.sl
ln -s libXhp11.3 libXhp11.sl
ln -s libXi.3 libXi.sl
ln -s libXm.4 libXm.sl
ln -s libXp.2 libXp.sl
ln -s libXt.3 libXt.sl
ln -s libXtst.2 libXtst.sl
ln -s libX11.3 libX11.sl
ln -s libXIE.2 libXIE.2.sl
ln -s libXext.3 libXext.sl
ln -s libXhp11.3 libXhp11.sl
ln -s libXi.3 libXi.sl
ln -s libXm.4 libXm.sl
ln -s libXp.2 libXp.sl
ln -s libXt.3 libXt.sl
ln -s libXtst.2 libXtst.sl
1.7. Create the Oracle Grid Infrastructure Home Directory
# mkdir -p /u01/app/grid
# chmod -R 775 /u01/app/grid
# mkdir -p /u01/app/11.2.0.4/grid
# chmod -R 775 /u01/app/11.2.0.4/grid
# chown -R grid:oinstall /u01
$vi .profile
# Set up the shell environment
set -u
trap "echo 'logout''' 0
stty erase ^?
set -o vi
# Set up the shell variables:
EDITOR=vi
export EDITOR
export HISTFILE=$HOME/.sh_history
export PS1="$(/usr/bin/whoami)@$(/usr/bin/hostname) [\$PWD]$"
##Set up Grid Environment:##
umask 022
export GRID_HOME=/u01/app/11.2.0.4/grid
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=$GRID_HOME
export ORACLE_SID=+ASM1
export PATH=$ORACLE_HOME/bin:$PATH
TZ=GMT6
export TZ
1.8. Create the Oracle Inventory Directory
# mkdir -p /u01/app/oraInventory
# chown -R grid:oinstall /u01/app/oraInventory
# chmod -R 775 /u01/app/oraInventory
# chown -R grid:oinstall /u01/app/oraInventory
# chmod -R 775 /u01/app/oraInventory
1.9. Create the Oracle BASE Directory
# mkdir -p /u02/app/oracle/product/11.2.0.4/dbhome_1
# chown -R oracle:oinstall /u02
# chmod -R 775 /u02/app/oracle/product/11.2.0.4/dbhome_1
$vi .profile
# Set up the shell environment
set -u
trap "echo 'logout''' 0
stty erase ^?
set -o vi
# Set up the shell variables:
EDITOR=vi
export EDITOR
export HISTFILE=$HOME/.sh_history
export PS1="$(/usr/bin/whoami)@$(/usr/bin/hostname) [\$PWD]$"
## Set up Oracle Environment##
umask 022
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1
export ORACLE_SID=dcpdb1
export PATH=$ORACLE_HOME/bin:$PATH
TZ=GMT6
export TZ
# mkdir -p /u02/app/oracle/product/11.2.0.4/dbhome_1
# chown -R oracle:oinstall /u02
# chmod -R 775 /u02/app/oracle/product/11.2.0.4/dbhome_1
$vi .profile
# Set up the shell environment
set -u
trap "echo 'logout''' 0
stty erase ^?
set -o vi
# Set up the shell variables:
EDITOR=vi
export EDITOR
export HISTFILE=$HOME/.sh_history
export PS1="$(/usr/bin/whoami)@$(/usr/bin/hostname) [\$PWD]$"
umask 022
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1
export ORACLE_SID=dcpdb1
export PATH=$ORACLE_HOME/bin:$PATH
TZ=GMT6
export TZ
1.10. Configure Disk Devices for Oracle ASM
a. To make sure that the disks are available, enter the following command on node:
a. To make sure that the disks are available, enter the following command on node:
# ioscan -kfnNC disk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 21 64000/0xfa00/0x7 esdisk CLAIMED DEVICE HP IR Volume
/dev/disk/disk21 /dev/disk/disk21_p3 /dev/rdisk/disk21_p2
/dev/disk/disk21_p1 /dev/rdisk/disk21 /dev/rdisk/disk21_p3
/dev/disk/disk21_p2 /dev/rdisk/disk21_p1
disk 23 64000/0xfa00/0x8 esdisk CLAIMED DEVICE TEAC DVD-ROM DW-224EV
/dev/disk/disk23 /dev/rdisk/disk23
disk 32 64000/0xfa00/0x15 esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk32 /dev/rdisk/disk32
disk 41 64000/0xfa00/0x19 esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk41 /dev/rdisk/disk41
disk 50 64000/0xfa00/0x1a esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk50 /dev/rdisk/disk50 (OCR1)
disk 59 64000/0xfa00/0x1b esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk59 /dev/rdisk/disk59 (OCR2)
disk 68 64000/0xfa00/0x1c esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk68 /dev/rdisk/disk68 (OCR3)
disk 77 64000/0xfa00/0x1d esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk77 /dev/rdisk/disk77 (VOTE1)
disk 86 64000/0xfa00/0x1e esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk86 /dev/rdisk/disk86 (VOTE2)
disk 95 64000/0xfa00/0x1f esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk95 /dev/rdisk/disk95 (VOTE3)
disk 104 64000/0xfa00/0x20 esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk104 /dev/rdisk/disk104 (CONTROL FILE)
disk 113 64000/0xfa00/0x21 esdisk CLAIMED DEVICE 3PARdataVV
/dev/disk/disk113 /dev/rdisk/disk113 (REDOLOG FILE)
b. Disk size check
diskinfo /dev/rdisk/disk32
SCSI describe of /dev/rdisk/disk32:
vendor: 3PARdata
product id: VV
type: direct access
size: 262144000 Kbytes 250 GB DATA
bytes per sector: 512
diskinfo /dev/rdisk/disk41
diskinfo /dev/rdisk/disk50
diskinfo /dev/rdisk/disk59
diskinfo /dev/rdisk/disk68
diskinfo /dev/rdisk/disk77
diskinfo /dev/rdisk/disk86
diskinfo /dev/rdisk/disk95
diskinfo /dev/rdisk/disk104
diskinfo /dev/rdisk/disk113
c. Create a special oracle device directory and use mknod to create device paths in oracle folder.
#mkdir /dev/oracle
DATA:
ll /dev/rdisk/disk32
crw-r----- 1 bin sys 13 0x000015 Aug 31 19:48 /dev/rdisk/disk32
# mknod /dev/oracle/asm_data01 c 13 0x000015
# ll /dev/rdisk/disk32
crw-r----- 1 bin sys 13 0x000015 Aug 31 19:48 /dev/rdisk/disk32
# ll /dev/oracle/asm_data01
crw-r--r-- 1 root sys 13 0x000015 Sep 2 00:46 /dev/oracle/asm_data01
FRA:
# ll /dev/rdisk/disk41
crw-r----- 1 bin sys 13 0x000019 Aug 31 19:50 /dev/rdisk/disk41
# mknod /dev/oracle/asm_fra01 c 13 0x000019
# ll /dev/rdisk/disk41
crw-r----- 1 bin sys 13 0x000019 Aug 31 19:50 /dev/rdisk/disk41
# ll /dev/oracle/asm_fra01
crw-r--r-- 1 root sys 13 0x000019 Sep 2 01:11 /dev/oracle/asm_fra01
#
OCR :
# ll /dev/rdisk/disk50
crw-r----- 1 bin sys 13 0x00001a Sep 2 00:13 /dev/rdisk/disk50
# mknod /dev/oracle/asm_ocr01 c 13 0x00001a
# ll /dev/rdisk/disk50
crw-r----- 1 bin sys 13 0x00001a Sep 2 00:13 /dev/rdisk/disk50
# ll /dev/oracle/asm_ocr01
crw-r--r-- 1 root sys 13 0x00001a Sep 2 01:32 /dev/oracle/asm_ocr01
#
# ll /dev/rdisk/disk59
crw-r----- 1 bin sys 13 0x00001b Sep 2 00:14 /dev/rdisk/disk59
# mknod /dev/oracle/asm_ocr02 c 13 0x00001b
# ll /dev/rdisk/disk59
crw-r----- 1 bin sys 13 0x00001b Sep 2 00:14 /dev/rdisk/disk59
# ll /dev/oracle/asm_ocr02
crw-r--r-- 1 root sys 13 0x00001b Sep 2 01:33 /dev/oracle/asm_ocr02
#
# ll /dev/rdisk/disk68
crw-r----- 1 bin sys 13 0x00001c Sep 2 00:16 /dev/rdisk/disk68
# mknod /dev/oracle/asm_ocr03 c 13 0x00001c
# ll /dev/rdisk/disk68
crw-r----- 1 bin sys 13 0x00001c Sep 2 00:16 /dev/rdisk/disk68
# ll /dev/oracle/asm_ocr03
crw-r--r-- 1 root sys 13 0x00001c Sep 2 01:34 /dev/oracle/asm_ocr03
#
VOTING
# ll /dev/rdisk/disk77
crw-r----- 1 bin sys 13 0x00001d Sep 2 00:18 /dev/rdisk/disk77
# mknod /dev/oracle/asm_voting01 c 13 0x00001d
# ll /dev/rdisk/disk77
crw-r----- 1 bin sys 13 0x00001d Sep 2 00:18 /dev/rdisk/disk77
# ll /dev/oracle/asm_voting01
crw-r--r-- 1 root sys 13 0x00001d Sep 2 01:36 /dev/oracle/asm_voting01
#
# ll /dev/rdisk/disk86
crw-r----- 1 bin sys 13 0x00001e Sep 2 00:19 /dev/rdisk/disk86
# mknod /dev/oracle/asm_voting02 c 13 0x00001e
# ll /dev/rdisk/disk86
crw-r----- 1 bin sys 13 0x00001e Sep 2 00:19 /dev/rdisk/disk86
# ll /dev/oracle/asm_voting02
crw-r--r-- 1 root sys 13 0x00001e Sep 2 01:37 /dev/oracle/asm_voting02
#
# ll /dev/rdisk/disk95
crw-r----- 1 bin sys 13 0x00001f Sep 2 00:20 /dev/rdisk/disk95
# mknod /dev/oracle/asm_voting03 c 13 0x00001f
# ll /dev/rdisk/disk95
crw-r----- 1 bin sys 13 0x00001f Sep 2 00:20 /dev/rdisk/disk95
# ll /dev/oracle/asm_voting03
crw-r--r-- 1 root sys 13 0x00001f Sep 2 01:38 /dev/oracle/asm_voting03
#
CONTROL:
# ll /dev/rdisk/disk104
crw-r----- 1 bin sys 13 0x000020 Sep 2 00:22 /dev/rdisk/disk104
# mknod /dev/oracle/asm_control01 c 13 0x000020
# ll /dev/rdisk/disk104
crw-r----- 1 bin sys 13 0x000020 Sep 2 00:22 /dev/rdisk/disk104
# ll /dev/oracle/asm_control01
crw-r--r-- 1 root sys 13 0x000020 Sep 2 01:40 /dev/oracle/asm_control01
#
REDO:
# ll /dev/rdisk/disk113
crw-r----- 1 bin sys 13 0x000021 Sep 2 00:23 /dev/rdisk/disk113
# mknod /dev/oracle/asm_redo01 c 13 0x000021
# ll /dev/rdisk/disk113
crw-r----- 1 bin sys 13 0x000021 Sep 2 00:23 /dev/rdisk/disk113
# ll /dev/oracle/asm_redo01
crw-r--r-- 1 root sys 13 0x000021 Sep 2 01:41 /dev/oracle/asm_redo01
#
d. Disk permission
# chown -R grid:asmadmin /dev/oracle/*
# chmod -R 660 /dev/oracle/*
# ll /dev/oracle
total 0
crw-rw---- 1 grid asmadmin 13 0x000020 Sep 2 01:40 asm_control01
crw-rw---- 1 grid asmadmin 13 0x000015 Sep 2 00:46 asm_data01
crw-rw---- 1 grid asmadmin 13 0x000019 Sep 2 01:11 asm_fra01
crw-rw---- 1 grid asmadmin 13 0x00001a Sep 2 01:32 asm_ocr01
crw-rw---- 1 grid asmadmin 13 0x00001b Sep 2 01:33 asm_ocr02
crw-rw---- 1 grid asmadmin 13 0x00001c Sep 2 01:34 asm_ocr03
crw-rw---- 1 grid asmadmin 13 0x000021 Sep 2 01:41 asm_redo01
crw-rw---- 1 grid asmadmin 13 0x00001d Sep 2 01:36 asm_voting01
crw-rw---- 1 grid asmadmin 13 0x00001e Sep 2 01:37 asm_voting02
crw-rw---- 1 grid asmadmin 13 0x00001f Sep 2 01:38 asm_voting03
#
e. Setting Minor Number of device files
# ll -l /dev/async
crw-rw-rw- 1 bin bin 101 0x000000 Aug 31 17:10 /dev/async
# rm /dev/async
# mknod /dev/async c 101 0x104
# ll -l /dev/async
crw-r--r-- 1 root sys 101 0x000104 Sep 2 01:43 /dev/async
#
f. dd
dd if=/dev/zero of=/dev/oracle/asm_ocr01 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_ocr02 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_ocr03 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_voting01 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_voting02 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_voting03 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_data01 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_fra01 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_redo01 bs=1024k count=1000
dd if=/dev/zero of=/dev/oracle/asm_control01 bs=1024k count=1000
1.11. Setup NTP
/sbin/init.d/xntpd stop
mv /etc/ntp.conf /etc/ntp.conf.org.
1.12. Reboot Nodes
Reboot ALL nodes, after completing above all tasks.
>>> Use full Command >>
# nslookup dcpdb-scan
# hostname
# cat /etc/hosts
# cat /etc/rc.config.d/netconf
# ifconfig lan0
# ioscan -kfNnC disk
# diskinfo /dev/rdisk/disk137
# machinfo |grep -i memory
#swlist -l product |grep -i compiler
# uname -a
# swlist -l bundle |grep QPK
# swlist -l patch |grep PH*
$ . ./.profile
$ echo $ORACLE_HOME
# /usr/local/bin/unzip p13390677_112040_HPUX-IA64_3of7.zip [Additionally need to install unzip s/w]
#swinstall -s /tmp/oraclesoft/gettext-0.19.5-ia64-11.31.depot [To install patch]
#/usr/sbin/kctune aio_listio_max=512 [Modify kernel]
#swinstall -s /tmp/oraclesoft/gettext-0.19.5-ia64-11.31.depot [To install patch]
#/usr/sbin/kctune aio_listio_max=512 [Modify kernel]
>> Installation of oracle 11gR2 Grid Software(11.2.0.4.0)
chown -R grid:oinstall /tmp/oraclesoft/grid/
a. Choose Skip Software Updates.
b. Select radio button 'Install and Configure Grid Infrastructure for a Cluster' and click Next>
c. Select radio button 'Advanced Installation' and click Next >
d. Accept 'English' as language and click Next >
e. Specify 'Cluster Name' & 'Scan Name', Unchecked Configure GNS and click Next >
f. Use the Edit and Add buttons to specify the node names and virtual IP address you configured previously in your /etc/hosts file.
g. Use the 'SSH Connectivity' button to configure/test the passwordless SSH Connectivity between nodes.
h. Type in the OS password for the user 'grid' and press 'setup' for SSH connectivity
i. Passwordless SSH Connectivity Successful.
j. Click on 'Interface type' next to the Interface you want to use for your cluster and select the correct values for 'Public', 'Private' and 'Do Not Use' when finished click 'Next>.
k. Select radio button 'Automatic Storage Management (ASM)' click 'Next>.
l. Select the 'DiskGroup Name' specify the 'Redundancy' and tick the disks you want to use, [if candidate disks are not shown then check the permission for /dev...folder] when done click ' Next >'
[if not candidate disk disks found, then change discovery path to /dev/oracle/*].
Note: Note the number of voting disk that will be created depend on the redundancy level you specify: EXTERNAL will create 1 voting disk, NORMAL will create 3 voting disks, HIGH will create 5 voting disks.
m. Assign groups as below:
Oracle ASM Administrator(OSASM) Group: asmadmin
Oracle ASM DBA(OSDBA for ASM) Group: asmdba
Oracle ASM Operator(OSOPER for ASM) Group: asmoper
n. Specify the location for ORACLE_BASE and for the software location and click 'Next >
o. Specify the location for inventory directory and click 'Next >
p. Perform Pre-requisite Check.
q. we can ignore this warning .
r. Summary
s. Install product
>> Script Execute("root" user)
# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
# /u01/app/11.2.0.4/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0.4/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding Clusterware entries to inittab
CRS-2672: Attempting to start 'ora.mdnsd' on 'dcstdb'
CRS-2676: Start of 'ora.mdnsd' on 'dcstdb' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'dcstdb'
CRS-2676: Start of 'ora.gpnpd' on 'dcstdb' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'dcstdb'
CRS-2672: Attempting to start 'ora.gipcd' on 'dcstdb'
CRS-2676: Start of 'ora.gipcd' on 'dcstdb' succeeded
CRS-2676: Start of 'ora.cssdmonitor' on 'dcstdb' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'dcstdb'
CRS-2672: Attempting to start 'ora.diskmon' on 'dcstdb'
CRS-2676: Start of 'ora.diskmon' on 'dcstdb' succeeded
CRS-2676: Start of 'ora.cssd' on 'dcstdb' succeeded
ASM created and started successfully.
Disk Group OCR created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'sys'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 9151191839f24fc8bf72cab6e77adf9b.
Successful addition of voting disk a14f4db92e054f5abfc3c2472a949c4f.
Successful addition of voting disk 13ee769bbc5f4f48bf07669f9a0dc9ea.
Successfully replaced voting disk group with +OCR.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9151191839f24fc8bf72cab6e77adf9b (/dev/oracle/asm_ocr01) [OCR]
2. ONLINE a14f4db92e054f5abfc3c2472a949c4f (/dev/oracle/asm_ocr02) [OCR]
3. ONLINE 13ee769bbc5f4f48bf07669f9a0dc9ea (/dev/oracle/asm_ocr03) [OCR]
Located 3 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'dcstdb'
CRS-2676: Start of 'ora.asm' on 'dcstdb' succeeded
CRS-2672: Attempting to start 'ora.OCR.dg' on 'dcstdb'
CRS-2676: Start of 'ora.OCR.dg' on 'dcstdb' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
#
t. Install Completed
# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
# /u01/app/11.2.0.4/grid/root.sh
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0.4/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding Clusterware entries to inittab
CRS-2672: Attempting to start 'ora.mdnsd' on 'dcstdb'
CRS-2676: Start of 'ora.mdnsd' on 'dcstdb' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'dcstdb'
CRS-2676: Start of 'ora.gpnpd' on 'dcstdb' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'dcstdb'
CRS-2672: Attempting to start 'ora.gipcd' on 'dcstdb'
CRS-2676: Start of 'ora.gipcd' on 'dcstdb' succeeded
CRS-2676: Start of 'ora.cssdmonitor' on 'dcstdb' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'dcstdb'
CRS-2672: Attempting to start 'ora.diskmon' on 'dcstdb'
CRS-2676: Start of 'ora.diskmon' on 'dcstdb' succeeded
CRS-2676: Start of 'ora.cssd' on 'dcstdb' succeeded
ASM created and started successfully.
Disk Group OCR created successfully.
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'sys'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 9151191839f24fc8bf72cab6e77adf9b.
Successful addition of voting disk a14f4db92e054f5abfc3c2472a949c4f.
Successful addition of voting disk 13ee769bbc5f4f48bf07669f9a0dc9ea.
Successfully replaced voting disk group with +OCR.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9151191839f24fc8bf72cab6e77adf9b (/dev/oracle/asm_ocr01) [OCR]
2. ONLINE a14f4db92e054f5abfc3c2472a949c4f (/dev/oracle/asm_ocr02) [OCR]
3. ONLINE 13ee769bbc5f4f48bf07669f9a0dc9ea (/dev/oracle/asm_ocr03) [OCR]
Located 3 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'dcstdb'
CRS-2676: Start of 'ora.asm' on 'dcstdb' succeeded
CRS-2672: Attempting to start 'ora.OCR.dg' on 'dcstdb'
CRS-2676: Start of 'ora.OCR.dg' on 'dcstdb' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
#
t. Install Completed
>> ASMCA to CREATE diskgroups
a. Login as "grid" user
grid@dcstdb1 [/home/grid]$ cd $ORACLE_HOME/bin
grid@dcstdb1 [/u01/app/11.2.0.4/grid/bin]$ ./asmca
grid@dcstdb1 [/u01/app/11.2.0.4/grid/bin]$ ./asmca
VOTING
b. DATA
c. FRA
d. CONTROL
d. REDO
>> Separate VOTING from OCR diskgroup to VOTING diskgroup.
At the time of grid installation, voting disk was created on OCR diskgroup as I chosen OCR diskgroup on grid installation. Now, I will separate the voting from OCR diskgroup to VOTING diskgroup. below are the procedure to do this job:#Login as "grid" user
grid@dcstdb [/home/grid]$ cd $ORACLE_HOME/bin
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$ ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2380
Available space (kbytes) : 259740
ID : 368646485
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$ ./crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 9151191839f24fc8bf72cab6e77adf9b (/dev/oracle/asm_ocr01) [OCR]
2. ONLINE a14f4db92e054f5abfc3c2472a949c4f (/dev/oracle/asm_ocr02) [OCR]
3. ONLINE 13ee769bbc5f4f48bf07669f9a0dc9ea (/dev/oracle/asm_ocr03) [OCR]
Located 3 voting disk(s).
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$ ./crsctl replace votedisk +VOTING
Successful addition of voting disk 5f3401c46ea94fb2bfff8ce49623aa0e.
Successful addition of voting disk 416ce8b4561b4f65bfdd1002ff761b2a.
Successful addition of voting disk 22898b05735e4ff1bf09baf6bd436f24.
Successful deletion of voting disk 9151191839f24fc8bf72cab6e77adf9b.
Successful deletion of voting disk a14f4db92e054f5abfc3c2472a949c4f.
Successful deletion of voting disk 13ee769bbc5f4f48bf07669f9a0dc9ea.
Successfully replaced voting disk group with +VOTING.
CRS-4266: Voting file(s) successfully replaced
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$ ./crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 5f3401c46ea94fb2bfff8ce49623aa0e (/dev/oracle/asm_voting01) [VOTING]
2. ONLINE 416ce8b4561b4f65bfdd1002ff761b2a (/dev/oracle/asm_voting02) [VOTING]
3. ONLINE 22898b05735e4ff1bf09baf6bd436f24 (/dev/oracle/asm_voting03) [VOTING]
Located 3 voting disk(s).
--============Optional===============================================================
SID_LIST_LISTENERIT =(SID_LIST =(SID_DESC =(ORACLE_HOME = /u01/app/11.2.0.4/grid)(SID_NAME = dcstdb1)(GLOBAL_DBNAME = dcstdb.xxx.com)))
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENERIT=ON # line added by Agent
SID_LIST_LISTENERIT =(SID_LIST =(SID_DESC =(ORACLE_HOME = /u01/app/11.2.0.4/grid)(SID_NAME = dcstdb1)(GLOBAL_DBNAME = dcstdb1.xxx.com)))
grid@dcstdb [/u01/app/11.2.0.4/grid/bin]$
./runcluvfy.sh stage -pre crsinst -n dcpdb1,dcpdb2 -r 11gR2 -verbose >> /tmp/oraclesoft/grid/test.txt
./runcluvfy.sh stage -pre crsinst -n dcstdb -r 11gR2 -verbose >> /tmp/oraclesoft/grid/test.txt
--===================================================================================
>> Installation of Oracle 11gR2 RDBMS Software (11.2.0.4.0)
>> Installation of Oracle 11gR2 RDBMS Software (11.2.0.4.0)
a. Login as "oracle" user
Provide your email address, tick the check box and provide your oracle support password if you want to receive security updates from oracle support and click ' Next >'
b. Skip software updates and click ' Next>'
c. Select the option 'Install Database Software Only' and click ' Next>'
d. Select the option 'Oracle Real Application Clusters database installation', and select all nodes. and click ' Next>'
e.Use the 'SSH Connectivity' button to configure/test the passwordless SSH connectivity between nodes. Type in the OS password for the oracle user and click setup.
f. To confirm English as selected language and click ' Next >'
g. Make sure radio button 'Enterprise Edition' is ticked &click ' Next>'
i. Specify path for oracle base(ORACLE_BASE) and location where we want to store the software (ORACLE_HOME). Click ' Next>'
j. Specify groups:
Database Administrator (OSDBA) Group: dba
Database Operator (OSOPER) Group: oper
Database Operator (OSOPER) Group: oper
k. Oracle Universal Installer performs prerequisite checks.
l. Perform pre-requisite check
m. After Check Summary
n. Installation and scripts execute
o. Click 'Close' to finish the installation of the RDBMS software.
>> NETCA to Create Listener
a. Login as "grid" user
Net configuration Assistance: Listener Configuration, Listener
b. Net configuration Assistance: Listener Configuration, Listener Name
c. Net configuration Assistance: Listener Configuration, Select protocols
d. Net configuration Assistance: Listener Configuration, Select port
e. Net configuration Assistance: Listener Configuration, More Listener?
f. Net configuration Assistance: Listener Configuration, done
RAC TO RAC PHYSICAL DATAGUARD
>>> Prepare Primary Site
>>> Prepare Standby Site
>>> Create RAC Physical Standby Database
>>> Prepare Primary Site
>> Enable Force Logging.>> Enable Archivelog Mode.
>> Modify Dataguard related init Parameters.
>> Create the SLRs (Standby Redo Logs).
>> Create pfile for standby database.
>> Update the tnsnames.ora.
>> Enable Force Logging.
SQL> alter database force logging;
SQL> select force_logging from v$database;
FOR
---
YES
>> Enable Archivelog Mode.
SQL> startup mount
SQL> alter database archive log;
SQL> alter database open;
SQL> alter database archive log;
SQL> alter database open;
SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
>> Modify Dataguard related init Parameters.
Check current values of following parameter
set linesize 500 pages 0
col value for a90
col name for a50
select name, value
from v$parameter
where name in ('db_name','db_unique_name','log_archive_config', 'log_archive_dest_1','log_archive_dest_2', 'log_archive_dest_state_1','log_archive_dest_state_2', 'remote_login_passwordfile', 'log_archive_format','log_archive_max_processes','fal_server','db_file_name_convert','log_file_name_convert', 'standby_file_management')
Parameter Modification
SQL>alter system set log_archive_config = 'DG_CONFIG=(dcpdb,dcstdb)'scope=both sid='*';
SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=dcpdb' scope=both sid='*';
SQL> alter system set LOG_ARCHIVE_DEST_2='SERVICE=dcstdb ASYNC NOAFFIRM VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=dcstdb' scope=both sid='*';
SQL> alter system set log_archive_dest_state_1=enable scope=both;
SQL> alter system set log_archive_dest_state_2=enable scope=both;
SQL> alter system set log_archive_format='%t_%s_%r.arc' scope=spfile sid='*';
SQL> alter system set log_archive_max_processes=10 scope=both sid='*';
SQL> alter system set fal_server=dcstdb scope=both sid='*';
SQL> alter system set fal_client=dcpdb scope=both sid='*';
Shutdown database
SQL> shutdown immediate
Startup database
SQL> Startup
Verify that values are correctly
set linesize 500 pages 0
col value for a90
col name for a50
select name, value
from v$parameter
where name in ('db_name','db_unique_name','log_archive_config', 'log_archive_dest_1','log_archive_dest_2', 'log_archive_dest_state_1','log_archive_dest_state_2', 'remote_login_passwordfile', 'log_archive_format','log_archive_max_processes','fal_server','db_file_name_convert','log_file_name_convert', 'standby_file_management')
>> Create the SLRs (Standby Redo Logs).
There should be minimum of (threads)*(groups per threads + 1) SLRS created on database. There as 2 threads with 6 groups per thread in this configuration on the primary side so there should be total of 14 SLRs at minimum needs to be created.
To see PRIMARY SIDE total groups and Max size of the logfile from v$log. we can use following query:
SQL> select max (bytes), count (1) from v$log;
SLR Calculation:
Number of Thread: 2
Groups per thread: 6
SLRs = 2 * (6+1) = 2*7 = 14
Before create SLRs we nee to change the standby file management from auto to MANUAL. Once SLRs create the standby file management set to AUTO.
SQL> alter system set log_archive_dest_state_2=enable scope=both;
SQL> alter system set log_archive_format='%t_%s_%r.arc' scope=spfile sid='*';
SQL> alter system set log_archive_max_processes=10 scope=both sid='*';
SQL> alter system set fal_server=dcstdb scope=both sid='*';
SQL> alter system set fal_client=dcpdb scope=both sid='*';
SQL> alter system set db_file_name_convert='dcstdb','dcpdb' scope=spfile sid='*';
SQL> alter system set log_file_name_convert='dcstdb','dcpdb' scope=spfile sid='*';
SQL> alter system set db_unique_name='dcpdb' scope=spfile sid='*';Shutdown database
SQL> shutdown immediate
Startup database
SQL> Startup
set linesize 500 pages 0
col value for a90
col name for a50
select name, value
from v$parameter
where name in ('db_name','db_unique_name','log_archive_config', 'log_archive_dest_1','log_archive_dest_2', 'log_archive_dest_state_1','log_archive_dest_state_2', 'remote_login_passwordfile', 'log_archive_format','log_archive_max_processes','fal_server','db_file_name_convert','log_file_name_convert', 'standby_file_management')
>> Create the SLRs (Standby Redo Logs).
There should be minimum of (threads)*(groups per threads + 1) SLRS created on database. There as 2 threads with 6 groups per thread in this configuration on the primary side so there should be total of 14 SLRs at minimum needs to be created.
To see PRIMARY SIDE total groups and Max size of the logfile from v$log. we can use following query:
SQL> select max (bytes), count (1) from v$log;
SLR Calculation:
Number of Thread: 2
Groups per thread: 6
SLRs = 2 * (6+1) = 2*7 = 14
Before create SLRs we nee to change the standby file management from auto to MANUAL. Once SLRs create the standby file management set to AUTO.
SQL> alter system set standby_file_management=MANUAL scope=both sid='*';
System altered.
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 21 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 22 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 23 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 24 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 25 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 26 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 27 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 31 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 32 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 33 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 34 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 35 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 36 ('+REDO','+CONTROL') size 800M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 37 ('+REDO','+CONTROL') size 800M;
SQL> alter system set standby_file_management=AUTO scope=both sid='*';
System altered.
>> Create pfile for standby database.
SQL> create pfile='/u02/initdcstdb1.ora' from spfile;
>> update TNSNAMES.ora
DCPDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDEASS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1526))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcpdb.xxx.com)
)
)
DCSTDBSCAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-scan.xxx.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcstdb.xxx.com)
)
)
DCSTDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-vip.xxx.com)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcstdb.xxx.com)
)
)
>> update TNSNAMES.ora
DCPDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDEASS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1526))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcpdb.xxx.com)
)
)
DCSTDBSCAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-scan.xxx.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcstdb.xxx.com)
)
)
DCSTDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-vip.xxx.com)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcstdb.xxx.com)
)
)
>>> Prepare Standby Site
>> copy PFILE from dcpdb1 to dcstdb1 (PRIMARY to STANDBY)
dcpdb1@oracle] scp /u02/initdcstdb1.ora
oracle@172.31.100.45: /u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/
oracle@172.31.100.45: /u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/
>> copy password file from dcpdb1 to dcstdb1 (PRIMARY to STANDBY)
dcpdb1@oracle] scp /u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/orapwdcpdb1 oracle@172.31.100.45:/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/
dcstdb1@oracle] mv orapwdcpdb1 orapwdcstdb1
>> STANDBY PFILE creation (File Name and location: /u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/initdcstdb1.ora)
*.audit_file_dest='/u02/app/oracle/admin/dcstdb/adump'
#*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='+REDO/dcstdb/controlfile/current.256.887275053',
'+CONTROL/dcstdb/controlfile/current.256.887275053'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_create_online_log_dest_1='+REDO'
*.db_create_online_log_dest_2='+CONTROL'
*.db_domain='nblitd.com'
*.db_file_name_convert='dcpdb','dcstdb'
*.db_name='dcpdb'
*.db_recovery_file_dest='+FRA'
*.db_recovery_file_dest_size=257698037760
*.db_unique_name='dcstdb'
*.diagnostic_dest='/u02/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=dcpdbXDB)'
*.fal_client='DCSTDB'
*.fal_server='DCPDB'
*.filesystemio_options='SETALL'
dcpdb2.instance_number=2
dcpdb1.instance_number=1
#dcstdb.instance_number=1
*.log_archive_config='DG_CONFIG=(dcpdb,dcstdb)'
*.log_archive_dest_1='SERVICE=dcpdb NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=dcpdb'
*.log_archive_dest_2='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=dcstdb'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_format='%t_%s_%r.arc'
*.log_archive_max_processes=10
*.log_file_name_convert='dcpdb','dcstdb'
*.memory_target=8589934592
*.open_cursors=500
*.processes=5000
#*.remote_listener='dcstdb-scan.nblitd.com:1521'
*.remote_login_passwordfile='exclusive'
*.session_cached_cursors=5005
*.sessions=752
*.standby_file_management='AUTO'
dcpdb2.thread=2
dcpdb1.thread=1
#dcstdb.thread=1
dcpdb2.undo_tablespace='UNDOTBS2'
dcpdb1.undo_tablespace='UNDOTBS1'
#dcstdb.undo_tablespace='UNDOTBS'
>> LISTENER in STANDBY SERVER
> Login as "grid" user
> endpoints_listener.ora
LISTENERIT_DCSTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dcstdb-vip)(PORT=1526))(ADDRESS=(PROTOCOL=TCP)(HOST=172.31.xxx.xx)(PORT=1526)(IP=FIRST)))) # line added by Agent
LISTENERNBL_DCSTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dcstdb-vip)(PORT=1525))(ADDRESS=(PROTOCOL=TCP)(HOST=172.31.xxx.xx)(PORT=1525)(IP=FIRST)))) # line added by Agent
LISTENER_DCSTDB=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dcstdb-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=172.31.xxx.xx)(PORT=1521)(IP=FIRST)))) # line added by Agent
> listener.ora [STATIC LISTENER]
LISTENERIT =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-vip.xxx.com)(PORT = 1526))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
)
)
SID_LIST_LISTENERIT =
(SID_LIST =
(SID_DESC =
(ORACLE_HOME= /u02/app/oracle/product/11.2.0.4/dbhome_1)
(SID_NAME = dcstdb)
(GLOBAL_DBNAME= dcstdb.xxx.com)
)
)
#LISTENERIT=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENERIT)))) # line added by Agent
# listener.ora Network Configuration File: /u01/app/11.2.0.4/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON
LISTENERNBL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = LISTENERNBL))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENERNBL = ON
LISTENER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON
LISTENER_SCAN1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = LISTENER_SCAN1))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENERIT=ON # line added by Agent
Login as "oracle" user
oracle@dcstdb] mkdir -p /u02/app/oracle/admin/dcstdb/adump
oracle@dcstdb [/u02]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 11 02:01:03 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/initdcstdb1.ora'
ORACLE instance started.
Total System Global Area 8551575552 bytes
Fixed Size 2222664 bytes
Variable Size 4630513080 bytes
Database Buffers 3909091328 bytes
Redo Buffers 9748480 bytes
SQL>
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS TRUE TRUE FALSE
>> update TNSNAMES.ora in STANDBY
oracle@dcstdb [/home/oracle]$ cd $ORACLE_HOME/network/admin
DCPDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDEASS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1526))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcpdb.xxx.com)
)
)
DCSTDBSCAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-scan.xxx.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcstdb.xxx.com)
)
)
DCSTDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-vip.xxx.com)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcstdb.xxx.com)
)
)
oracle@dcstdb [/u02/app/oracle/product/11.2.0.4/dbhome_1/network/admin]$
oracle@dcstdb] mkdir -p /u02/app/oracle/admin/dcstdb/adump
oracle@dcstdb [/u02]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Sep 11 02:01:03 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile='/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/initdcstdb1.ora'
ORACLE instance started.
Total System Global Area 8551575552 bytes
Fixed Size 2222664 bytes
Variable Size 4630513080 bytes
Database Buffers 3909091328 bytes
Redo Buffers 9748480 bytes
SQL>
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS TRUE TRUE FALSE
oracle@dcstdb [/home/oracle]$ cd $ORACLE_HOME/network/admin
DCPDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDEASS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1525))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb1-vip.xxx.com)(PORT = 1526))
(ADDRESS = (PROTOCOL = TCP)(HOST = dcpdb2-vip.xxx.com)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcpdb.xxx.com)
)
)
DCSTDBSCAN =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-scan.xxx.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcstdb.xxx.com)
)
)
DCSTDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dcstdb-vip.xxx.com)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dcstdb.xxx.com)
)
)
oracle@dcstdb [/u02/app/oracle/product/11.2.0.4/dbhome_1/network/admin]$
>> SPFILE Location add to PFILE and Startup in NOMOUNT
SQL> startup nomount pfile='/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/initdcstdb1.ora'
ORACLE instance started.
Total System Global Area 8551575552 bytes
Fixed Size 2222664 bytes
Variable Size 4630513080 bytes
Database Buffers 3909091328 bytes
Redo Buffers 9748480 bytes
SQL>
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS TRUE TRUE FALSE
>>> Create RAC Physical Standby Database
> Login to PRIMARY as "oracle" user
oracle@dcpdb1 [/home/oracle]$
oracle@dcpdb1 [/home/oracle]$ rman target sys/***@dcpdb AUXILIARY sys/***@dcstdb
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Sep 18 10:50:56 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: DCPDB (DBID=400141228)
connected to auxiliary database: DCPDB (not mounted)
RMAN>
RMAN> duplicate target database for standby from active database;
Starting Duplicate Db at 18-SEP-15
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=589 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/orapwdcpdb2' auxiliary format
'/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/orapwdcstdb' ;
}
executing Memory Script
Starting backup at 18-SEP-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4712 instance=dcpdb2 device type=DISK
Finished backup at 18-SEP-15
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '+REDO/dcstdb/controlfile/current.256.890742463';
restore clone controlfile to '+CONTROL/dcstdb/controlfile/current.256.890742463' from
'+REDO/dcstdb/controlfile/current.256.890742463';
sql clone "create spfile from memory";
shutdown clone immediate;
startup clone nomount;
sql clone "alter system set control_files =
''+REDO/dcstdb/controlfile/current.256.890742463'', ''+CONTROL/dcstdb/controlfile/current.256.890742463'' comment=
''Set by RMAN'' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
Starting backup at 18-SEP-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/snapcf_dcpdb2.f tag=TAG20150918T105114 RECID=2 STAMP=890736675
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 18-SEP-15
Starting restore at 18-SEP-15
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 18-SEP-15
sql statement: create spfile from memory
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 8551575552 bytes
Fixed Size 2222664 bytes
Variable Size 4580181432 bytes
Database Buffers 3959422976 bytes
Redo Buffers 9748480 bytes
sql statement: alter system set control_files = ''+REDO/dcstdb/controlfile/current.256.890742463'', ''+CONTROL/dcstdb/controlfile/current.256.890742463'' comment= ''Set by RMAN'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 8551575552 bytes
Fixed Size 2222664 bytes
Variable Size 4580181432 bytes
Database Buffers 3959422976 bytes
Redo Buffers 9748480 bytes
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
contents of Memory Script:
{
set newname for tempfile 1 to
"+data";
switch clone tempfile all;
set newname for datafile 1 to
"+data";
set newname for datafile 2 to
"+data";
set newname for datafile 3 to
"+data";
set newname for datafile 4 to
"+data";
set newname for datafile 5 to
"+data";
set newname for datafile 6 to
"+data";
set newname for datafile 7 to
"+data";
set newname for datafile 8 to
"+data";
set newname for datafile 9 to
"+data";
set newname for datafile 10 to
"+data";
set newname for datafile 11 to
"+data";
set newname for datafile 12 to
"+data";
backup as copy reuse
datafile 1 auxiliary format
"+data" datafile
2 auxiliary format
"+data" datafile
3 auxiliary format
"+data" datafile
4 auxiliary format
"+data" datafile
5 auxiliary format
"+data" datafile
6 auxiliary format
"+data" datafile
7 auxiliary format
"+data" datafile
8 auxiliary format
"+data" datafile
9 auxiliary format
"+data" datafile
10 auxiliary format
"+data" datafile
11 auxiliary format
"+data" datafile
12 auxiliary format
"+data" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to +data in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 18-SEP-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=+DATA/dcpdb/datafile/nblt24data.263.887453597
output file name=+DATA/dcstdb/datafile/nblt24data.260.890742533 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=+DATA/dcpdb/datafile/nblt24data.264.887453755
output file name=+DATA/dcstdb/datafile/nblt24data.259.890742947 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00008 name=+DATA/dcpdb/datafile/nblt24data.265.887453927
output file name=+DATA/dcstdb/datafile/nblt24data.258.890743363 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00009 name=+DATA/dcpdb/datafile/nblt24index.266.887454043
output file name=+DATA/dcstdb/datafile/nblt24index.257.890743779 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00010 name=+DATA/dcpdb/datafile/nblt24data.267.887454217
output file name=+DATA/dcstdb/datafile/nblt24data.256.890744195 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00011 name=+DATA/dcpdb/datafile/nblt24data.268.887454323
output file name=+DATA/dcstdb/datafile/nblt24data.262.890744611 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00012 name=+DATA/dcpdb/datafile/nblt24data.269.887454447
output file name=+DATA/dcstdb/datafile/nblt24data.263.890745025 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA/dcpdb/datafile/undotbs2.261.887275155
output file name=+DATA/dcstdb/datafile/undotbs2.264.890745441 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA/dcpdb/datafile/undotbs1.258.887274937
output file name=+DATA/dcstdb/datafile/undotbs1.265.890745527 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA/dcpdb/datafile/sysaux.257.887274937
output file name=+DATA/dcstdb/datafile/sysaux.266.890745591 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/dcpdb/datafile/system.256.887274937
output file name=+DATA/dcstdb/datafile/system.267.890745629 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/dcpdb/datafile/users.259.887274937
output file name=+DATA/dcstdb/datafile/users.268.890745653 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 18-SEP-15
sql statement: alter system archive log current
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=2 STAMP=890746260 file name=+DATA/dcstdb/datafile/system.267.890745629
datafile 2 switched to datafile copy
input datafile copy RECID=3 STAMP=890746260 file name=+DATA/dcstdb/datafile/sysaux.266.890745591
datafile 3 switched to datafile copy
input datafile copy RECID=4 STAMP=890746260 file name=+DATA/dcstdb/datafile/undotbs1.265.890745527
datafile 4 switched to datafile copy
input datafile copy RECID=5 STAMP=890746260 file name=+DATA/dcstdb/datafile/users.268.890745653
datafile 5 switched to datafile copy
input datafile copy RECID=6 STAMP=890746260 file name=+DATA/dcstdb/datafile/undotbs2.264.890745441
datafile 6 switched to datafile copy
input datafile copy RECID=7 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.260.890742533
datafile 7 switched to datafile copy
input datafile copy RECID=8 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.259.890742947
datafile 8 switched to datafile copy
input datafile copy RECID=9 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.258.890743363
datafile 9 switched to datafile copy
input datafile copy RECID=10 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24index.257.890743779
datafile 10 switched to datafile copy
input datafile copy RECID=11 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.256.890744195
datafile 11 switched to datafile copy
input datafile copy RECID=12 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.262.890744611
datafile 12 switched to datafile copy
input datafile copy RECID=13 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.263.890745025
Finished Duplicate Db at 18-SEP-15
RMAN>
RMAN>
ORACLE instance started.
Total System Global Area 8551575552 bytes
Fixed Size 2222664 bytes
Variable Size 4630513080 bytes
Database Buffers 3909091328 bytes
Redo Buffers 9748480 bytes
SQL>
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS TRUE TRUE FALSE
>>> Create RAC Physical Standby Database
> Login to PRIMARY as "oracle" user
oracle@dcpdb1 [/home/oracle]$
oracle@dcpdb1 [/home/oracle]$ rman target sys/***@dcpdb AUXILIARY sys/***@dcstdb
Recovery Manager: Release 11.2.0.4.0 - Production on Fri Sep 18 10:50:56 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: DCPDB (DBID=400141228)
connected to auxiliary database: DCPDB (not mounted)
RMAN>
RMAN> duplicate target database for standby from active database;
Starting Duplicate Db at 18-SEP-15
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=589 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/orapwdcpdb2' auxiliary format
'/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/orapwdcstdb' ;
}
executing Memory Script
Starting backup at 18-SEP-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4712 instance=dcpdb2 device type=DISK
Finished backup at 18-SEP-15
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '+REDO/dcstdb/controlfile/current.256.890742463';
restore clone controlfile to '+CONTROL/dcstdb/controlfile/current.256.890742463' from
'+REDO/dcstdb/controlfile/current.256.890742463';
sql clone "create spfile from memory";
shutdown clone immediate;
startup clone nomount;
sql clone "alter system set control_files =
''+REDO/dcstdb/controlfile/current.256.890742463'', ''+CONTROL/dcstdb/controlfile/current.256.890742463'' comment=
''Set by RMAN'' scope=spfile";
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script
Starting backup at 18-SEP-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u02/app/oracle/product/11.2.0.4/dbhome_1/dbs/snapcf_dcpdb2.f tag=TAG20150918T105114 RECID=2 STAMP=890736675
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 18-SEP-15
Starting restore at 18-SEP-15
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 18-SEP-15
sql statement: create spfile from memory
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 8551575552 bytes
Fixed Size 2222664 bytes
Variable Size 4580181432 bytes
Database Buffers 3959422976 bytes
Redo Buffers 9748480 bytes
sql statement: alter system set control_files = ''+REDO/dcstdb/controlfile/current.256.890742463'', ''+CONTROL/dcstdb/controlfile/current.256.890742463'' comment= ''Set by RMAN'' scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 8551575552 bytes
Fixed Size 2222664 bytes
Variable Size 4580181432 bytes
Database Buffers 3959422976 bytes
Redo Buffers 9748480 bytes
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
contents of Memory Script:
{
set newname for tempfile 1 to
"+data";
switch clone tempfile all;
set newname for datafile 1 to
"+data";
set newname for datafile 2 to
"+data";
set newname for datafile 3 to
"+data";
set newname for datafile 4 to
"+data";
set newname for datafile 5 to
"+data";
set newname for datafile 6 to
"+data";
set newname for datafile 7 to
"+data";
set newname for datafile 8 to
"+data";
set newname for datafile 9 to
"+data";
set newname for datafile 10 to
"+data";
set newname for datafile 11 to
"+data";
set newname for datafile 12 to
"+data";
backup as copy reuse
datafile 1 auxiliary format
"+data" datafile
2 auxiliary format
"+data" datafile
3 auxiliary format
"+data" datafile
4 auxiliary format
"+data" datafile
5 auxiliary format
"+data" datafile
6 auxiliary format
"+data" datafile
7 auxiliary format
"+data" datafile
8 auxiliary format
"+data" datafile
9 auxiliary format
"+data" datafile
10 auxiliary format
"+data" datafile
11 auxiliary format
"+data" datafile
12 auxiliary format
"+data" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to +data in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 18-SEP-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=+DATA/dcpdb/datafile/nblt24data.263.887453597
output file name=+DATA/dcstdb/datafile/nblt24data.260.890742533 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00007 name=+DATA/dcpdb/datafile/nblt24data.264.887453755
output file name=+DATA/dcstdb/datafile/nblt24data.259.890742947 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00008 name=+DATA/dcpdb/datafile/nblt24data.265.887453927
output file name=+DATA/dcstdb/datafile/nblt24data.258.890743363 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00009 name=+DATA/dcpdb/datafile/nblt24index.266.887454043
output file name=+DATA/dcstdb/datafile/nblt24index.257.890743779 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00010 name=+DATA/dcpdb/datafile/nblt24data.267.887454217
output file name=+DATA/dcstdb/datafile/nblt24data.256.890744195 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00011 name=+DATA/dcpdb/datafile/nblt24data.268.887454323
output file name=+DATA/dcstdb/datafile/nblt24data.262.890744611 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00012 name=+DATA/dcpdb/datafile/nblt24data.269.887454447
output file name=+DATA/dcstdb/datafile/nblt24data.263.890745025 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA/dcpdb/datafile/undotbs2.261.887275155
output file name=+DATA/dcstdb/datafile/undotbs2.264.890745441 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA/dcpdb/datafile/undotbs1.258.887274937
output file name=+DATA/dcstdb/datafile/undotbs1.265.890745527 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA/dcpdb/datafile/sysaux.257.887274937
output file name=+DATA/dcstdb/datafile/sysaux.266.890745591 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/dcpdb/datafile/system.256.887274937
output file name=+DATA/dcstdb/datafile/system.267.890745629 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/dcpdb/datafile/users.259.887274937
output file name=+DATA/dcstdb/datafile/users.268.890745653 tag=TAG20150918T105223
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 18-SEP-15
sql statement: alter system archive log current
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=2 STAMP=890746260 file name=+DATA/dcstdb/datafile/system.267.890745629
datafile 2 switched to datafile copy
input datafile copy RECID=3 STAMP=890746260 file name=+DATA/dcstdb/datafile/sysaux.266.890745591
datafile 3 switched to datafile copy
input datafile copy RECID=4 STAMP=890746260 file name=+DATA/dcstdb/datafile/undotbs1.265.890745527
datafile 4 switched to datafile copy
input datafile copy RECID=5 STAMP=890746260 file name=+DATA/dcstdb/datafile/users.268.890745653
datafile 5 switched to datafile copy
input datafile copy RECID=6 STAMP=890746260 file name=+DATA/dcstdb/datafile/undotbs2.264.890745441
datafile 6 switched to datafile copy
input datafile copy RECID=7 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.260.890742533
datafile 7 switched to datafile copy
input datafile copy RECID=8 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.259.890742947
datafile 8 switched to datafile copy
input datafile copy RECID=9 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.258.890743363
datafile 9 switched to datafile copy
input datafile copy RECID=10 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24index.257.890743779
datafile 10 switched to datafile copy
input datafile copy RECID=11 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.256.890744195
datafile 11 switched to datafile copy
input datafile copy RECID=12 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.262.890744611
datafile 12 switched to datafile copy
input datafile copy RECID=13 STAMP=890746260 file name=+DATA/dcstdb/datafile/nblt24data.263.890745025
Finished Duplicate Db at 18-SEP-15
RMAN>
RMAN>
>> Login to STANDBY
Login DCSTDB as oracle:
sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 14 14:23:29 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
SQL> alter database flashback on;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL>
SQL> select database_role,PROTECTION_MODE,PROTECTION_LEVEL from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
---------------- -------------------- --------------------
PHYSICAL STANDBY MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
SQL> alter database open read only;
Database altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Database altered.
SQL>
SQL> select database_role,PROTECTION_MODE,PROTECTION_LEVEL from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
---------------- -------------------- --------------------
PHYSICAL STANDBY MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
SQL> SELECT sequence#, first_time, next_time, applied FROM v$archived_log ORDER BY sequence# desc;
SEQUENCE# FIRST_TIM NEXT_TIME APPLIED
---------- --------- --------- ---------
73 26-DEC-15 28-DEC-15 IN-MEMORY
72 23-DEC-15 26-DEC-15 YES
71 20-DEC-15 23-DEC-15 YES
70 17-DEC-15 20-DEC-15 YES
69 14-DEC-15 17-DEC-15 YES
68 14-DEC-15 14-DEC-15 YES
67 14-DEC-15 14-DEC-15 YES
66 14-DEC-15 14-DEC-15 YES
65 14-DEC-15 14-DEC-15 YES
64 14-DEC-15 14-DEC-15 YES
63 14-DEC-15 14-DEC-15 YES
>> SPFILE CREATE as per location input to PFILE
SQL> create pfile from spfile;
SQL> create spfile='+DATA/dcstdb/spfiledcstdb.ora' from pfile;
sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 14 14:23:29 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
NO
SQL> alter database flashback on;
Database altered.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
SQL>
SQL> select database_role,PROTECTION_MODE,PROTECTION_LEVEL from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
---------------- -------------------- --------------------
PHYSICAL STANDBY MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
SQL> alter database open read only;
Database altered.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Database altered.
SQL>
SQL> select database_role,PROTECTION_MODE,PROTECTION_LEVEL from v$database;
DATABASE_ROLE PROTECTION_MODE PROTECTION_LEVEL
---------------- -------------------- --------------------
PHYSICAL STANDBY MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
SQL> SELECT sequence#, first_time, next_time, applied FROM v$archived_log ORDER BY sequence# desc;
SEQUENCE# FIRST_TIM NEXT_TIME APPLIED
---------- --------- --------- ---------
73 26-DEC-15 28-DEC-15 IN-MEMORY
72 23-DEC-15 26-DEC-15 YES
71 20-DEC-15 23-DEC-15 YES
70 17-DEC-15 20-DEC-15 YES
69 14-DEC-15 17-DEC-15 YES
68 14-DEC-15 14-DEC-15 YES
67 14-DEC-15 14-DEC-15 YES
66 14-DEC-15 14-DEC-15 YES
65 14-DEC-15 14-DEC-15 YES
64 14-DEC-15 14-DEC-15 YES
63 14-DEC-15 14-DEC-15 YES
>> SPFILE CREATE as per location input to PFILE
SQL> create pfile from spfile;
SQL> create spfile='+DATA/dcstdb/spfiledcstdb.ora' from pfile;
No comments:
Post a Comment