RAC & ASM Administration

Questions relating to Oracle Real Application Clusters (RAC) and Clusterware.

Moderator: Tim...

RAC & ASM Administration

Postby rac-newbie » Fri May 11, 2012 7:46 pm

Hi,

What is the correct way to stop then restart a single DB instnace in a two node RAC?

Stopping...
srvctl stop instance -d rac -i rac1
srvctl stop asm -n h-rac-001
srvctl stop nodeapps -n h-rac-001

Starting...
srvctl start nodeapps -n h-rac-001
srvctl start asm -n h-rac-001
srvctl start instance -d rac -i rac1

Thanks in Advance,
David
rac-newbie
Member
 
Posts: 13
Joined: Fri May 11, 2012 7:36 pm

Re: RAC & ASM Administration

Postby sivakumarocp » Sat May 12, 2012 3:16 am

Hi,

If you want to restart any host which is in a cluster first, you have to stop Oracle and cluster resources.

Shutdown Procedure:

1. Stop instance ---> $srvctl stop instance -d <db_name> -i <Instance_name>
2. Stop ASM instance ----> $srvctl stop asm -n <node_name>
3. Stop Nodeapps services ---> $srvctl stop nodeapps -n <node_name>
4. Stop CRS ---> $crsctl stop crs (should be run as root user or oracle user should have SUDO permission)

Finally Check the status of the resource

$crs_stat -t

All resource should be in OFFLINE.

For startup, follow the Bottom up approach for above said shutdown procedure :)
Regards
Sivakumar.A
www.sivakumardba.com
sivakumarocp
Advisor
 
Posts: 256
Joined: Sat Jun 27, 2009 3:53 am
Location: India

Re: RAC & ASM Administration

Postby rac-newbie » Tue May 15, 2012 5:35 pm

Hi,

I'm trying to troubleshoot the instance on the second RAC node does not exist.

The window service OracleServiceORCL2 is running on the host H2. When I run from the command-line "srvctl status instance -d ORCL -i ORCL2", the return message is "PRKO-3032 : Invalid instance name(s): ORCL2"

Do I need to re-install the grid, db? or run install for repair?

Thanks,
David.
rac-newbie
Member
 
Posts: 13
Joined: Fri May 11, 2012 7:36 pm

Re: RAC & ASM Administration

Postby Tim... » Tue May 15, 2012 6:23 pm

Hi.

I have some questions.

1) Was this database created in the normal way as a cluster database using the DBCA?
2) Has it ever worked?

I would try this:

- Open up a command prompt on node 2 server.

- Set the ORACLE_SID,

Code: Select all
set ORACLE_SID=ORCL2


- Connect to SQL*Plus,

Code: Select all
sqlplus / as sysdba


- Try to start the instance.

Code: Select all
SQL> startup


3) Does that start the instance, or give you any other information?

4) What is the overall status of the database?

Code: Select all
srvctl status database -d ORCL


Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: RAC & ASM Administration

Postby rac-newbie » Thu May 17, 2012 7:55 pm

Thank you for responding Tim,

1. The DB was created during the installation of the Oracle RAC. The Oracle RAC installation was install from node 1 and node 2 was install remotely.

2. I don't think the DB in the second node ever work. The services and process is running.

So I figured I will need to do a repair installation or add a new node.

Executing command like accessing to SQL Plus, srvctl to get config status or starting the ASM, instance service did not work.

This is the error when starting the DB or nodeapps from the second node,
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/ops/opsctl/OPSCTLDriver

David.
rac-newbie
Member
 
Posts: 13
Joined: Fri May 11, 2012 7:36 pm

Re: RAC & ASM Administration

Postby Tim... » Thu May 17, 2012 8:18 pm

Hi.

I guess my next suggestion would be to remove the instance on the second node, then add it again. This can be done using the DBCA.

http://www.oracle-base.com/articles/rac ... tabase.php

I don't think I have ever done this on Windows, but I guess the DBCA does everything for you. This assumes the grid infrastructure installation is fine. If not, this isn't going to work.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: RAC & ASM Administration

Postby rac-newbie » Fri May 18, 2012 2:09 am

Fail during the adding of the new instance.

emConfig.log......

May 17, 2012 4:38:11 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Starting execution: C:/app/Administrator/product/11.2.0/dbhome_1/perl/bin\perl.exe C:\app\Administrator\product\11.2.0\dbhome_1\bin\targetdeploy.pl -v HOU-RAC-002-vip -l LISTENER -t LISTENER_HOU-RAC-002.tidalsoft.local -s null -o C:\app\11.2.0\grid C:\app\Administrator\product\11.2.0\dbhome_1\hou-rac-002_orcl HOU-RAC-002.tidalsoft.local orcl2a
May 17, 2012 4:38:11 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: null
May 17, 2012 4:38:11 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Stack trace:
java.lang.NullPointerException
at java.lang.ProcessBuilder.start(ProcessBuilder.java:443)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:507)
at oracle.sysman.emcp.util.PlatformInterface.executeCommand(PlatformInterface.java:1875)
at oracle.sysman.emcp.util.PlatformInterface.executeCommand(PlatformInterface.java:1827)
at oracle.sysman.emcp.util.PlatformInterface.executeCommand(PlatformInterface.java:1817)
at oracle.sysman.emcp.util.PlatformInterface.executeCommand(PlatformInterface.java:1808)
at oracle.sysman.emcp.util.PlatformInterface.executeTargetDeploy(PlatformInterface.java:478)
at oracle.sysman.emcp.EMAgentConfig.deployStateDirs(EMAgentConfig.java:4684)
at oracle.sysman.emcp.EMAgentConfig.instantiateEMConfigFiles(EMAgentConfig.java:3937)
at oracle.sysman.emcp.EMAgentConfig.updateAgentConfigFiles(EMAgentConfig.java:3477)
at oracle.sysman.emcp.EMAgentConfig.performAddInstConfiguration(EMAgentConfig.java:459)
at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:292)
at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:278)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:259)
at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:621)
at java.lang.Thread.run(Thread.java:637)
May 17, 2012 4:38:11 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing C:/app/Administrator/product/11.2.0/dbhome_1/perl/bin\perl.exe C:\app\Administrator\product\11.2.0\dbhome_1\bin\targetdeploy.pl -v HOU-RAC-002-vip -l LISTENER -t LISTENER_HOU-RAC-002.tidalsoft.local -s null -o C:\app\11.2.0\grid C:\app\Administrator\product\11.2.0\dbhome_1\hou-rac-002_orcl HOU-RAC-002.tidalsoft.local orcl2a
May 17, 2012 4:38:11 PM oracle.sysman.emcp.EMAgentConfig instantiateEMConfigFiles
CONFIG: Failed to deploy state dirs
May 17, 2012 4:38:11 PM oracle.sysman.emcp.EMAgentConfig performAddInstConfiguration
SEVERE: Error instantiating EM configuration files
May 17, 2012 4:38:11 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error updating EM configuration for node hou-rac-002
Refer to the log file at C:\app\Administrator\cfgtoollogs\dbca\orcl\emConfig.log for more details.
May 17, 2012 4:38:11 PM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Error updating EM configuration for node hou-rac-002
at oracle.sysman.emcp.EMAgentConfig.performAddInstConfiguration(EMAgentConfig.java:467)
at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:292)
at oracle.sysman.emcp.EMAgentConfig.invoke(EMAgentConfig.java:278)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:259)
at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:621)
at java.lang.Thread.run(Thread.java:637)
May 17, 2012 4:38:11 PM oracle.sysman.emcp.EMConfig restoreOuiLoc
CONFIG: Restoring oracle.installer.oui_loc to C:\app\Administrator\product\11.2.0\dbhome_1\oui
rac-newbie
Member
 
Posts: 13
Joined: Fri May 11, 2012 7:36 pm

Re: RAC & ASM Administration

Postby Tim... » Fri May 18, 2012 8:18 am

Hi.

Questions:

1) I assume you attempted to delete the instance, before adding it. Were there any errors when doing this?
2) Are you doing this from enterprise manager? If so, try from DBCA.

It is worth using these diagnostic tools to check the setup of your system. Obviously, if something is wrong with the installation you probably won't have any success.

http://www.oracle-base.com/articles/rac ... oblems.php

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: RAC & ASM Administration

Postby rac-newbie » Fri May 18, 2012 3:38 pm

Hi,

The instance was deleted successfully w/o any errors, before adding a new instance to the RAC using DBCA.

David.
rac-newbie
Member
 
Posts: 13
Joined: Fri May 11, 2012 7:36 pm

Re: RAC & ASM Administration

Postby rac-newbie » Fri May 18, 2012 5:24 pm

Hi Tim,

Can you explain to why the hostname for SCAN has three different IP for one host?


**************************************************************************************************************

127.0.0.1 localhost.localdomain localhost
# Public
192.168.0.151 w2008-112-rac1.localdomain w2008-112-rac1
192.168.0.152 w2008-112-rac2.localdomain w2008-112-rac2
#Private
192.168.1.151 w2008-112-rac1-priv.localdomain w2008-112-rac1-priv
192.168.1.152 w2008-112-rac2-priv.localdomain w2008-112-rac2-priv
#Virtual
192.168.0.153 w2008-112-rac1-vip.localdomain w2008-112-rac1-vip
192.168.0.154 w2008-112-rac2-vip.localdomain w2008-112-rac2-vip
#SCAN (192.168.0.155 - 192.168.0.157 in DNS)
192.168.0.155 w2008-112-scan.localdomain w2008-112-scan
192.168.0.156 w2008-112-scan.localdomain w2008-112-scan
192.168.0.157 w2008-112-scan.localdomain w2008-112-scan

Thanks,
David.
rac-newbie
Member
 
Posts: 13
Joined: Fri May 11, 2012 7:36 pm

Re: RAC & ASM Administration

Postby Tim... » Fri May 18, 2012 5:40 pm

Hi.

The SCAN is a cluster alias. It allows you to contact the cluster using a single name. It is implemented using 3 scan listeners. When you reference the name, it is resolved to 1 of 3 IP addresses by the DNS, used in a round robin.

In previous version of RAC, you had to either reference the nodes individually using the VIP, or have all VIPs listed in the tnsnames.ora entry. This was a pain if you were adding and removing nodes. Now with the SCAN, you don't need to worry about this because all references to the cluster can be done using the SCAN.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: RAC & ASM Administration

Postby rac-newbie » Mon Jun 11, 2012 10:52 pm

What is the best way to get the RAC SID/Service name? Is the SID name the same as the RAC DB name (orcl)? Can the value be retrieved from sqlplus?


>srvctl status database -d ORCL

Database unique name: orcl
Database name: orcl
Oracle home: C:\app\Administrator\product\11.2.0\dbhome_1
Oracle user: nt authority\system
Spfile: +DATA/orcl/spfileorcl.ora
Domain: tidalsoft.local
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: orcl
Database instances: orcl1,orcl2
Disk Group: DATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed

Thanks in Advance...
rac-newbie
Member
 
Posts: 13
Joined: Fri May 11, 2012 7:36 pm

Re: RAC & ASM Administration

Postby Tim... » Tue Jun 12, 2012 6:04 am

Hi.

In RAC the SID is definitely not the database name. Typically, the SID is the databases name plus a number, indicating the instance number. You can see it in your output:

Code: Select all
Database name: orcl
...
Database instances: orcl1,orcl2


You can also view it in v$active_instances.

http://docs.oracle.com/cd/E11882_01/ser ... m#i1398769

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: RAC & ASM Administration

Postby piobaxter » Mon Jul 02, 2012 1:55 am

This was complicated to me before, glad I read this and understood it fully.


_______________________________________
The final Solution For life insurance farmers & insurance for diabetics That It's Possible To Be aware of At this time The final Solution For life insurance farmers & insurance for diabetics That It's Possible To Be aware of At this time
Last edited by piobaxter on Mon Jan 07, 2013 5:11 am, edited 2 times in total.
piobaxter
Member
 
Posts: 1
Joined: Mon Jul 02, 2012 12:22 am

Re: RAC & ASM Administration

Postby Tim... » Tue Jul 03, 2012 9:42 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Next

Return to Oracle RAC and Clusterware

Who is online

Users browsing this forum: No registered users and 1 guest