Reconfigure RAC from single scan vip to three scan vip

Artical: Reconfigure rac from single scan vip to three scan vip

Step-1
======
Node-1 Configured as DNS Server.
yum install bind-chroot

Step-2
======
[root@ocm1 ~]# cat /var/named/chroot/etc/named.conf
options {
listen-on port 53 { 127.0.0.1; 192.168.56.101; };
directory “/var/named”;
dump-file “/var/named/data/cache_dump.db”;
statistics-file “/var/named/data/named_stats.txt”;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;

// My Additions
// Forwarder: Anything this DNS can’t resolve gets forwarded to my ISPs DNS.
forwarders { 192.168.56.1; };
// End My Additions
};

zone “hitgon.com.” IN {
type master;
file “hitgon.com.zone”;
allow-update { none; };
};

zone “1.168.192.in-addr.arpa.” IN {
type master;
file “1.168.192.in-addr.arpa”;
allow-update { none; };
};

include “/etc/rndc.key”;
Step-3
======
[root@ocm1 ~]# cat /var/named/chroot/var/named/hitgon.com.zone
$TTL 86400
@ IN SOA localhost root.localhost (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
ocm1 IN A 192.168.56.101
ocm2 IN A 192.168.56.102
ocm1-vip IN A 192.168.56.103
ocm2-vip IN A 192.168.56.104
ocm1-priv IN A 10.10.0.1
ocm2-priv IN A 10.10.0.2
ocm-scan IN A 192.168.56.5
ocm-scan IN A 192.168.56.6
ocm-scan IN A 192.168.56.7

Step-4
======
[root@ocm1 ~]# cat /var/named/chroot/var/named/1.168.192.in-addr.arpa
$ORIGIN 1.168.192.in-addr.arpa.
$TTL 1H
@ IN SOA ocm.hitgon.com. root.ocm.hitgon.com. ( 2
3H
1H
1W
1H )
1.168.192.in-addr.arpa. IN NS ocm.hitgon.com.

101 IN PTR ocm1.hitgon.com.
102 IN PTR ocm2.hitgon.com.
103 IN PTR ocm1-vip.hitgon.com.
104 IN PTR ocm2-vip.hitgon.com.
5 IN PTR ocm-scan.hitgon.com.
6 IN PTR ocm-scan.hitgon.com.
7 IN PTR ocm-scan.hitgon.com.

Step-5
======
#Activate and configure the named service that starts when you boot the machine. In a terminal , run as root:

service named start
chkconfig named on
Step-6
======
To finish the DNS , modify the file ” /etc/resolv.conf ” both RAC Nodes . It should look like this:
cat /etc/resolv.conf
hitgon.com search
nameserver 192.168.56.101

Step-7
======
Change the name of the hostname in Node1 .
Edit the file ” / etc / sysconfig / network ” and modify the HOSTNAME variable as follows :

HOSTNAME = ocm1.hitgon.com
In addition to change dynamically execute the following statement:

hostname ocm1.hitgon.com

Change the name of the hostname in Node2 .
Edit the file ” / etc / sysconfig / network ” and modify the HOSTNAME variable as follows :

HOSTNAME = ocm2.hitgon.com
In addition to change dynamically execute the following statement:

hostname ocm2.hitgon.com
Step-8 cat /etc/hosts should be looks line as below in Node1 and Node2
======
[root@ocm1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.56.101 ocm1.hitgon.com ocm1
192.168.56.102 ocm2.hitgon.com ocm2

192.168.56.103 ocm1-vip.hitgon.com ocm1-vip
192.168.56.104 ocm2-vip.hitgon.com ocm2-vip

10.10.0.1 ocm1-priv.hitgon.com ocm1-priv
10.10.0.2 ocm2-priv.hitgon.com ocm2-priv

NOTE-1: The SCAN IPs MUST NOT be in the /etc/hosts file. This will result in only 1 SCAN IP for the entire cluster.

NOTE-2:
If you configured the IP addresses in a DNS server, then, as the root user, change the hosts search order in
/etc/nsswitch.conf on all nodes as shown here:
Old:
hosts: files nis dns
New:
hosts: dns files nis

After modifying the nsswitch.conf file, restart the nscd daemon on each node using the following
command:
# /sbin/service nscd restart

Step-9 Verify with nslookup in all nodes – all node should show configured three IPs
======
[root@ocm1 ~]# nslookup ocm-scan.hitgon.com
Server: 192.168.56.101
Address: 192.168.56.101#53

Name: ocm-scan.hitgon.com
Address: 192.168.56.7
Name: ocm-scan.hitgon.com
Address: 192.168.56.5
Name: ocm-scan.hitgon.com
Address: 192.168.56.6

[root@ocm2 ~]# nslookup ocm-scan.hitgon.com
Server: 192.168.56.101
Address: 192.168.56.101#53

Name: ocm-scan.hitgon.com
Address: 192.168.56.6
Name: ocm-scan.hitgon.com
Address: 192.168.56.7
Name: ocm-scan.hitgon.com
Address: 192.168.56.5

Step-10 Check scan configuration
========
[root@ocm1 ~]# /u01/app/11.2.0/grid/bin/crsctl stat res -t
——————————————————————————–
NAME TARGET STATE SERVER STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.CLSTR.dg
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.DATA.dg
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.FRA.dg
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.LISTENER.lsnr
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.asm
ONLINE ONLINE ocm1 Started
ONLINE ONLINE ocm2 Started
ora.gsd
OFFLINE OFFLINE ocm1
OFFLINE OFFLINE ocm2
ora.net1.network
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.ons
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.registry.acfs
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
1 OFFLINE OFFLINE
ora.cvu
1 ONLINE ONLINE ocm1
ora.oc4j
1 ONLINE ONLINE ocm1
ora.ocm.db
1 ONLINE ONLINE ocm1 Open
2 ONLINE OFFLINE Instance Shutdown
ora.ocm1.vip
1 ONLINE ONLINE ocm1
ora.ocm2.vip
1 ONLINE ONLINE ocm2
ora.scan1.vip
1 ONLINE ONLINE ocm1

[root@ocm1 ~]# /u01/app/11.2.0/grid/bin/srvctl config scan
SCAN name: ocm-scan, Network: 1/192.168.56.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /ocm-scan/192.168.56.105
Step-11 Modify scan configuration
========
[root@ocm1 ~]# /u01/app/11.2.0/grid/bin/srvctl modify scan -n ocm-scan.hitgon.com

[root@ocm1 ~]# /u01/app/11.2.0/grid/bin/srvctl modify scan_listener -u

[root@ocm1 ~]# /u01/app/11.2.0/grid/bin/srvctl config scan
SCAN name: ocm-scan.hitgon.com, Network: 1/192.168.56.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /ocm-scan.hitgon.com/192.168.56.7
SCAN VIP name: scan2, IP: /ocm-scan.hitgon.com/192.168.56.5
SCAN VIP name: scan3, IP: /ocm-scan.hitgon.com/192.168.56.6

[root@ocm1 ~]# /u01/app/11.2.0/grid/bin/srvctl start scan_listener
[root@ocm1 ~]#
[root@ocm1 ~]# /u01/app/11.2.0/grid/bin/srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node ocm2
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node ocm1
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node ocm1
[oracle@ocm1 ~]$ crsctl stat res -t
——————————————————————————–
NAME TARGET STATE SERVER STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.CLSTR.dg
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.DATA.dg
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.FRA.dg
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.LISTENER.lsnr
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.asm
ONLINE ONLINE ocm1 Started
ONLINE ONLINE ocm2 Started
ora.gsd
OFFLINE OFFLINE ocm1
OFFLINE OFFLINE ocm2
ora.net1.network
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.ons
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
ora.registry.acfs
ONLINE ONLINE ocm1
ONLINE ONLINE ocm2
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE ocm2
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE ocm1
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE ocm1
ora.cvu
1 ONLINE ONLINE ocm1
ora.oc4j
1 ONLINE ONLINE ocm1
ora.ocm.db
1 ONLINE ONLINE ocm1 Open
2 ONLINE OFFLINE Instance Shutdown
ora.ocm1.vip
1 ONLINE ONLINE ocm1
ora.ocm2.vip
1 ONLINE ONLINE ocm2
ora.scan1.vip
1 ONLINE ONLINE ocm2
ora.scan2.vip
1 ONLINE ONLINE ocm1
ora.scan3.vip
1 ONLINE ONLINE ocm1
Step-12 Change in scan listener initialization parameter – remote_listener
=======
sqlplus / as sysdba
SQL> show parameter listener

NAME TYPE VALUE
———————————— ———– ——————————
listener_networks string
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=192.
168.56.104)(PORT=1521))))
remote_listener string ocm-scan:1521
SQL> alter system set remote_listener=’ocm-scan.hitgon.com:1521′;

$srvctl stop database -d ocm
$srvctl start database -d ocm

Step-13 Verify the Database Connectivity using scan vip
=======
[oracle@ocm1 ~]$ cat /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

OCM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ocm-scan.hitgon.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ocm)
)
)

[oracle@ocm2 ~]$ cat /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# tnsnames.ora.ocm2 Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora.ocm2
# Generated by Oracle configuration tools.

OCM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ocm-scan.hitgon.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ocm)
)
)
[oracle@ocm1 ~]$ tnsping ocm

TNS Ping Utility for Linux: Version 11.2.0.3.0 – Production on 09-JUL-2016 12:59:20

Copyright (c) 1997, 2011, Oracle. All rights reserved.

Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ocm-scan.hitgon.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ocm)))
OK (0 msec)
[oracle@ocm1 ~]$
[oracle@ocm1 ~]$ sqlplus scott/tiger@ocm

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jul 9 12:59:28 2016

Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> exit

[oracle@ocm2 ~]$ tnsping ocm

TNS Ping Utility for Linux: Version 11.2.0.3.0 – Production on 09-JUL-2016 11:58:17

Copyright (c) 1997, 2011, Oracle. All rights reserved.

Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ocm-scan.hitgon.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ocm)))
OK (0 msec)
[oracle@ocm2 ~]$ sqlplus scott/tiger@ocm

SQL*Plus: Release 11.2.0.3.0 Production on Sat Jul 9 11:58:24 2016

Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> exit
Reference
=========
http://facedba.blogspot.in/2014/12/configuring-three-ips-for-scan-listener.html
https://oracle-base.com/articles/linux/dns-configuration-for-scan
http://www.freeoraclehelp.com/2011/09/11gr2-rac-scan-dns-bind-configuration.html

RAC to RAC DG – ARCHIVELOG GAP RECOVERY SCENARION

On primary :

SELECT ARCH.THREAD# “Thread”, ARCH.SEQUENCE# “Last Sequence Received”, APPL.SEQUENCE# “Last Sequence Applied”, (ARCH.SEQUENCE# – APPL.SEQUENCE#) “Difference” FROM
(SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
(SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
WHERE
ARCH.THREAD# = APPL.THREAD#
ORDER BY 1;

On Standby :

SELECT ARCH.THREAD# “Thread”, ARCH.SEQUENCE# “Last Sequence Received”, APPL.SEQUENCE# “Last Sequence Applied”, (ARCH.SEQUENCE# – APPL.SEQUENCE#) “Difference” FROM
(SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
(SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
WHERE
ARCH.THREAD# = APPL.THREAD#
ORDER BY 1;

SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;

=============================ARCHIVELOG GAP RECOVERY SCENARION====================================================

On Standby :

SELECT TO_CHAR(CURRENT_SCN) FROM v$DATABASE;

—————
24848626949

On Primary :

rman target /

run
{
allocate channel c1 type disk format ‘/SMP_Logs/rman/%U.rmb’;
backup incremental from scn 24848626949 database;
BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT ‘/SMP_Logs/rman/ForStandbyCTRL.bck’;
}

SCP backup* to standby;

On Standby:

srvctl stop database -d piapdr

startup nomount

rman target /

restore standby controlfile from ‘/u01/rman/ForStandbyCTRL.bck’;

sqlplus / as sysdba >> Both node

ALTER DATABASE MOUNT;

rman target /

catalog start with ‘/u01/rman/’;

catalog start with ‘+ORADATA1’;
catalog start with ‘+ORADATA2’;

report schema;

Note : Check Size column is shouldn’t be contain zero (0) values if yes than follow below steps for each datafiles which is has 0 values.

run
{
set newname for datafile 1 to ‘+ORADATA1/piapdr/datafile/SYSTEM.326.909536701’;
}

run
{
restore datafile 2;
}
run

run

{
set newname for datafile 2 to ‘+ORADATA1/piapdr/datafile/SYSAUX.325.909536707’;
}

run
{
restore datafile 2;
}
run

{
set newname for datafile 3 to ‘+ORADATA1/piapdr/datafile/UNDOTBS1.328.909536651’;
}

run
{
restore datafile 3;
}
run

{
set newname for datafile 4 to ‘+ORADATA1/piapdr/datafile/USERS.324.909536825’;
}

run
{
restore datafile 4;
}

run

{
set newname for datafile 44 to ‘+oradata2/piapdr/datafile/WEBINPWIFI.367.909537767’;
}

run
{
restore datafile 44;
}

ALTER DATABASE OPEN READ ONLY; ===== Both nodes.

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT USING SESSION;

Create Oracle11g Database in existing Oracle12c RAC / ASM Deployment

Article: Create Oracle11g Database in existing Oracle12c RAC / ASM Deployment
#Existing Deployment
Oracle12c v12.1.0.2.0 2-Node RAC / ASM
Oracle12c RAC Database is deployed

#Challenge
Install New 11g v11.2.0.4.0 Database in existing environment

#Silent Software Installation of Oracle 11g v11.2.0.4.0 RAC Database
Silent oracle11g db software installation

–ignoreSysPrereqs is not working when using silent file
./runInstaller -ignoreSysPrereqs -silent -responseFile /home/oracle/database/response/db_install.rsp

-bash-4.2$ ./runInstaller -silent -responseFile /home/oracle/database/response/db_install.rsp
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 120 MB. Actual 8540 MB Passed
Checking swap space: must be greater than 150 MB. Actual 16383 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-06-22_09-46-57AM. Please wait …-bash-4.2$ [FATAL] [INS-13013] Target environment do not meet some mandatory requirements.
CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/installActions2016-06-22_09-46-57AM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/installActions2016-06-22_09-46-57AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.

–ignoreSysPrereqs is working fine when using in command line

./runInstaller -silent
-ignoreSysPrereqs
-ignorePrereq
-responseFile /home/oracle/database/response/db_install.rsp
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11204/db_2
ORACLE_HOME_NAME=db_2
oracle.install.option=INSTALL_DB_SWONLY
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
DECLINE_SECURITY_UPDATES=true
oracle.install.db.CLUSTER_NODES=csm-clstrnode1,csm-clstrnode2
‘-ignoreInternalDriverError’

-bash-4.2$ ./runInstaller -silent
> -ignoreSysPrereqs
> -ignorePrereq
> -responseFile /home/oracle/database/response/db_install.rsp
> ORACLE_BASE=/u01/app/oracle
> ORACLE_HOME=/u01/app/oracle/product/11204/db_2
> ORACLE_HOME_NAME=db_2
> oracle.install.option=INSTALL_DB_SWONLY
> oracle.install.db.InstallEdition=EE
> oracle.install.db.DBA_GROUP=dba
> oracle.install.db.OPER_GROUP=oper
> DECLINE_SECURITY_UPDATES=true
> oracle.install.db.CLUSTER_NODES=csm-clstrnode1,csm-clstrnode2
> ‘-ignoreInternalDriverError’
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 120 MB. Actual 8537 MB Passed
Checking swap space: must be greater than 150 MB. Actual 16383 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-06-22_10-13-57AM. Please wait …-bash-4.2$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2016-06-22_10-13-57AM.log
SEVERE:Remote ‘AttachHome’ failed on nodes: ‘csm-clstrnode2’. Refer to ‘/u01/app/oraInventory/logs/installActions2016-06-22_10-13-57AM.log’ for details.
It is recommended that the following command needs to be manually run on the failed nodes:
/u01/app/oracle/product/11204/db_2/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/oracle/product/11204/db_2 ORACLE_HOME_NAME=db_2 CLUSTER_NODES=csm-clstrnode1,csm-clstrnode2 “INVENTORY_LOCATION=/u01/app/oraInventory” LOCAL_NODE=.
Please refer ‘AttachHome’ logs under central inventory of remote nodes where failure occurred for more details.
The installation of Oracle Database 11g was successful on the local node but failed on remote nodes.
Please check ‘/u01/app/oraInventory/logs/silentInstall2016-06-22_10-13-57AM.log’ for more details.

As a root user, execute the following script(s):
1. /u01/app/oracle/product/11204/db_2/root.sh

Execute /u01/app/oracle/product/11204/db_2/root.sh on the following nodes:
[csm-clstrnode1, csm-clstrnode2]

Successfully Setup Software.

#Oracle11g v11.2.0.4.0 RAC DB Creation using DBCA Command line options

./dbca -silent
-createDatabase
-templateName General_Purpose.dbc
-gdbName csmqa
-sid csmqa
-SysPassword oracleqa
-SystemPassword oracleqa
-emConfiguration NONE
-redoLogFileSize 100
-recoveryAreaDestination DATA
-storageType ASM
-asmSysPassword oracleqa
-diskGroupName DATA
-characterSet AL32UTF8
-nationalCharacterSet AL16UTF16
-totalMemory 4096
-databaseType MULTIPURPOSE
-nodelist csm-clstrnode1,csm-clstrnode2

-bash-4.2$ ./dbca -silent
> -createDatabase
> -templateName General_Purpose.dbc
> -gdbName csmqa
> -sid csmqa
> -SysPassword oracleqa
> -SystemPassword oracleqa
> -emConfiguration NONE
> -redoLogFileSize 100
> -recoveryAreaDestination DATA
> -storageType ASM
> -asmSysPassword oracleqa
> -diskGroupName DATA
> -characterSet AL32UTF8
> -nationalCharacterSet AL16UTF16
> -totalMemory 4096
> -databaseType MULTIPURPOSE
> -nodelist csm-clstrnode1,csm-clstrnode2
Copying database files
1% complete
3% complete
9% complete
15% complete
21% complete
30% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
44% complete
45% complete
48% complete
50% complete
Creating cluster database views
52% complete
70% complete
Completing Database Creation
73% complete
76% complete
85% complete
94% complete
100% complete
Look at the log file “/u01/app/oracle/cfgtoollogs/dbca/csmqa/csmqa.log” for further details.

#Verify the newly created database deployment
SQL> select name from v$controlfile;

NAME
——————————————————————————–
+DATA/csmqa/controlfile/current.2132.915203609
+DATA/csmqa/controlfile/current.2136.915203609

SQL> show parameter spfile

NAME TYPE VALUE
———————————— ———– ——————————
spfile string +DATA/csmqa/spfilecsmqa.ora
SQL>
SQL> select member from v$logfile;

MEMBER
——————————————————————————–
+DATA/csmqa/onlinelog/group_2.2137.915203613
+DATA/csmqa/onlinelog/group_2.2128.915203613
+DATA/csmqa/onlinelog/group_1.2126.915203613
+DATA/csmqa/onlinelog/group_1.2131.915203613
+DATA/csmqa/onlinelog/group_3.2129.915203695
+DATA/csmqa/onlinelog/group_3.2139.915203695
+DATA/csmqa/onlinelog/group_4.2140.915203695
+DATA/csmqa/onlinelog/group_4.2141.915203695

SQL> show parameter spfile

NAME TYPE VALUE
———————————— ———– ——————————
spfile string +DATA/csmqa/spfilecsmqa.ora

SQL> show parameter memory

NAME TYPE VALUE
———————————— ———– ——————————
hi_shared_memory_address integer 0
memory_max_target big integer 0
memory_target big integer 0
shared_memory_address integer 0
SQL>
SQL> show parameter sga

NAME TYPE VALUE
———————————— ———– ——————————
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 3G
sga_target big integer 3G
SQL>
SQL> show parameter pga

NAME TYPE VALUE
———————————— ———– ——————————
pga_aggregate_target big integer 1G

#Data Migration
expdp userid = “‘ / as sysdba'” DIRECTORY=DATA_PUMP_DIR schemas=NV662,DHAVALNV680,DHAVALNV660,DHAVALNV648 dumpfile=exp_QA_220616.dmp logfile=log_QA_220616.log

-bash-4.2$ cat create_schema.sql
CREATE TABLESPACE &&TABLESPACE_NAME DATAFILE ‘+DATA’ size 10m autoextend on;

CREATE USER &&USERNAME IDENTIFIED BY &&USERNAME
DEFAULT TABLESPACE &&TABLESPACE_NAME
QUOTA UNLIMITED ON &&TABLESPACE_NAME;

GRANT READ,WRITE ON DIRECTORY DATA_PUMP_DIR TO &&USERNAME;

GRANT CONNECT,RESOURCE TO &&USERNAME;

impdp userid = “‘ / as sysdba'” DIRECTORY=DATA_PUMP_DIR schemas=NV662,DHAVALNV680,DHAVALNV660,DHAVALNV648 dumpfile=exp_QA_220616.dmp logfile=log_QA_220616.log

Database runInstaller “Nodes Selection” Window Does not Show Cluster Nodes

Oracle Metalink – Doc ID 1327486.1

Oracle Database Enterprise Edition Version 10.2.0.1 and later
Information in this document applies to any platform.
SYMPTOMS
Oracle Clusterware (CRS or GI) is up and running as confirmed by “${clusterwarehome}/
bin/crsctl check crs” on all nodes, and “${clusterwarehome}/bin/olsnodes n”
show’s all nodes, however database installer does not see all cluster nodes.

CAUSE
Inventory for Oracle Clusterware home is incorrect.

SOLUTION
To fix the inventory for Oracle Clusterware home, as clusterware user:
${clusterwarehome}/
oui/bin/runInstaller silent
ignoreSysPrereqs
updateNodeList
ORACLE_HOME=”${clusterwarehome}”
LOCAL_NODE= CLUSTER_NODES=”{,
,}” CRS=true
For example, to update clusterware home (/ocw/grid) inventory for 2node
(racprod1, racprod2) system
on node1:
/ocw/grid/oui/bin/runInstaller silent
ignoreSysPrereqs
updateNodeList
ORACLE_HOME=”/ocw/grid”
LOCAL_NODE=”racprod1″ CLUSTER_NODES=”{racprod1,racprod2}” CRS=true
Note: “CRS=true” flag can only be set for active clusterware home, refer to note 1053393.1 for
details

/u01/app/11.2.0/grid/oui/bin/runInstaller -updateNodeList  ORACLE_HOME="/u01/app/11.2.0/grid" CRS=true

Cannot See ASM Disks From Asmca when using udev rules on rhel 6

My Environment Detail
RHEL 6.7
GIv11.2.0..3.0
DBv11.2.0.3.0

SYMPTOMS
Oracle ASM new install can’t see ASM disks from asmca after running new install.Kfod does not discover the disks as per discovery path
But we can see the devices from operating system level.
CHANGES
Using udev rules instead of asmlib
CAUSE
When reusing a LUN, ASM may detect a previous disk header and refuse to reuse the disk.
SOLUTION
Clear the header by writing 25 MB of null, after clearing the header ASMCA and KFOD can able to see the devices
For example:
# dd if=/dev/zero of=<Device path> bs=1M count=25
NOTE: Please be cautious writing zero to devices, wrong device may end up in restoring the complete data
from backup.

Issue got resolved after followed this metalink doc 🙂

Deinstalling RAC Software 11gR2 and later

1. Deinstall rac database :

cd $ORACLE_HOME/deinstall
./deinstall

2. Verify the status of the cluster and observe that the database is not available as resource in clusterware.

crsctl status res -t

3. Now login to grid ORACLE_HOME and deinstall rac clusterware.

. oraenv
+ASM1
cd $ORACLE_HOME/deinstall/
./deinstall

https://hiteshgondalia.wordpress.com/2012/11/26/how-to-manually-drop-database-in-oracle-rac-environment/
http://www.askmlabs.com/2014/03/uninstallingdeinstalling-rac-software.html

Oracle DB Migration from File System to ASM

RMAN copy backup
RMAN> backup as copy database format ‘+DATA’;

FRA Configuration

SQL> alter system set db_recovery_file_dest_size=1800m;

System altered.

SQL> alter system set db_recovery_file_dest=’+FRA’;

System altered.

OMF Configuration

SQL> alter system set db_create_file_dest=’+DATA’;

System altered.

Spfile Configuration
SQL> create spfile=’+DATA/spfileprima.ora’ from memory;

File created.

For more info refer…
https://uhesse.com/2010/12/01/database-migration-to-asm-with-short-downtime/

Installing Grid Infrastructure for a Standalone Server

Installing Grid Infrastructure for a Standalone Server

Purpose

This tutorial shows you how to install the Grid Infrastructure for a standalone server, configure Oracle Restart, move the SPFILE for an ASM instance into an ASM diskgroup.

Time to Complete

Approximately 1 hour

Topics

This tutorial covers the following topics:

Overview
Scenario
Prerequisites
Preparing to Install Grid Infrastructure
Installing Grid Infrastructure for a Standalone Server
Enabling Grid Infrastructure Features
Cleanup
Summary
Related information

Viewing Screenshots

 Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step.

Overview

This tutorial covers how to install the Oracle Grid Infrastructure for a standalone server. In the Oracle 11g Release 2, the Grid Infrastructure is required to use Automatic Storage Management (ASM), and Oracle Restart

This tutorial includes:

The required pre-installation tasks,

The installation using the Oracle Universal Installer (OUI),

The post-installation tasks to integrate the Grid infrastructure with a pre-existing database installation

Implementing Oracle Restart

Moving the SPFILE for the ASM instance into an ASM diskgroup.

Note: Best practice is to install the Grid Infrastructure before installing the database. The registration of the database and listeners with Oracle restart is automatic when they are created after Grid Infrastructure is installed.

Back to Topic List

Scenario

This tutorial has been written to operate in a VM environment, therefore the Oracle Database 11g Release 2 has already been installed. In order to take advantage of ASM, the ASM Clustered file system (ACFS) and Oracle Restart for standalone server, you must install the Grid infrastructure. You can create ASM on unformatted disk partitions. You can use ACFS as a general file system either on a single server or in a cluster. Oracle Restart manages dependencies between the database, ASM and the listener to restart these resources when they fail; it also starts them on reboot.

Back to Topic List

Prerequisites

Before starting this tutorial, you should understand the following:

1. An OS user, oracle, is the user that installed the Oracle database software, and the oracle user has a primary group of oinstall and secondary group of dba. 
2. If you are using the Oracle VM template for Oracle Database 11gR2 OBEs, the software is staged at /stage/clusterware/. You will use the Oracle Universal Installer at /stage/clusterware/Disk1/runInstaller.Note the name of the clusterware directory will change to grid with the production version of 11gR2.

If you are not using the Oracle VM template for Oracle Database 11gR2 OBEs, you need to access the runInstaller from your software directory.

 

3. There are unformatted disk partitions available to mark as ASM disks and form into an ASM diskgroup.This tutorial uses 4 drives of 500 MB each. ( this size limits the number of files that can be placed on ASM, For example the size prevents migrating the database to ASM.) These drives are named /dev/sdc, /dev/sdd, dev/sde, and /dev/sdf in this tutorial.

 

4. The asmlib rpms for your version of linux have already been installed. See the instructions on the Oracle Technical Network at http://www.oracle.com/technology/tech/linux/asmlib/index.html. for downloading and installing the proper version of the rpms for your Linux version. 
5. Download and unzip the gi_inst.zip file into your working directory which contains the files needed to perform this tutorial. 

Back to Topic List

Preparing to Install Grid Infrastructure

Oracle Database 11g Release 2 introduces the new Grid Infrastructure Oracle Home which includes Oracle Restart and Oracle Automatic Storage Management(ASM). To implement ASM, you must install Grid Infrastructure. ASM requires unformatted partitions to use as ASM disks and group into ASM diskgroups..

In this topic, you partition the disk to be used by ASM, then use oracleasm to label the the disks for discovery by ASM.

Partitioning the disks
Using oracleasm to label ASM disks

Back to Topic List

To partition the disks, perform the following steps:

1. Open a terminal window, and become the root OS user. Use the su – root command

 

2. As the root user, determine the partitions available. the following command shows all the partitions known to the OS.cat /proc/partitions

 

3. Determine which devices will be partitioned. Use the fdisk <device_name> command for each disk/dev/sdc, /dev/sdd, /dev/sde, /dev/sdf and specify the values as shown in the screenshots

 

4. Check that the expected partitions exist. Partitions named /dev/sdc1, /dev/sdd1, /dev/sde1, and /dev/sdf1should exist. Check by usingcat /proc/partitions

 

Back to Topic

To label the disks for use by ASM, perform the following steps:

1. As the root user, configure oracleasm by using the commandoracleasm configure -i

and answer the prompts as shown in the screenshot.

 

2. Initialize the asmlib with the oracleasm init command. This command loads the oracleasm module and mounts the oracleasm filesystem.

 

3. Use the oracleasm createdisk <diskname> <device_name> command to create the ASM disk label for each disk.In this tutorial name the disks DATA1, DATA2, DATA3, and DATA4 as shown in the screenshot.

 

4. Check that the disk are visible using the oracleasm listdisks command.

 

5. Check the the disks are mounted in the oracleasm filesystem with the commandls -l /dev/oracleasm/disks

 

Back to Topic

Back to Topic List

Installing Grid Infrastructure for a Standalone Server

In this topic you install the grid Infrastructure is a separate home directory. This separate home directory is a requirement for the Grid Infrastructure. You will use the Oracle Universal installer from the directory where the clusterware software is staged.

Use OUI to Install the Grid Infrastructure
Configure EM Database control to manage ASM

Back to Topic List

To install Grid Infrastructure for single Server, perform the following steps:

1. Open a terminal window as the OS user named oracle. This is the user that will own the Grid Infrastructure Installation. Change directories to the location that the clusterware software is staged.cd /stage/clusterware/Disk1

 

2. Start the installer with the command./runInstaller

 

3. On the first screen of the installer, select Install and Configure Grid Infrastructure for a Standalone Server. ClickNext.

 

4. On the Select Product Languages screen, select the languages that should be supported in this installation. For this tutorial click the  Move All button to select all the available languages. Click Next.

 

5. On the CreateASMDiskGroup screen,

  • Set Redundancy to External
  • Select the disks: ORCL:DATA1ORCL:DATA2, and ORCL:DATA3.
  • Click Next

 

6. On the Specify ASM Password page,

  • Select ‘Use same passwords for these accounts
  • Enter your password
  • Confirm the password
  • Click Next

 

7. On the Privileged Operating System Groups page,set each group to dba.

Note: these groups do not allow for job role separation. For this tutorial the database DBA and ASM administrator are assumed to be the same person, or have all the same privileges. A warning will appear. Click Yes.

 

8. On the Specify Installation Location page, the location of the database home will be shown

  • Set the Software Location to /u01/app/grid/product/11.2.0/grid.
  • Set the Oracle Base to /u01/app/grid
  • Click Next

Note: the Grid infrastructure must be installed in a separate home directory from the database

 

9. The Perform Prerequisite Check page appears and completes the checks.

You may receive a failed RunLevel. This is ok. Select the Ignore All check box and click Next.

On the Summary page, the installation settings are shown. Click Finish to complete the installation.

 

10. The setup page shows the install progress.

  • The Execute Configuration Scripts page asks you to execute a configuration script as the root user.

 

  • Open a terminal window.
  • connect as the root user. Use the su – root command to become the root user as shown in the screenshot.

  • Copy the script name, /u01/app/grid/product/11.2.0/grid/root.sh, from the Execute Configuration Scripts page into to the terminal window and execute.

 

  • When the script has completed, Click OK in the Execute Configuration Scripts page.

 

11. When the Finish page appears, with the message “The installation of Oracle Grid Infrastructure for single Server was successful”, click Close

 

Back to Topic

To Configure EM Database Control to manage ASM, perform the following steps:

1. To manage the ASM instance in Enterprise Manager Database Control. you must configure the ASM Instance as a target. When you configure the ASM target, you must provide the port for the ASM listener. The Grid Infrastructure installs a listener by default on port 1521, and configures the ASM instance to use this listener. In this tutorial the database is already installed and has a listener configured on port 1521, the Grid Infrastructure places a listener on port 1522 and the ASM instance is registered with the grid listener.In a terminal window as the oracle OS user, start EM database control with the command. If the console is already running the command will return “An instance of Oracle Enterprise Manager 11g Database Control is already running.”

emctl start dbconsole

 

2. View the EM database control home page. Invoke the browser and enter the URLhttps://host01.example.com:1158/em

When the login page appears enter:

  • User: SYS
  • Password: <your_password>
  • Connect as: SYSDBA

The database instance home page appears: notice that the ASM target is absent from the expected position below Listener in the leftmost column.

 

3.. Configure the ASM Target in EM database control.

  1. Click the Server tab.
  2. On the Server page, click Migrate to ASM.

 

4 On the Migrate Database to ASM : ASM Instance page, configure the ASM instance as a target.

  • Change the Target name to +ASM.example.com
  • Change Database Home to the ASM Home: /u01/app/grid/product/11.2.0/grid
  • Enter the SYS password
  • Change Port to: 1522
  • In Host Credentials section enter Username: oracle,and the Password
  • Click Continue

 

5. On the Migrate Database To ASM: Migration Options page click Cancel.

 

6. Create a tablespace named test with datafile named test01.dbf in the DATA diskgroup of the ASM instance1. On the Server page, in the Storage section, click Tablespaces

2. On the Tablespaces page, click Create.

3. On the Create Tablespace page,

  • enter Name: TEST
  • Click Add

4. On the Add Datafile page

  • Enter File Name: test01.dbf
  • Enter File Directory: +DATA
  • Click Continue

5. On the Create Tablespace page, click OK.

6. On the Tablespaces page confirm that the TEST tablespace has been created. Enter TEST in the search field and click Go.

7. The tablespace was created and is in the list.

 

7. In a terminal window as the oracle OS user stop, and restart EM database control with the commands.emctl stop dbconsole

emctl start dbconsole

8. View the EM database instance home page, use the URLhttps: host01.example.com:1158/em

Confirm that the ASM instance is now listed as a target.

Close your browser.

 

Back to Topic

Back to Topic List

Enabling Grid Infrastructure Features

In this topic you enable some of the grid infrastructure features. Perform the following tasks:

Enabling Oracle Restart
Move ASM spfile to ASM storage

Back to Topic List

To Enable Oracle Restart, perform the following steps:

1. Stop EM database control withemctl stop dbconsole

 

2. Determine which components are running. The pgrep -lf <string> command work well for this.

  • Use pgrep -lf orcl to see the orcl instance processes

  • Use pgrep -lf ASM to see the +ASM instance processes

  • Use pgrep -lf tns to see the listeners

 

3. Shutdown the database instance withsqlplus / as sysdba

SQL> shutdown immediate

SQL> exit

 

4. Stop the listener with the commandlsnrctl stop

 

5. In a terminal window as the oracle user, set the environment to user the ASM home with . oraenv and enter the ORACLE_SID +ASM when prompted.

 

6. In the same terminal window, shutdown the ASM instancesqlplus / as sysasm

SQL> shutdown immediate

SQL> exit

 

7. In the same terminal window, stop the listener that was configured for the ASM instance with the command:lsnrctl stop

 

8. The standard OBE environment automatically starts the database with the dbora service. The dbora service may not exist if you downloaded this OBE and configured your own environment. As the root user, remove the dbora service with the command:su – root

chkconfig –del dbora

Use the –list option to determine if the dbora service is configured

chkconfig –list dbora

This windows shows the following commands: su - root; chkconfig --list dbora; chkconfig --del dbora; chkconfig --list

 

9. Now that all the Oracle related processes are stopped reboot the machineIn a terminal window as the root use the reboot command

reboot

 

10. Connect to the machine and LoginAs the oracle user are any of the Oracle related processes running. Use the pgrep -lf command to check. The listener started from the database home directory is the only Oracle related process running

pgrep -lf orcl

pgrep -lf ASM

pgrep -lf tns

 

11. Enable Oracle restart to automatically start the registered components with the crsctl command This command must be run from the grid ORACLE_HOME directory (this is the same directory as the ASM home). You can set this by running oraenv as shown below and setting the ORACLE_SID to +ASM.. oraenv

crsctl enable has

 

12. Attempt to start Oracle Restart with the crsctl utility. This fails because the ohasd process is already running. It was configured to restart automatically at boot time during the grid Infrastructure installation.crsctl start has

 

13. Remove the grid infrastructure listener from the Oracle Restart configuration with the following command:

srvctl remove listener -l LISTENER

 

14. Change the name of the grid infrastructure listener. The default name LISTENER cannot be the same as the database listener if both listeners will be registered with Oracle Restart.

Edit the grid infrastructure listener.ora file at /u01/app/grid/product/11.2.0/grid/network/admin/listener.ora

vi /u01/app/grid/product/11.2.0/grid/network/admin/listener.ora

Change the name LISTENER to LISTENERASM.

Save the file

 

15. Add the grid infrastructure listener to the Oracle Restart configuration with the following command:

srvctl add listener -l LISTENERASM -p “TCP:1522” -o $ORACLE_HOME

16. Reconfigure the asm database in Oracle Restart to have a dependencies on the LISTENERASM. Use the commands listed below. Check the current configuration then modify it using the values shown in the configuration. Be sure to use your spfilename.

srvctl config asm

srvctl remove asm

srvctl add asm -l LISTENERASM -p +data/spfile.ora

srvctl config asm

 

17. Start the oracle grid components: listener, and asm, and then check that the +ASM instance and the LISTENERASM are running. Since they are configured in Oracle Restart, use the single command

srvctl start asm

pgrep -lf ASM

pgrep -lf tns

 

18. Start the oracle database components: listener, database instance and EM database control.

Change the environment to use the orcl instance ORACLE_HOME with

. oraenv

Start the listener with

lsnrctl start LISTENER

Start the database with

sqlplus / as sysdba

SQL> startup

SQL> exit

 

Start EM database control with

emctl start dbconsole

 

19. Enable Oracle Restart for the orcl database instance

Start EM database control at URL https://host01.example.com:1158/em

Navigate to the database home page.

In the High Availability section click the Disabled link for Oracle Restart

Was t30115

On the Specify Host Credentials page enter Username: oracle and Password:oracle

On the Confirmation: Register Database page, observe the command that will be executed, and then click Continue.

On the Database Home page, Oracle Restart now shows Enabled.

 

20. Register the database listener with Oracle Restart.

On the Database Home page, in the General section click the Listener name.

 

On the Listener: Listener_host01.example.com page, click the Disabled link for Oracle Restart.

 

On the Confirmation: Register Listener page observe the command to be executed.

srvctl add listener -l LISTENER -p TCP:1521 -o /u01/app/oracle/product/11.2.0/dbhome_1

Click Continue.

The Processing page appears, then the Listener Home page. The listener is now Enabled for Oracle Restart.

 

21. In a terminal window as the oracle OS user, start the database with the commandsrvctl start database -d orcl

 

22. As the root user reboot the machine with the commandsu – root

reboot

 

23. Observe the oracle components that are started automatically with the pgrep commands:

pgrep -lf tns

pgrep -lf ASM

pgrep -lf orcl

Check the EM database control status with the command

emctl status dbconsole

Because the EM database is not included in Oracle Restart, it must be started manually.

Back to Topic

To Move the SPFILE for the ASM instance , perform the following steps:

 

1. The SPFILE for an ASM instance is in use anytime the ASM instance is active. The SPFILE can be copied with the spcopy command while the Instance is active. The spcopy command does not change which copy of the SPFILE is being used. The spmove command changes the Oracle Restart configuration so that the target SPFILE will be used on the next startup, and attempts to delete the source SPFILE. To move the SPIFLE the ASM instance must be stopped, this implies all instances using the ASM diskgroups must also be stoppedStop the database, and asm diskgroup, with the srvctl command;

srvctl stop database -d orcl

srvctl stop diskgroup -g DATA

 

2. Check the configuration of the asm instance, determine the current location of the SPFILE using the command

srvctl config asm

The SFPILE is +data/spfile.ora

 

3. Move the SPFILE for the ASM instance out of the ASM file. The SPFILE for ASM is created in the ASM diskgroup by default with the Grid Infrastructure installation. To move the SPFILE out of the ASM diskgroup and into filesystem , use the ASMCMD command spmove. The ASMCMD utility requires that the ASM environment is set.. oraenv

asmcmd

ASMCMD> spmove +DATA/spfile.ora /u01/app/grid/product/11.2.0/grid/dbs/spfile+ASM.ora

 

4. Stop and restart the ASM instance to use the SPFILE in the new location. Use the ASMCMD commands shutdown and startup.ASMCMD> shutdown

ASMCMD> startup

ASMCMD> mount DATA

 

5. Retrieve the location of the SPFILE registered in Oracle Restart with the spget command.ASMCMD> spget

ASMCMD> exit

 

6. Using SQL*Plus commands, find the current location of the SPFILE. Connect to the ASM instance “as SYSASM”sqlplus / as SYSASM

SQL> select sys_context(‘sys_cluster_properties’,’asm_spfile’) from dual;

 

7. Move the SPFILE into the ASM diskgroup using SQL*Plus commandSQL> create SPFILE = ‘+DATA/spfile.ora’ from memory;

 

8. Restart the ASM instance to use the new SPFILE.SQL> shutdown immediate

SQL> startup

SQL> select sys_context(‘sys_cluster_properties’,’asm_spfile’) from dual;

SQL> exit

 

9. Restart the orcl instance, and restore the status with the commandsrvctl start database -d orcl

 

Back to Topic

Back to Topic List

At this point the Grid infrastructure is in place to do the Managing the ASM Cluster File System (ACFS) tutorial. Please go to that tutorial, and return here when it is completed to cleanup the environment.

Cleanup

To return the OBE environment to the same state it was in at the beginning of this exercise, perform the following steps:

1. In a terminal window as the oracle user, and environment set to the orcl instance, stop EM database control and deconfigure with/home/oracle/wkdir/gi_inst/deconfigem.sh

 

2. Remove objects stored in ASM from database instance orcl./home/oracle/wkdir/gi_inst/rmasmobj.sh

 

3. Run the deinstall_gi.sh script remove the database and the database listener from the Oracle Restart configuration./home/oracle/wkdir/gi_inst/deinstall_gi.sh

You will recieve 4 prompts.

The first is “Specify all Oracle Restart enabled listeners that are to be de-configured [LISTENERASM]:” Entercarriage return.

The second is :”De-configuring ASM will drop all the diskgroups and it’s contents at cleanup time. This will affect all of the databases and ACFS that use this ASM instance(s).
If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering ‘y’. Do you want to modify above information (y|n) [n]: ” Enter carriage return

The third is: “Do you want to continue (y – yes, n – no)? [n]:” Enter y.

You will be prompted to run one or more scripts as root to complete the deinstallation. When prompted open a terminal and use the su – root command to become root. cut and paste the command from the deinstall script window to the root window and execute.

4. As the root user run the following scriptsu – root

/home/oracle/wkdir/gi_inst/cleanup_root.sh

exit

 

5. As the oracle OS user, reconfigure EM database control with the command:/home/oracle/wkdir/gi_inst/reconfigem.sh

Back to Topic List

Summary

In this lesson, you learned how to:

Prepare the storage devices for Grid Infrastructure installation
Install Grid Infrastructure
Enable Oracle Restart

Back to Topic List

Related Information

To learn more about Grid Installation and ASM you can refer to:

Additional OBEs on the OTN Web site.

Back to Topic List

 Place the cursor over this icon to hide all screenshots.

Change default port in RAC

Requirement:
Changed the database default port from 1521 to 1523 for resolve the “Oracle Database TNS Listener Poison Attack Vulnerability”.

1. Modify port using srvctl tool

srvctl modify scan_listener -p 1523
srvctl modify listener -p 1523

2. update the local and remote listener in spfile for all the respective nodes.

3. update the port information in Oracle Network files e.g. listener.ora and tnsnames.ora

Reference:
https://oracleforyou.wordpress.com/2013/04/17/18/

ohasd failed to start_while installing Grid Infrastructure 11204 on RHEL_7.2


Symptoms

========
Grid 11.2.0.4 Install fails when running root.sh on OL7, this affects both Oracle Clusterware and Oracle Restart Installation.

rootcrs.log/roothas.log confirms that ohasd/crsd failed to start

Cause
=====
There is a known issue where OL7 expects to use systemd rather than initd for running processes and restarting them and root.sh does not handle this currently.

This was reported in the following Unpublished Bug

Bug 18370031 – RC SCRIPTS (/ETC/RC.D/RC.* , /ETC/INIT.D/* ) ON OL7 FOR CLUSTERWARE

Solution
=========
Because Oracle Linux 7 (and Redhat 7) use systemd rather than initd for starting/restarting processes and runs them as a service the current software install of both 11.2.0.4 & 12.1.0.1 will not succeed because the ohasd process does not start properly.

In OL7 it needs to be set up as a service so the following step is required BEFORE you run root.sh when prompted

1. As ROOT user

cd /etc/systemd/system/
touch ohas.service

n.b. this should create a file called ohasd.service

2. Edit the file ohas.service and add the following text

[Unit]
Description=Oracle High Availability Services
After=syslog.target

[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always

[Install]
WantedBy=multi-user.target

3. Run the following commands (as root):

systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service

4. Now run root.sh from the Grid $OH and it should succeed

http://fatdba.com/2016/01/06/oracle-gi-11-2-installation-on-rhel-7-error-ohasd-failed-to-start-failed-to-start-the-clusterware-last-20-lines-of-the-alert-log-follow-ohasd-failed-to-start-at-u01app11-2-0gridcrsinstallr/
http://ora10gadmin.blogspot.in/2015/03/rootsh-fails-with-inappropriate-ioctl.html
http://houseofbrick.com/oracle-gi-11-2-installation-on-rhel-7/