?
Solved

Using the RAC Scan IP for a Non RAC instance

Posted on 2014-08-20
10
Medium Priority
?
552 Views
Last Modified: 2014-08-28
I found a really odd config on a server today.

I found a situation where there's a 2 node RAC cluster built.

A new database was created on node 2 as a standard instance.

When whoever built the TNSNAMES.ORA file built it, the HOST part of the TNSNAMES entry used the SCAN host name instead of the host name of node 2.

The service of the Application on the app server kept stopping.  The vendor says that application service is finicky and even a fraction of a second of DB disconnection will cause the app service to fall over.

I would assume that if you've setup a tnsnames alias using the RAC SCAN alias that if the engine decided to point you to node 1 and there's no node 1 configured that it might generate a brief database "not there" before falling back to node 2.

I'm just running here on a gut instinct that this could be the problem, wondering if anyone has any real life experience to back this thought up ?
0
Comment
Question by:Steve Wales
  • 4
  • 4
  • 2
10 Comments
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 40276396
No, I can't say that I have seen this exactly.  I do know that Oracle offers "RAC 1-node" as a way to have a second RAC node defined, but not active.  This makes failover to a second node faster than a non-RAC failover (at least according to the marketing claims).  And, this is cheaper than paying for database licenses on two nodes, since you only have to pay for the Oracle database license on one server this way.  But, you do have to pay the upcharge for RAC on the one active node.
0
 
LVL 23

Author Comment

by:Steve Wales
ID: 40276677
I think you may have misunderstood the question.

The database in question is not a "RAC 1-node".  It's a standard, non RAC instance, that just happens to sit on a server that's also configured as a part of the RAC node.

When the tnsnames was set up, whoever set it up used the SCAN name in the HOST= part of the tnsnames alias instead of just the server name.

I'm wondering if that causes confusion.  Since the application service is so fragile (I love it when vendors tell you how finicky their stuff is), I was wondering if there's any thoughts on whether using the SCAN name on a standard non RAC instance might cause issues with temporary "database not available" type of scenarios when the RAC stuff tries to send a connection request to a node where there are no instance processes.

Does that make sense ?
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 1000 total points
ID: 40277476
Is the non-rac instance registered with the cluster?

If not, then it would make sense that it would get sporadic success/failure as the connection rotates through remote (fail) and local (success) listeners.

If that instance is in the ocr, then connections to the scan listener should direct to only the correct node.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 40277495
OK, so you have two Oracle database instances on this server, one part of a RAC cluster, and one stand-alone instance?  Is that correct?  And you have two separate Oracle_home directories, with a different tnsnames.ora file for each instance?

Are you sure that the tnsnames.ora file on this server gets used much (if at all)?  Where is the application server software installed?  Is that also on this database server?  Or, is that on a separate server?  If that is on a separate server, it is the tnsnames.ora there that is used to connect to the database, and not the tnsnames.ora file on the database server.
0
 
LVL 23

Author Comment

by:Steve Wales
ID: 40277515
Mark - yes that is the setup, except both are running out of the same ORACLE_HOME.

ststuber - I don't know if it's registered with the cluster, I would assume not.  This seems to answer the question though, it is what I thought it was,

This is not my machine, it belongs to one of my customers, and they asked me to have a look at it after continued issues - the scan vs local host thing stood out to me as a possible cause of the problem.
0
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 40277562
If there is just one Oracle_home, then there is just one tnsnames.ora file on the database server.  But that does't answer my question about where the application server software is installed.  Where is that?  (On this same server, or on a different server?)
0
 
LVL 23

Author Comment

by:Steve Wales
ID: 40277592
Oh that is on a different server.

The tnsnames I was checking was in the client home in the separate app server.
0
 
LVL 35

Assisted Solution

by:Mark Geerlings
Mark Geerlings earned 1000 total points
ID: 40277603
That's clearer.  Yes, I agree with your assessment that a tnsnames.ora file on a client for the stand-alone database should *NOT* be pointing to the scan listener for the RAC DB.  This should be easy to test a change to  (and to save a copy of the tnsnames.ora file there first just in case you need to go back to it.)  

I would start by adding an entry with an alias different from what the application uses, but with the hostname, port and SID (or service_name)  that you believe is correct.  You can test that outside of the app, to confirm that it works at least for "tnsping" and preferably also with SQL*Plus.  Then if that works, change the alias with the incorrect entry to something different (or remove that incorrect entry entirely) and change the alias on your new entry to what the application expects the alias to be.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 40279290
I'm not sure why you want to avoid the scan listener.

That listener doesn't "belong" to the rac db,  it's an entity of the cluster not the database.

I understand the intent was to service the rac db, but that doesn't make it inappropriate for use by other resources on that cluster, including non-rac dbs.

You certainly can change your tns file (hopefully just a few) to point to the local listener directly; but that seems like an extra maintenance effort for no gain in functionality.
0
 
LVL 23

Author Closing Comment

by:Steve Wales
ID: 40290398
Thanks for the comments.  Word is that the application service has not fallen over since making the change to tnsnames.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Suggested Courses
Course of the Month16 days, 19 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question